# Math Help - Rearranging Differential Equation

1. ## Rearranging Differential Equation

Hi, I was going over my notes and didnt understand one of the steps made in a calculation, was hoping someone could explain it to me.

Im trying to find an analytic solution for an ODE: dY/dX + X*Y = X
The integrating factor is I = e^((X^2)/2)

Multiplying the equation with the integrating factor

I*(dY/dX) + X*I*Y = X*I

This next step I dont follow where it gets simplified to:

(d/dX)*(Y*e^((X^2)/2)) = X*(e^((X^2)/2))

The following line's after are:

YI = I

Y = 1 + C*I

Any help would be appriciated, thank you.

2. The step you're wondering about is the heart of the integrating factor procedure. Suppose you had the DE

$\dfrac{dy}{dx}+P(x)\,y=Q(x),$ and you multiply through by the integrating factor $e^{\int P(x)\,dx}.$ Then you get

$e^{\int P(x)\,dx}\dfrac{dy}{dx}+e^{\int P(x)\,dx}P(x)\,y=Q(x)e^{\int P(x)\,dx}.$

The whole point of the procedure is that the LHS is now a total derivative. Indeed, if we examine

$\dfrac{d}{dx}\left[e^{\int P(x)\,dx} y\right]=\left(e^{\int P(x)\,dx}\right)\left(\dfrac{dy}{dx}\right)+y\left (\dfrac{d}{dx}e^{\int P(x)\,dx}\right)=
e^{\int P(x)\,dx}\,\dfrac{dy}{dx}+ye^{\int P(x)\,dx}\,P(x),$

which is just our new LHS after we multiplied through by the integrating factor.

Someone was clever enough to discover that the integrating factor was indeed $e^{\int P(x)\,dx},$ and after that, it became a procedure.

Does that clear things up a bit for you, perhaps?

3. Originally Posted by Miika89
This next step I dont follow where it gets simplified to:

(d/dX)*(Y*e^((X^2)/2)) = X*(e^((X^2)/2))
If you consider the product rule before this line you had

$vu'+uv' = f(x)$

$(uv)' = f(x)$

And integrating both sides

$uv = \int f(x)$

4. Yes, thank you.

If I didnt know this procedure is there a way of getting from I*(dY/dX) + X*I*Y = X*I to YI = I? Or would you suggest its too complicated and I just memorise how this procedure works?
------------------------------------------------------------------------------

Thank you both, I think pickslides just answered my 2nd question

5. Originally Posted by Miika89
Yes, thank you.

If I didnt know this procedure is there a way of getting from I*(dY/dX) + X*I*Y = X*I to YI = I? Or would you suggest its too complicated and I just memorise how this procedure works?
I say memorise it. It comes in very handy and enhances your understanding of calculus.

6. I'd say as well as memorising it i.e. that after you have multiplied by the Integrating Factor the LHS reduces to $\displaystyle \frac{d}{dx}(I\,y)$, get good at recognising Product Rule expansions, i.e. that $\displaystyle u\,\frac{dv}{dx} + v\,\frac{du}{dx} = \frac{d}{dx}(u\,v)$.

7. Not having gotten much further, Im stuck on how this next stage works:

y*I = I
y = 1 + C*e^-((x^2)/2)

I am assuming he has now integrated the RHS?

8. Given $\displaystyle I= e^{\frac{x^2}{2}}$

$\displaystyle Iy'+Ixy = xI$

Note $\displaystyle I'=Ix$ then

$\displaystyle (Iy)' = xI$

$\displaystyle Iy = \int xI~dx$

$\displaystyle e^{\frac{x^2}{2}}y = \int xe^{\frac{x^2}{2}}~dx$

Then by substitution $\displaystyle u = \frac{x^2}{2}$ integrate the right hand side.

Final step is to divide both sides by $\displaystyle e^{\frac{x^2}{2}}$