Solve the differential equation [sin(x+y) + xcos(x+y)] dx +…
Solve the differential equation $[\sin(x+y) + x\cos(x+y)]\,dx + x\cos(x+y)\,dy = 0$.
Explanation of Method
Every term depends on \(x\) and \(y\) only through the combination \(x+y\), so setting \(u = x+y\) collapses the equation to a separable one in \(x\) and \(u\).
Substitute \(u = x+y\)
Let \(u = x+y\), so \(dy = du - dx\). The equation becomes
\[[\sin u + x\cos u]\,dx + x\cos u\,(du - dx) = 0.\]
Simplify
Expanding, the \(x\cos u\,dx\) terms cancel, leaving
\[\sin u\,dx + x\cos u\,du = 0.\]
Separate variables
\[\frac{dx}{x} = -\frac{\cos u}{\sin u}\,du = -\cot u\,du.\]
Integrate both sides
\[\int\frac{dx}{x} = -\int\cot u\,du \quad\Longrightarrow\quad \ln|x| = -\ln|\sin u| + C_1,\]
so \(\ln|x\sin u| = C_1\), giving \(x\sin u = C\).
Back-substitute \(u = x+y\)
\[x\sin(x+y) = C.\]
Explicitly, \(y = \arcsin(C/x) - x\) for \(|C/x|\le 1\).
Verify by implicit differentiation and exactness
Differentiating \(x\sin(x+y) = C\) implicitly reproduces the original equation exactly:
\[[\sin(x+y) + x\cos(x+y)]\,dx + x\cos(x+y)\,dy = 0.\]
Independently, with \(M = \sin(x+y)+x\cos(x+y)\) and \(N = x\cos(x+y)\), direct computation gives \(\partial M/\partial y = \partial N/\partial x = \cos(x+y) - x\sin(x+y)\), so the original equation is itself exact. A sympy check confirms both the implicit-differentiation identity and the exactness condition hold identically.
Result
Final answer:
Boxed result:
\[\boxed{x\sin(x+y) = C}\]
equivalently \(y = \arcsin(C/x) - x\), where \(C\) is an arbitrary constant.