1. ## Simple ODE

Solve using the power series method:

$\displaystyle 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:

$\displaystyle 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:

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

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

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

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

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

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

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

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

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

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

$\displaystyle y = Ae^{-\frac{1}{2}x^2}$, where $\displaystyle 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:

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

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

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

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

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

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

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

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

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

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

$\displaystyle y = Ae^{-\frac{1}{2}x^2}$, where $\displaystyle 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:

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

Can anyone show the steps to do this?

Let

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

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

Now substituing these into the equation gives

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

$\displaystyle \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

$\displaystyle 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 $\displaystyle n \to n-2$ to get

$\displaystyle 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

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

$\displaystyle (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 $\displaystyle a_1=0$

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

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