Solution:
Concept: The right side depends on x+y only, so we put z=x+y. The new equation is separable, and the half-angle identity 1+cosz=2cos22z makes it integrable.
Step 1 — Substitute z=x+y.
Differentiating z gives dxdz=1+dxdy, so we replace dxdy by dxdz−1.
dxdz−1=cosz
dxdz=1+cosz
Step 2 — Separate and use the half-angle identity.
We divide by 1+cosz (with cosz=−1) and write it as 2cos22z.
1+coszdz=dx
2cos22zdz=dx
21sec22zdz=dx
Step 3 — Integrate.
Since ∫sec22zdz=2tan2z, the factor 21 cancels. We add one arbitrary constant c.
tan2z=x+c
Step 4 — Put back z.
We replace z by x+y.
tan(2x+y)=x+c
Watch out: Dividing by 1+cosz leaves out the straight lines x+y=(2n+1)π, on which dxdy=−1 and cos(x+y)=−1; these lines also satisfy the equation.
Therefore, the general solution is tan(2x+y)=x+c, where c is an arbitrary constant.