Re: Lauren's question from Yahoo! Answers regarding inexact ODE
Hello Lauren,
We are given to solve:
$$2y\left(y^2-x \right)\,dy=dx$$
I would first write the ODE in the form:
$$M(x,y)\,dx+N(x,y)\,dy=0$$
and so we have:
$$(1)\,dx+\left(2xy-2y^3 \right)\,dy=0$$
We see the equation is inexact, since:
$$\frac{\delta M}{\delta y}=0\ne\frac{\delta N}{\delta x}=2y$$
Thus, we observe that:
$$\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:
$$\mu(y)=e^{\int 2y\,dy}=e^{y^2}$$
And so we write the new ODE as:
$$e^{y^2}\,dx+\left(2xy-2y^3 \right)e^{y^2}\,dy=0$$
We see now that:
$$\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:
$$\frac{\delta F}{\delta x}=e^{y^2}$$
Integrating with respect to $x$, we obtain:
$$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 $$\frac{\delta F}{\delta y}=\left(2xy-2y^3 \right)e^{y^2}$$:
$$\left(2xy-2y^3 \right)e^{y^2}=2xye^{y^2}+g'(y)$$
$$g'(y)=-2y^3e^{y^2}$$
Next, we want to integrate this to determine $g(y)$, and we may use integration by parts:
$$u=y^2\,\therefore\,du=2y\,dy$$
$$dv=2ye^{y^2}\,dy\,\therefore\,v=e^{y^2}$$
and we may write:
$$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:
$$xe^{y^2}+e^{y^2}\left(1-y^2 \right)=C$$
$$\left(x+1-y^2 \right)e^{y^2}=C$$