Solution:
Concept: The right side depends on x+y only, so we put z=x+y; we then use 1+tan2z=sec2z and cos2z=21+cos2z.
Step 1 — Substitute z=x+y.
Differentiating z gives dxdz=1+dxdy, so we replace dxdy by dxdz−1.
dxdz−1=tan2z
dxdz=1+tan2z
dxdz=sec2z
Step 2 — Separate the variables.
We divide by sec2z, which is the same as multiplying by cos2z, and use the double-angle form of cos2z.
cos2zdz=dx
21+cos2zdz=dx
Step 3 — Integrate.
We integrate both sides and add one arbitrary constant c.
2z+4sin2z=x+c
Step 4 — Clear the fractions.
We multiply by 4 and call 4c=A, which is still arbitrary.
2z+sin2z=4x+A
Step 5 — Put back z.
We replace z by x+y and collect the x terms.
2(x+y)+sin2(x+y)=4x+A
2(y−x)+sin2(x+y)=A
Therefore, the general solution is 2(y−x)+sin2(x+y)=A, where A is an arbitrary constant.