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: ODE + series

  1. Oct 28, 2005 #1
    Hi, can someone help me with the following question? I need to solve the ODE using series.

    y'' + 4y' + 3y = 0

    Firstly, using the characteristic equation I know the general solution is of the form [tex]y\left( x \right) = Ae^{ - x} + Be^{ - 3x} [/tex]. So I know roughly what I should get.

    Anyway so if I used series to find the solution to the equation I would try [tex]y = \sum\limits_{n = 0}^\infty {c_n x^n } [/tex]. Then [tex]y' = \sum\limits_{n = 0}^\infty {c_{n + 1} \left( {n + 1} \right)x^n } \Rightarrow y'' = \sum\limits_{n = 0}^\infty {c_{n + 2} } \left( {n + 2} \right)\left( {n + 1} \right)x^n [/tex].

    Substituting into the DE: [tex]\sum\limits_{n = 0}^\infty {c_{n + 2} } \left( {n + 2} \right)\left( {n + 1} \right)x^n + 4\sum\limits_{n = 0}^\infty {c_{n + 1} \left( {n + 1} \right)x^n } + 3\sum\limits_{n = 0}^\infty {c_n x^n } = 0[/tex].

    \Rightarrow \sum\limits_{n = 0}^\infty {\left[ {c_{n + 2} \left( {n + 2} \right)\left( {n + 1} \right) + 4c_{n + 1} \left( {n + 1} \right) + 3c_n } \right]} = 0
    [/tex]...This step is only valid provided that the series for y, y', y'' converge in an interval containing x = 0? Anyway...

    \Rightarrow c_{n + 2} \left( {n + 2} \right)\left( {n + 1} \right) + 4c_{n + 1} \left( {n + 1} \right) + 3c_n = 0

    c_{n + 2} = \frac{{ - 4c_{n + 1} \left( {n + 1} \right) - 3c_n }}{{\left( {n + 2} \right)\left( {n + 1} \right)}} = - \frac{{4c_{n + 1} }}{{\left( {n + 2} \right)}} - \frac{{3c_n }}{{\left( {n + 2} \right)\left( {n + 1} \right)}}

    Ok I'm stuck at this point. I'm actually not really sure what to do. I know that I need an expression for coefficient of y in the original series that I substituted. I'm thinking that I need to solve for c_(n+2). I've seen examples where c_(n+2) is split into c_(2n) and c_(2n+1) so that expressions for the odd and even coefficients are found separately. Is this the general method used to solve second order ODEs using series? Any assistance would be good thanks.
  2. jcsd
  3. Oct 28, 2005 #2
    Use the initial conditions to get c0 and c1.
  4. Oct 28, 2005 #3
    I'm not sure what you mean when you say use the initial conditions. This isn't an IVP. Are you referring to some property of the series I substituted into the equation?
  5. Oct 29, 2005 #4
    Hmm it seems that there are no more complicated equations(ones where the derivatives have non constant coefficients) which can be solved fairly easily by making a slight index shift. So after the index shift, in addition to having a summation, there are also expressions like c_0, c_1x, c_2x^2 in the equation. In those cases I can just say c_0 = c_1 = c_2 = 0 and work from that. However, it doesn't seem possible to do that with this equation. Can someone please help me out?
  6. Oct 29, 2005 #5


    User Avatar
    Science Advisor

    Separting into even and odd powers won't help you here- the two functions that you KNOW you want, ex and e3x, both have even and odd powers. Looking at the e3x, you might want to focus on the terms that involve that "3cn".

    At first I found Hypermorphism's suggestion that you "Use the initial conditions to get c0 and c1" completely opaque- you aren't given any initial conditions- but then I finally realized what he is saying.
    The function f(x)= ex has f(0)= 1, f'(0)= 1. Since, in this power series, c0= f(0) and c1= f'(0), set c0= c1= 1 and see if that doesn't simplify things.
    g(x)= e3x has f(0)= 1, f'(0)= 3. Set c0= 1, c1= 3 and see what happens.
  7. Oct 29, 2005 #6
    Ok but to do that don't I need to 'use the answer.' Even for this equation when I know what my answer should look like, I'm just not sure if it is valid for me to use the answer(ie. linear combination of exp(-x) and exp(-3x)). But how would I solve an equation like y'' - 2xy' + y = 0 with series? For such an equation I don't know what I should be getting so I wouldn't be able to use initial conditions.
  8. Oct 30, 2005 #7


    User Avatar
    Science Advisor
    Homework Helper

    Benny, sometimes not so easy to reduce the relation into a nice summation expression. The objective is to reduce it to an expression that's managable.

    Using a power series representation for the solution in the form:

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

    I reduced the solution to the following recursive relationship:



    [tex]a_n=\frac{-4a_{n-1}}{n}-\frac{3a_{n-2}}{n(n-1)}\quad\text{for}\quad n\ge 2[/tex]

    Now, that's very managable right? Just calculate them recursively and it works fine. I did so for the first 100 in Mathematica. However, we know that the solution is also of the form:


    and therefore should be able to equate them. So lets look at the first 4 terms of the recursive relationship:

    [tex]y(x)=a_0+\frac{-3a_0}{2\cdot 1}x^2+a_1x+\frac{-4a_1}{2\cdot 1}x^2+\frac{-3a_1}{3\cdot 2}x^3+\frac{(-1)^2 4^2 a_1}{3\cdot 2}x^3+\frac{(-1)^2 4\cdot 3 a_0}{3\cdot 2\cdot 1}x^3[/tex]

    Now, if I let:



    this expression becomes:






    which is the first 4 terms of the power series:



    Last edited: Oct 30, 2005
  9. Oct 30, 2005 #8
    Thanks for your help Saltydog. I see that you've made an idex shift and it does make the recurvise relation look more simple. My main problem is recognising the pattern for the coefficients. With a_0 and a_1 arbitrary, after even just 1 more iteration (n=4) I would get a very complicated expression for a_4 in terms of a_0 and a_1 wouldn't I? I just don't understand why 'simple' equations such as y'' + 4y' + 3y = 0 seem to be so much more difficult to solve with series than something like y'' - 2xy' + y = 0.
  10. Oct 30, 2005 #9


    User Avatar
    Science Advisor
    Homework Helper

    They get complex only if you calculate them in terms of a0 and a1 but are rather easy to calculate if you calculate them sequentially which is what I did in Mathematica (used 0 and 1 for starters):

    Code (Text):
    coef = Table[0, {100}];
    coef[[1]] = 0;
    coef[[2]] = 1;
    For[n = 3, n <= 100, n++,
        coef[[n]] = -(4 coef[[n - 1]])/(n -
                  1) + (3 coef[[n - 2]])/((n - 1)(n - 2))
    You into non-linear dynamics right Benny? I suspect it's all a matter of critical points and bifurcations: It just "looks" simple to us but rather is a reflection of a bifurcation (adding the 'x') which qualitatively changes the solution dynamics which we observe as a change from difficult to simple.
  11. Oct 30, 2005 #10
    I'm not sure what you mean. Ultimately, if I was to solve the DE using series wouldn't I be looking for the nth coefficient in terms of some arbitrary starting points (eg. c_0 and c_1)? If so then I can't think of a way to do so without calculating everything in terms of those arbitrary constants. Even if I had ICs, this problem still seems like it would be horrible to work with.

    I've only had a few introductory classes on the things that you mentioned. So I don't really see the effect of adding the x in terms of the ideas you referred to. What I can see from having tried solving a few DEs with power series is that it makes it easier to eliminate either c_0 or c_1 so that I'm left with a relation between c_(n+2) and c_(n+1) or c_n.
  12. Oct 31, 2005 #11


    User Avatar
    Science Advisor
    Homework Helper

    I disagree Benny. Here it is in Mathematica in clear terms:

    Code (Text):


    [tex]coef[[n]]=-\frac{4 coef[[n-1]]}{(n-1)}-\frac{3 coef[[n-2]]}{(n-1)(n-2)}[/tex]

    [tex]y[x]:=\sum_1^{100} coef[[n]]x^{n-1}[/tex]

    Granted, Mathematica starts with index=1 so I have to make it a little messy. Note that the "arbitrary" constants are just the initial conditions right?

    Well, I'm just implying solutions are not always "neat".
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook