Problem 243
Hard Further Methods

Solve the differential equation (x^2+1)y' + xsin ycos y…

Solve the differential equation $(x^2+1)y' + x\sin y\cos y - x(x^2+1)\cos^2 y = 0$.

Explanation of Method

Dividing by \(\cos^2 y\) and setting \(u = \tan y\) (so \(y' = \cos^2 y\cdot u'\)) turns this into a first-order linear equation in \(u\), solvable with an integrating factor.

Rearrange the equation

\[(x^2+1)y' = x\cos y\left[(x^2+1)\cos y - \sin y\right].\]

Substitute \(u = \tan y\)

Since \(u = \tan y\), \(u' = \sec^2 y\cdot y'\), i.e. \(y' = \cos^2 y\cdot u'\). Substituting and dividing by \(\cos^2 y\) (with \(\cos y \ne 0\)):

\[(x^2+1)u' = x\left[(x^2+1) - u\right],\]

which rearranges to the linear equation

\[u' + \frac{x}{x^2+1}u = x.\]

Find the integrating factor

\[\mu(x) = e^{\int \frac{x}{x^2+1}\,dx} = e^{\frac{1}{2}\ln(x^2+1)} = \sqrt{x^2+1}.\]

Multiply through and integrate

Multiplying by \(\mu\) makes the left side an exact derivative:

\[\frac{d}{dx}\left(u\sqrt{x^2+1}\right) = x\sqrt{x^2+1}.\]

Integrating with \(w = x^2+1\):

\[u\sqrt{x^2+1} = \int x\sqrt{x^2+1}\,dx = \frac{(x^2+1)^{3/2}}{3} + C.\]

Solve for \(u\) and back-substitute

Dividing by \(\sqrt{x^2+1}\):

\[u = \frac{x^2+1}{3} + \frac{C}{\sqrt{x^2+1}}.\]

Since \(u = \tan y\):

\[\tan y = \frac{x^2+1}{3} + \frac{C}{\sqrt{x^2+1}}.\]

Verify independently

The source derivation stops without checking the result, so it was verified independently here. Writing \(u(x) = \dfrac{x^2+1}{3} + \dfrac{C}{\sqrt{x^2+1}}\) and computing \(u'(x)\) symbolically confirms \(u' + \dfrac{xu}{x^2+1} = x\) identically. Substituting \(y = \arctan u(x)\) and \(y' = \cos^2 y\cdot u'\) directly into the original nonlinear equation \((x^2+1)y' + x\sin y\cos y - x(x^2+1)\cos^2 y\) and simplifying symbolically (checked numerically at several \((x,C)\) points as well) gives a residual of exactly \(0\). The derivation and final answer are confirmed correct as given in the source.


Result

Final answer:

Boxed result:

\[\boxed{\tan y = \frac{x^2+1}{3} + \frac{C}{\sqrt{x^2+1}}}\]

equivalently \(y = \arctan\!\left(\dfrac{x^2+1}{3} + \dfrac{C}{\sqrt{x^2+1}}\right)\), where \(C\) is an arbitrary constant.