# Homework Help: USing Series solutions to solve DE (please check my work, thanks)

1. May 7, 2010

### darryw

1. The problem statement, all variables and given/known data
solve the DE using power series about x_0 = 0

y'' + xy' + 2y = 0

so, i want a solution in form of y = [sum from n=0 to n=infinity]c_n x^n

(i hope this makes sense, i dont know how to get summation symbol)

y = [sum from n=0 to n=infinity]c_n x^n

y' = [sum from n=0 to n=infinity]nc_n x^(n-1)

y'' = [sum from n=0 to n=infinity](n-1)n c_n x^(n-2)

then plug these values into DE..
i just need to know if i am correct so far..then i will proceed..thanks

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. May 8, 2010

### gabbagabbahey

Click on the $\LaTeX$ image below to see the code that generated it:

$$y(x)=\sum_{n=0}^{\infty} c_n x^n$$

And also take a look at my sig

Looks fine so far...

3. May 8, 2010

### darryw

I dont understand latex at all.
I enter the exact same code and it gives me two different versions of it..

heres my example.. i want it to read x to the power of (n-1). (please look at the code)

$$x^n-1$$ (1)

so then i change it so that theres a hat after minus sign and a hat after 1,and it gives me desired symbols.

$$x^n^-^1$$ (2)

but then when i copy and paste (2) it reverts back to (1) even though it has the code for (2)
$$x^n^-^1$$ (3)

EDIT: OK so i noticed that as i submitted reply it modified the code. So is previewing latex unreliable or something? ??

So just to clarify, when i was previewing the message, (3) looked just like (1) even though it had the code for (2). That sounds kinda weird but that is what was happening.. why?

4. May 8, 2010

### gabbagabbahey

Just put your entire exponent (or subscript) inside curly brackets....i.e. x^{n-1} comes up as $x^{n-1}$. Also, the images won't always appear properly on your screen when you preview/post them even if you've typed the code in correctly....just hit the refresh button once to see if it comes up properly.

5. May 8, 2010

### darryw

OK Ive been doing some experimenting and noticed that when i preview a latex image, for some reason it shows the previous latex image rather than the one im trying to preview. Is this normal?
for example, when i initially tried to preview the image below, it previewed x to the power of (n-1). But when i clicked submit, it shows the correct image.
?

$$\sum_{n=0}^{\infty} c_n x^n^-^1$$

6. May 8, 2010

### darryw

ok thanks gabbag, ill try refresh

7. May 8, 2010

### darryw

$$y(x)=\sum_{n=0}^{\infty} c_n x^n$$

$$y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}$$

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

but before i insert into DE, I want all the indices (is that right word?) to match (so they all go from n=0 to infinity) so i modifiy y' and y'' to get the following:

$$y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}$$
=$$=\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n}$$

$$y''(x)=\sum_{n=2}^{\infty} (n-1)nc_n x^{n-2}$$
$$=\sum_{n=0}^{\infty} (n+1)(n+2)c_{n+2} x^{n}$$

then, inserting into y'' + xy' + 2y = 0, i get..

$$\sum_{n=0}^{\infty} (n+1)(n+2)c_{n+2} x^{n} + (x) \sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n} + (2) \sum_{n=0}^{\infty} c_n x^n = 0$$

combining sums and factoring out the x^n...

$$\sum_{n=0}^{\infty} x^n [(n+1)(n+2)c_{n+2} + (x) (n+1)c_{n+1} + 2c_n] = 0$$

is this correct so far?? If so, i dont know what to do with the lone x still in the brackets. Thanks for any help

Last edited: May 8, 2010
8. May 8, 2010

### darryw

wow latex makes it look so much nicer.. and easier to read!

9. May 8, 2010

### gabbagabbahey

Careful, if $n\to n+1$, then $c_n\to c_{n+1}$

$$y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}=\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n}$$

And similar results apply to $y''(x)$

10. May 8, 2010

### darryw

I edited my post #7 to reflect the changes to C_n
IS it OK now? thanks

11. May 8, 2010

### gabbagabbahey

Looks good to me... now use the fact that $a_0+a_1x+a_2x^2+\ldots$ can only be zero for all $x$, if all the $a_n$ are zero.

12. May 8, 2010

### darryw

thanks but could you elaborate a little bit on that? I think its the taylor expansion that is confusing me.. As I understand it, i thought everything in the brackets must = 0, so i would solve that equation and find what C_n is, and that is the recursive relation right?
if so, then how does that a_0 + a_1x etc fit into this?? thanks

13. May 8, 2010

### darryw

Is this valid thing i can do to the middle term
$$(x) \sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n} = \sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1} = \sum_{n=0}^{\infty} (n)c_{n+1} x^{n}$$

?

that way i can get rid of the lone x.

14. May 8, 2010

### gabbagabbahey

Your first step is correct, but

$$\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1}=\sum_{n=1}^{\infty} nc_{n} x^{n}\neq \sum_{n=0}^{\infty} (n)c_{n+1} x^{n}$$

15. May 8, 2010

### darryw

you saw x at start of equality though, right?

16. May 8, 2010

### darryw

I am confused about how the subscript of the constant relates to coefficient of constant and the powers of x.
thanks

17. May 8, 2010

### gabbagabbahey

just plug in numbers for "n" (aka expand each sum)

$$\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1}=c_1x+2c_2x^2+3c_3x^3+\ldots$$

and

$$\sum_{n=1}^{\infty} nc_{n} x^{n}=c_1x+2c_2x^2+3c_3x^3+\ldots$$

so, $$\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1}=\sum_{n=1}^{\infty} nc_{n} x^{n}$$

Or am I misunderstanding your question?

18. May 8, 2010

### darryw

OK so after the last correction I am left with:

$$\sum_{n=0}^{\infty} x^n [(n+1)(n+2)c_{n+2} + nc_n + 2c_n] = 0$$

so next i should solve this equation: $$(n+1)(n+2)c_{n+2} + nc_n + 2c_n = 0$$ for $$c_{n+2}$$, correct?
thanks

19. May 8, 2010

### darryw

that was kinda my question, but its small thing actually i think i understand that pasrt now.
but am i proceeding correctly so far (up to post #18) ? that is, next i should solve for c_n+2 ?

20. May 8, 2010

### gabbagabbahey

That's not quite correct. The summation in you middle term start at one, not zero. So, you should have:

\begin{aligned}0 &= \sum_{n=0}^{\infty} x^n [(n+1)(n+2)c_{n+2} + 2c_n]+\sum_{n=1}^{\infty}nc_nx^n \\ &= 2c_2+2c_0+\sum_{n=1}^{\infty} x^n [(n+1)(n+2)c_{n+2}+nc_n + 2c_n] \end{alinged}

21. May 8, 2010

### darryw

OK I see what you were saying s few posts ago then..
but given that one of the terms starts at n=1, wouldnt it have been better to just leave the middle term in form $$\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1}$$

i mean, if i change it to n=1, then that means i have to change the other 2 terms to match, right?

22. May 8, 2010

### gabbagabbahey

But then your sum would have terms with both $x^n$ and $x^{n+1}$ in it and you wouldn't simply be able to compare coefficients.

Not necessarily, you can just take out the n=0 term:

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

Which is exactly what I did in my last post (that's where the $2c_0+2c_2$ came from).

23. May 8, 2010

### darryw

do u think there is there a mistake on this page of lecture? he never changes it to n=1.
(no big deal if u dont want to look at this) thanks

#### Attached Files:

• ###### lecturepg39.pdf
File size:
52.2 KB
Views:
54
24. May 8, 2010

### gabbagabbahey

Yeah, there's definitely an error in that lecture.

25. May 8, 2010

### darryw

OK so $$[(n+1)(n+2)c_{n+2}+nc_n + 2c_n] = 0$$
and solve for c_n+2, correct?
if that is right, why solve for c_n+2? (why not c_n or c_n+1 for that matter?)