Solving xy' - 2y - x^2 = 0

In this lecture, I will show you how to solve the \(xy\prime - 2y - x^2 = 0\) equation. This linear differential equation should be solver via the integration factor method and now I will show ho to do it.

The first step is to convert this equation to a canonical form.

\[y\prime - \frac{2}{x}y = x\]

And now we need to introduce an integrational factor:

\[Iy\prime - I\frac{2}{x}y = Ix\]

Product rule:

\[(Iy)\prime = Iy\prime + I\prime y\]

Due to the arbitrary form, of \(I\), we can require the equality of the terms in the sum, but it is important to take care about the sign of these terms:

\[I\prime = -I\frac{2}{x}\]

and solve it against \(I\):

\[\frac{\mathop{dI}}{I} = -\frac{2\mathop{dx}}{x}\]

\[\int \frac{\mathop{dI}}{I} = -\int \frac{2\mathop{dx}}{x} \Rightarrow \ln{\left|I\right|} = -2\ln{\left|x\right|} + C \]

\[\ln{\left|I\right|} = \ln{Ax^{-2)}\]

\[e^{\ln{\left|I\right|}} = e^{\ln{Ax^{-2}}}\]

\[\boxed{I = x^{-2}}\]

From our equation we can write:

\[(Iy)\prime = Ix = x^{-2}x = frac{1}{x}\]

Now integrate both parts and:

\[Iy = \int \frac{\mathop{dx}}{x} + C\]

\[x^{-2}y = \ln{\left|x\right|} + C\]

and finally:

\[\boxed{y = x^2\ln{\left|x\right|} + Cx^2}\]

For more details, how to solve \(x^2y\prime + 2xy = \cos^2{x}\), please watch this video:


Published: 2023-05-14 05:58:53
Updated: 2023-05-14 06:01:46