Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. May 7, 2010 #1
    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. jcsd
  3. May 8, 2010 #2

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Click on the [itex]\LaTeX[/itex] image below to see the code that generated it:

    [tex]y(x)=\sum_{n=0}^{\infty} c_n x^n[/tex]

    And also take a look at my sig:wink:

    Looks fine so far...
     
  4. May 8, 2010 #3
    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)

    [tex]x^n-1[/tex] (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.

    [tex]x^n^-^1[/tex] (2)

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

    please click on the code to see what im talking about.

    I totally dont understand the logic of this.. please help.. totally new to latex. thanks


    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?
     
  5. May 8, 2010 #4

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Just put your entire exponent (or subscript) inside curly brackets....i.e. x^{n-1} comes up as [itex]x^{n-1}[/itex]. 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.
     
  6. May 8, 2010 #5
    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.
    ?

    [tex]
    \sum_{n=0}^{\infty} c_n x^n^-^1
    [/tex]
     
  7. May 8, 2010 #6
    ok thanks gabbag, ill try refresh
     
  8. May 8, 2010 #7
    [tex]
    y(x)=\sum_{n=0}^{\infty} c_n x^n
    [/tex]

    [tex]
    y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}
    [/tex]

    [tex]
    y''(x)=\sum_{n=2}^{\infty} (n-1)nc_n x^{n-2}
    [/tex]

    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:

    [tex]
    y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}
    [/tex]
    =[tex]
    =\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n}
    [/tex]

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

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

    [tex]
    \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
    [/tex]

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

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

    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
  9. May 8, 2010 #8
    wow latex makes it look so much nicer.. and easier to read!
     
  10. May 8, 2010 #9

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Careful, if [itex]n\to n+1[/itex], then [itex]c_n\to c_{n+1}[/itex]

    [tex]y'(x)=\sum_{n=1}^{\infty} nc_n x^{n-1}=\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n}[/tex]

    And similar results apply to [itex]y''(x)[/itex]
     
  11. May 8, 2010 #10
    I edited my post #7 to reflect the changes to C_n
    IS it OK now? thanks
     
  12. May 8, 2010 #11

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Looks good to me... now use the fact that [itex]a_0+a_1x+a_2x^2+\ldots[/itex] can only be zero for all [itex]x[/itex], if all the [itex]a_n[/itex] are zero.
     
  13. May 8, 2010 #12
    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
     
  14. May 8, 2010 #13
    Is this valid thing i can do to the middle term
    [tex]
    (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}
    [/tex]

    ?

    that way i can get rid of the lone x.
     
  15. May 8, 2010 #14

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Your first step is correct, but

    [tex]\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}[/tex]
     
  16. May 8, 2010 #15
    you saw x at start of equality though, right?
     
  17. May 8, 2010 #16
    please disregard last post...
    I am confused about how the subscript of the constant relates to coefficient of constant and the powers of x.
    thanks
     
  18. May 8, 2010 #17

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

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

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

    and

    [tex]\sum_{n=1}^{\infty} nc_{n} x^{n}=c_1x+2c_2x^2+3c_3x^3+\ldots[/tex]

    so, [tex]\sum_{n=0}^{\infty} (n+1)c_{n+1} x^{n+1}=\sum_{n=1}^{\infty} nc_{n} x^{n}[/tex]

    Or am I misunderstanding your question?
     
  19. May 8, 2010 #18
    OK so after the last correction I am left with:

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

    so next i should solve this equation: [tex] (n+1)(n+2)c_{n+2} + nc_n + 2c_n = 0
    [/tex] for [tex]c_{n+2}[/tex], correct?
    thanks
     
  20. May 8, 2010 #19
    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 ?
     
  21. May 8, 2010 #20

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

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

    [tex]\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}[/tex]
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook