# Lauren's question at Yahoo! Answers regarding inexact ODE

#### MarkFL

Staff member
Here is the question:

Help me with my Linear Differential Equation of Order One: The Integrating Factor?

Help me with my Linear Differential Equation of Order One: The Integrating Factor

2y(y^2-x)dy=dx
I have posted a link there to this topic so the OP can see my work.

#### MarkFL

Staff member
Re: Lauren's question from Yahoo! Answers regarding inexact ODE

Hello Lauren,

We are given to solve:

$$\displaystyle 2y\left(y^2-x \right)\,dy=dx$$

I would first write the ODE in the form:

$$\displaystyle M(x,y)\,dx+N(x,y)\,dy=0$$

and so we have:

$$\displaystyle (1)\,dx+\left(2xy-2y^3 \right)\,dy=0$$

We see the equation is inexact, since:

$$\displaystyle \frac{\delta M}{\delta y}=0\ne\frac{\delta N}{\delta x}=2y$$

Thus, we observe that:

$$\displaystyle \frac{\frac{\delta N}{\delta x}-\frac{\delta M}{\delta y}}{M}=2y$$

Since this is a function of $y$ alone, we take as our integrating factor:

$$\displaystyle \mu(y)=e^{\int 2y\,dy}=e^{y^2}$$

And so we write the new ODE as:

$$\displaystyle e^{y^2}\,dx+\left(2xy-2y^3 \right)e^{y^2}\,dy=0$$

We see now that:

$$\displaystyle \frac{\delta M}{\delta y}=2ye^{y^2}=\frac{\delta N}{\delta x}=2ye^{y^2}$$

Hence, our new equation is exact. Since it is exact, we must have:

$$\displaystyle \frac{\delta F}{\delta x}=e^{y^2}$$

Integrating with respect to $x$, we obtain:

$$\displaystyle F(x,y)=xe^{y^2}+g(y)$$

Now, to determine $g(y)$, we may take the partial derivative with respect to $y$, substituting using $$\displaystyle \frac{\delta F}{\delta y}=\left(2xy-2y^3 \right)e^{y^2}$$:

$$\displaystyle \left(2xy-2y^3 \right)e^{y^2}=2xye^{y^2}+g'(y)$$

$$\displaystyle g'(y)=-2y^3e^{y^2}$$

Next, we want to integrate this to determine $g(y)$, and we may use integration by parts:

$$\displaystyle u=y^2\,\therefore\,du=2y\,dy$$

$$\displaystyle dv=2ye^{y^2}\,dy\,\therefore\,v=e^{y^2}$$

and we may write:

$$\displaystyle g(y)=-\left(y^2e^y-\int 2ye^{y^2}\,dy \right)=e^{y^2}-y^2e^{y^2}=e^{y^2}\left(1-y^2 \right)$$

Thus, the solution to the original ODE is given implicitly by:

$$\displaystyle xe^{y^2}+e^{y^2}\left(1-y^2 \right)=C$$

$$\displaystyle \left(x+1-y^2 \right)e^{y^2}=C$$