# Non homogeneous ODE particular solution using power series

1. Jul 20, 2011

### cybla

1. The problem statement, all variables and given/known data
Find the particular solution to the ODE y"+y=x using power series

2. Relevant equations

y=$\sum(a_{n}x^{n})$

3. The attempt at a solution

i tried plugging in y=$\sum(a_{n}x^{n})$ into the original equation and comparing coefficients of x to the first degree, but i am not sure how to really compare them.

2. Jul 20, 2011

### ehild

Try to write out the power series: y=a0+a1x+a2x2+a3x3 .... Find the second derivative and plug back into the DE. Collect and compare the x terms on equal power, they must be equal on both sides of the equation.

ehild

3. Jul 20, 2011

### cybla

Ok... so

y=a$_{0}$+a$_{1}$x+a$_{2}$x$^{2}$+a$_{3}$x$^{3}$+a$_{4}$x$^{4}$+a$_{5}$x$^{5}$...

y"= 2a$_{2}$+6a$_{3}$x+12a$_{4}$x$^{2}$+20a$_{5}$x$^{3}$+30a$_{6}$x$^{4}$+42a$_{7}$x$^{5}$...

x= 0+x+0x$^{2}$+0x$^{3}$+0x$^{4}$+0x$^{5}$....

y"+y=x

2a$_{2}$+6a$_{3}$x+12a$_{4}$x$^{2}$+20a$_{5}$x$^{3}$+30a$_{6}$x$^{4}$+42a$_{7}$x$^{5}$...+a$_{0}$+a$_{1}$x+a$_{2}$x$^{2}$+a$_{3}$x$^{3}$+a$_{4}$x$^{4}$+a$_{5}$x$^{5}$...
= 0+x+0x$^{2}$+0x$^{3}$+0x$^{4}$+0x$^{5}$....

a$_{0}$+2a$_{2}$=0
a$_{1}$+6a$_{3}$=1
a$_{2}$+12a$_{4}$=0

etc.

do i write a linear system of equations for 3 variables and solve it in order to find some of the a values? Or i should i use the fact from the undetermined coefficients method that the form must be y=A + Bx..... and then solve?

Last edited: Jul 20, 2011
4. Jul 20, 2011

### ehild

You need to find one particular solution, so you have quite great freedom to choose the first a-s. And a0 and a1 determine all the other coefficients. Notice that choosing a0=0 all other coefficients of even index are also zero. What happens if you choose a1=1?

ehild

5. Jul 20, 2011

### cybla

So the choice of a's (in this case a$_{0}$ and a$_{1}$) is up to me, but the final answer has to satisfy the DE, right?

Last edited: Jul 20, 2011
6. Jul 20, 2011

### ehild

The choice of the first two a-s, a0 and a1 is up to you, and all the others are obtained from them. The resultant power series is solution of the DE. But you need something simple, and an infinite power series is not that. So you may try to terminate it. If one of the a2k coefficients is zero, then a2(k-1)=0 and a2(k+1)=0 so all the even index a-s are zero. The same with the a2k+1 coefficients. If a2k+1=0, a2(k+1)+1=0 and so on, and also a2k-1=0 so all the odd-index a-s are zero but the first one, a1. That is you can find a partial solution which has only one term. What is it then?

ehild

7. Jul 20, 2011

### cybla

alright i understand. So for this problem if a$_{0}$=0 and a$_{1}$=1 then the solution is y=x