ODE + series (1 Viewer)

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

584
0
Hi, can someone help me with the following question? I need to solve the ODE using series.

[tex]
y'' + 4y' + 3y = 0
[/tex]

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].

[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...

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

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

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.
 
Use the initial conditions to get c0 and c1.
 
584
0
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?
 
584
0
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?
 

HallsofIvy

Science Advisor
41,626
821
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.
 
584
0
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.
 

saltydog

Science Advisor
Homework Helper
1,579
2
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_0=\text{arbitrary}[/tex]

[tex]a_1=\text{arbitrary}[/tex]

[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:

[tex]y(x)=Ae^{-x}+Be^{-3x}[/tex]

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:

[tex]a_0=A+B[/tex]

[tex]a_1=-(3A+B)[/tex]

this expression becomes:

[tex](A+B)-(3A+B)x+(3^2A+B)\frac{x^2}{2}-(3^3A+B)\frac{x^3}{6}[/tex]

or:

[tex](A-3Ax+3^2Ax^2/2-3^3Ax^3/6)+(B-Bx+Bx^2/2-Bx^3/6)[/tex]

or:

[tex]A\left(1-3x+\frac{(3x)^2}{2}-\frac{(3x)^3}{6}\right)+B(1-x+x^2/2-x^3/6)[/tex]

which is the first 4 terms of the power series:

[tex]A\sum_{n=0}^{\infty}\frac{(-1)^n(3x)^n}{n!}+B\sum_{n=0}^{\infty}\frac{(-1)^n(x)^n}{n!}[/tex]

or:

[tex]Ae^{-3x}+Be^{-x}[/tex]
 
Last edited:
584
0
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.
 

saltydog

Science Advisor
Homework Helper
1,579
2
Benny said:
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?
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:
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))
    ];
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.
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.
 
584
0
saltydog said:
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:
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))
];
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.

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.
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.
 

saltydog

Science Advisor
Homework Helper
1,579
2
Benny said:
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 disagree Benny. Here it is in Mathematica in clear terms:

Code:
coef=Table[0,{100}];
coef[[1]]=y(0);
coef[[2]]=y'(0);
For[n=3,n<=100,n++,

[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?

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.
Well, I'm just implying solutions are not always "neat".
 

The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top