# Math Help - Simple ODE

1. ## Simple ODE

Solve using the power series method:

$y' + xy = 0, y(0) = 1$

Can anyone show the steps to do this?

2. Originally Posted by flipperpk
Solve using the power series method:

$y' + xy = 0, y(0) = 1$

Can anyone show the steps to do this?
Why use the power series method? It's seperable and can also be solved using an integrating factor...

Seperating:

$\frac{dy}{dx} + xy = 0$

$\frac{dy}{dx} = -xy$

$\frac{1}{y}\,\frac{dy}{dx} = -x$

$\int{\frac{1}{y}\,\frac{dy}{dx}\,dx} = \int{-x\,dx}$

$\int{\frac{1}{y}\,dy} = -\frac{1}{2}x^2 + C_1$

$\ln{|y|} + C_2 = -\frac{1}{2}x^2 + C_1$

$\ln{|y|} = -\frac{1}{2}x^2 + C$, where $C = C_1 - C_2$

$|y| = e^{-\frac{1}{2}x^2 + C}$

$|y| = e^Ce^{-\frac{1}{2}x^2}$

$y = \pm e^C e^{-\frac{1}{2}x^2}$

$y = Ae^{-\frac{1}{2}x^2}$, where $A = \pm e^C$.

Now use your initial condition to find A.

3. Originally Posted by Prove It
Why use the power series method? It's seperable and can also be solved using an integrating factor...

Seperating:

$\frac{dy}{dx} + xy = 0$

$\frac{dy}{dx} = -xy$

$\frac{1}{y}\,\frac{dy}{dx} = -x$

$\int{\frac{1}{y}\,\frac{dy}{dx}\,dx} = \int{-x\,dx}$

$\int{\frac{1}{y}\,dy} = -\frac{1}{2}x^2 + C_1$

$\ln{|y|} + C_2 = -\frac{1}{2}x^2 + C_1$

$\ln{|y|} = -\frac{1}{2}x^2 + C$, where $C = C_1 - C_2$

$|y| = e^{-\frac{1}{2}x^2 + C}$

$|y| = e^Ce^{-\frac{1}{2}x^2}$

$y = \pm e^C e^{-\frac{1}{2}x^2}$

$y = Ae^{-\frac{1}{2}x^2}$, where $A = \pm e^C$.

Now use your initial condition to find A.
I appreciate the help, but my professor wants us to use the power series method.

4. Well, you could get the final answer and then express it as a power series...

5. Originally Posted by flipperpk
Solve using the power series method:

$y' + xy = 0, y(0) = 1$

Can anyone show the steps to do this?

Let

$y=\sum_{n=0}^{\infty}a_nx^n$ Then

$y'=\sum_{n=1}^{\infty}na_nx^{n-1}$

Now substituing these into the equation gives

$\sum_{n=1}^{\infty}na_nx^{n-1}+x\sum_{n=0}^{\infty}a_nx^n=0$

$\sum_{n=1}^{\infty}na_nx^{n-1}+\sum_{n=0}^{\infty}a_nx^{n+1}=0$

Now we take the first term out of the 1st series to get

$a_1+\sum_{n=2}^{\infty}na_nx^{n-1}+\sum_{n=0}^{\infty}a_nx^{n+1}=0$

Now reindex the first series with $n \to n-2$ to get

$a_1+\sum_{n=0}^{\infty}(n+2)a_{n+2}x^{n+1}+\sum_{n =0}^{\infty}a_nx^{n+1}=0$

Now combing the sums gives

$a_1+\sum_{n=0}^{\infty}[(n+2)a_{n+2}+a_n]x^{n+1}=0$

$(n+2)a_{n+2}+a_n=0 \implies a_{n+2}=-\frac{a_n}{n+2}$

Also note that the above equation implies that $a_1=0$

Using your intial condition you will find that $a_0=1$

With the relation about you can find all of the coeffeints of the power series.