Solving a First-Order Linear Differential Equation

Find the general solution of the first-order linear differential equation \[ \frac{dy}{dx}+\frac{x}{x^{2}+1}y=\dfrac{x^{3}}{1+x^{2}} \]

Solution Compare the differential equation to (1). Since \(P(x)= \dfrac{x}{x^{2}+1}\), the integrating factor is \[ \begin{equation*} e^{\int \!P( x)\,dx} = \exp\; \left[{\int {\frac{x}{x^{2}+1}}\,dx}\right]= \exp \left[{\frac{1}{2} \ln ( x^{2}+1) }\right] = \exp\; \Big[{\ln ( x^{2}+1) ^{1/2}}\Big]= \sqrt{x^{2}+1} \end{equation*} \]

1079

Now we multiply the differential equation by \(\sqrt{x^{2}+1}\) and obtain \[ \begin{equation*} \sqrt{x^{2}+1}\,\frac{dy}{dx}+\dfrac{x}{\sqrt{x^{2}+1}}y=\dfrac{x^{3}}{\sqrt{ x^{2}+1}} \end{equation*} \]

The left side of the above equation is the derivative of \(\sqrt{x^{2}+1}\,y\), so we can write \[ \begin{equation*} \dfrac{d}{dx}\big( \sqrt{x^{2}+1}\,y\big) =\dfrac{x^{3}}{\sqrt{x^{2}+1}} \end{equation*} \]

Integrating both sides, we find \[ \begin{eqnarray*} \sqrt{x^{2}+1}\,y &=&\int \dfrac{x^{3}}{\sqrt{x^{2}+1}}\,dx \underset{\color{#0066A7}{\textrm{Let} \,u\,=\,x^{2}+1,\,du\,=\,2x\,dx}}{\underset{\color{#0066A7}\uparrow }{=}} \dfrac{1}{2}\int \dfrac{ \left( u-1\right) }{\sqrt{u}}\,du=\dfrac{1}{2}\int \big( {u^{1/2}}- {u^{-1/2}}\big)\,du \\ &=&\dfrac{1}{2}\left( \dfrac{u^{3/2}}{\dfrac{3}{2}}-\dfrac{u^{1/2}}{\dfrac{1 }{2}}\right) +C=\dfrac{( x^{2}+1) ^{3/2}}{3}-(x^{2}+1)^{1/2}+C \\ y &=&\dfrac{x^{2}+1}{3}-1+\dfrac{C}{\sqrt{x^{2}+1}}\qquad\color{#0066A7}{{\hbox{Solve for }y.}} \end{eqnarray*} \]

and we have the general solution to the differential equation.