# speeeed's question at Yahoo! Answers regarding special integrating factors

#### MarkFL

Staff member
Here is the question:

Show that the given equation is not exact and find the right integrating factor to make this equation exact?

Show that the given equation is not exact and find the right integrating factor to make this equation exact (Hint : this integrating factor μ(y) is a function of y only).
Then solve the equation (you can leave the constant of integration for ψ under its integral form).

y+(2x−ye^y)y′ =0

Correct answer is μ = y
(y^2)x − integral of (y^2)e^y dy=c

Here is a link to the question:

Show that the given equation is not exact and find the right integrating factor to make this equation exact? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.

#### MarkFL

Staff member
Hello speeeed,

We are given to solve:

$$\displaystyle y+\left(2x-ye^y \right)y'=0$$

First, let's express the ODE in the differential form $$\displaystyle M(x,y)\,dx+N(x,y)\,dy=0$$:

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

An equation is exact iff $$\displaystyle \frac{\delta M}{\delta y}=\frac{\delta N}{\delta x}$$. Checking for exactness, we find:

$$\displaystyle \frac{\delta}{\delta y}(y)=1$$

$$\displaystyle \frac{\delta}{\delta x}\left(2x-ye^y \right)=2$$

Since in this case $$\displaystyle \frac{\delta M}{\delta y}\ne\frac{\delta N}{\delta x}$$ we may conclude the ODE is not exact.

Next we want to consider:

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

Since this is not a function of just $x$, we next consider:

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

Since this is a function of just $y$, then an integrating factor is given by:

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

Multiplying the ODE in differential form by this integrating factor, we get:

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

Now, we can verify that we have an exact equation as:

$$\displaystyle \frac{\delta}{\delta y}\left(y^2 \right)=\frac{\delta}{\delta x}\left(2xy-y^2e^y \right)=2y$$

Since the equation is exact, then there must be a function $F(x,y)$ satisfying:

$$\displaystyle \frac{\delta F}{\delta x}(x,y)=y^2$$

Integrating with respect to $x$, we find:

$$\displaystyle F(x,y)=\int y^2\,dx=xy^2+g(y)$$

To determine $g(y)$, we now take the partial derivative with respect to $y$ and substitute $$\displaystyle 2xy-y^2e^y=\frac{\delta F}{\delta y}$$:

$$\displaystyle 2xy-y^2e^y=2xy+g'(y)$$

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

Integrating with respect to $y$, we have:

$$\displaystyle g(y)=-\int y^2e^y\,dy$$

And so we have:

$$\displaystyle F(x,y)=xy^2-\int y^2e^y\,dy$$

Since the solution is given implicitly by $F(x,y)=C$, we may give the solution as:

$$\displaystyle xy^2-\int y^2e^y\,dy=C$$

If we wish to evaluate the integral in the result, we may use integration by parts. Let:

$$\displaystyle I=\int y^2e^y\,dy$$

Using:

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

$$\displaystyle dv=e^y\,\therefore\,v=e^y$$

we now have:

$$\displaystyle I=y^2e^y-2\int ye^y\,dy$$

Using IBP again:

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

$$\displaystyle dv=e^y\,\therefore\,v=e^y$$

we now have:

$$\displaystyle I=y^2e^y-2\left(ye^y-\int e^y\,dy \right)=e^y\left(y^2-2y+2 \right)+C$$

Since the constant of integration here is not important, and could just be combined with the constant in the solution above, the solution to the ODE can be expressed implicitly as:

$$\displaystyle xy^2-e^y\left(y^2-2y+2 \right)=C$$

To speeeed and any other guests viewing this topic, I invite and encourage you to post other differential equations problems here in our Differential Equations forum.

Best Regards,

Mark.