# Differential equations with series solutions

1. Nov 15, 2012

### th3chemist

1. The problem statement, all variables and given/known data

I have to solve the differential equation xy'' + y' + xy = 0 ; x_o = 0

2. Relevant equations

3. The attempt at a solution

I know that a solution is y= sum from 0 to infinity (an (x-1)^n)
I then differentiate it twice to get y' = sum from 1 to inifinity (nan(x-1)^(n-1))
and y'' = sum from 2 to infinity (n(n+1)an(x-1)^(n-2))

then sub into the equation.

Once It's in the equation I multiply y'' and y by (x-1) and add the correcting factor. Which would give me adding 5 series in total.
Now, I just don't know how to add these series together. The n has to be same. And the exponent on (x-1) has to be the same as well.

I'm not sure how to write this out so it looks nicer.

2. Nov 15, 2012

### jackmell

Approach this more carefully: do you wish to expand the solution about the origin or the point x=1? The reason I ask is that you state the power series is in terms of (x-1). But if you wish to expand it about the point x=1, then you first need to make a change of variable:

$$v=x-1$$

and then expand the function about the point v=0, get the solution in terms of v, then switch the variable v=x-1.

But if you're expanding around the singular point x=0, then you need to form the power series in terms of $x^{n+c}$.

3. Nov 15, 2012

### th3chemist

I have no clue what I'm doing anymore. To add series together they have to have the same exponent on x and the n value also has to be the same. But I can't seem to get that. I know I have to so I can get the recurrence relation. And the question asks to find the first four terms.

4. Nov 15, 2012

### tiny-tim

hi th3chemist!
there isn't really any way of showing you how to do this without the actual series equations

can you type them out for us?

5. Nov 15, 2012

### th3chemist

I'm not sure how to use latex :(

6. Nov 15, 2012

### tiny-tim

type two sharps at the beginning of each line, and two sharps at the end

(copy this: # if necessary )

type ^{n-1} for up, and _{n-1} for down

type \Sigma for ∑

7. Nov 15, 2012

### th3chemist

$\sum n(n+1)(a_{n})(x-1)^{n-1}$ + $\sum n(n+1)(a_{n})(x-1)^{n-2}$ + $\sum (n)(a_{n})(x-1)^{n-1}$ + $\sum a_{n}(x-1)^{n+1}$ + $\sum a_{n}(x-1)^{n}$

that looks about right. Idk how to put the n = at the bottom. But their upper limit is infinity.For the first two, n = 2, the middle one is n=1, and the last two n= 0. And let the hell being :(.

8. Nov 15, 2012

### jackmell

You have:

$$xy''+y'+xy=0$$

so if we let:

$$y(x)=\sum_{n=0}^{\infty} a_n (x-1)^n$$

then:

$$y'(x)=\sum_{n=0}^{\infty} na_n(x-1)^{n-1}$$
$$y''(x)=\sum_{n=0}^{\infty} n(n-1)a_n(x-1)^{n-2}$$

Now substitute those expressions for the derivatives into the DE. I'll do the first:

$$xy''=x\sum_{n=0}^{\infty} n(n-1)a_n(x-1)^{n-2}=\sum_{n=0}^{\infty} n(n-1)a_n(x-1)^{n-1}$$

Try and do the other two and substitute all three into the DE and set it equal to zero, then we'll have two steps left: adjust the summation indexes so that the power on x are the same in each series, then form the recurrence relation.

9. Nov 15, 2012

### th3chemist

I'm not sure how you multiplied x * (x-1) with each other :(

10. Nov 15, 2012

### jackmell

I think I made a mistake above. I should not have expanded the function like that but rather made the substitution v=x-1 and then obtain:

$$\sum_{n=0}^{\infty} n(n-1) a_n v^{n-1} +\sum_{n=0}^{\infty}n(n-1) a_n v^{n-2}+\sum_{n=0}^{\infty} n a_n v^{n-1}+ \sum_{n=0}^{\infty} a_n v^{n+1}+\sum_{n=0}^{\infty} a_n v^n=0$$

Tell you what , I won't say anything else until I work it out myself so as not to cause confussion for you.

11. Nov 15, 2012

### tiny-tim

ok, now you need to get all those exponents the same (xn, say)

to do this, you change the lower limit (the start point) of the ∑, eg …

$\sum_{n=k}^{\infty} a_{n-1}x^{n-1} =\ \sum_{n=k-1}^{\infty} a_nx^n$

12. Nov 15, 2012

### th3chemist

It's my 4th one that I cannot seem to shift down. Like it starts at n=0. so the smallest value it starts with is x. Thought I pressume I will have to rip that function out. But I don't know :(. I used k=n-1 , k = n-2 , k = n-1 , k = n+1 and the last one is fine on it's own.

13. Nov 15, 2012

### SammyS

Staff Emeritus
What is the significance of x0 = 0 ? Were you to expand about x = 0 rather than x = 1 ?
There's a mistake in your second derivative:

If $\displaystyle \ y=\sum_{n=0}^{\infty}a_n(x-1)^{n}\,,\$ then $\displaystyle \ y''=\sum_{n=0}^{\infty}n(n-1)a_n(x-1)^{n-2}\ .\$

14. Nov 15, 2012

### th3chemist

Oh! It's x = 1, sorry.

15. Nov 15, 2012

### SammyS

Staff Emeritus
That should be:

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

This can be written as:

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

16. Nov 15, 2012

### th3chemist

But those don't start at the same n. How can you find the recurrence relation then? :(

17. Nov 15, 2012

### SammyS

Staff Emeritus
What do you get when n=0?
You do get a relation among a2, a1, and a0.​

For n ≥ 1 ,
You get a different relation among an+2, an+1, and an.​

18. Nov 15, 2012

### th3chemist

sigh :(
I thought you're supposed to turn the whole thing into one series. Then determine a_n+2

19. Nov 16, 2012

### tiny-tim

you can turn the whole thing into one series, with add-ons

you take the highest lower limit (in this case, 1), and write them all starting at 1,

and then you add on separately any terms that you've had to leave out

ie any terms less than 1 (in this case, only 0)

20. Nov 16, 2012

### th3chemist

Can't I get all of them to start at n=2 if I remove some terms from it?