Let u=xy2, so z=xneu with ∂y∂u=x2y and ∂x∂u=−x2y2.
Step 1 — the y-derivative.
∂y∂z=xney2/x⋅x2y=2yxn−1ey2/x.
Hence
−y3∂y∂z=−2y4xn−1ey2/x.
Step 2 — differentiate again in y (product rule, treating x as constant):
∂y∂(−2y4xn−1ey2/x)=−2xn−1ey2/x(4y3+y4⋅x2y)=−2xn−1ey2/x(4y3+x2y5).
Step 3 — multiply by 4y31:
4y31⋅(−2xn−1ey2/x)(4y3+x2y5)=−xn−1ey2/x(2+xy2)=−2xn−1ey2/x−y2xn−2ey2/x.
This is the left-hand side.
Step 4 — the x-derivative (right-hand side):
∂x∂z=nxn−1ey2/x+xney2/x⋅(−x2y2)=nxn−1ey2/x−y2xn−2ey2/x.
Step 5 — match. Setting LHS = RHS, the term −y2xn−2ey2/x cancels from both sides, leaving
−2xn−1ey2/x=nxn−1ey2/x⟹n=−2.
So the identity holds exactly when n=−2 (option 4).
Exam trick: Factor out the common ey2/x early and compare the two sides term by term — the y2xn−2 pieces are built to cancel, so the answer is fixed by the single xn−1 coefficient n=−2.