Differential equation using power series method

8 replies · 5K views · last reply
Graham87
Messages
72
Reaction score
16
TL;DR
Differential equation using power series method
I am attempting to solve this differential equation with power series
Typeset differential equation (x + 3)y'(x) + 2y(x) = 0 with the initial condition y(1) = 2 on the line below.


I came with the following solution but I doubt it is correct.
Three lines of math: f(x) = sum from k=0 to infinity of c_k x^k; equals sum from k=0 to infinity of c_k (x - 1)^k; f'(x) = sum from k=1 to infinity of k c_k (x - 1)^(k-1).

Four aligned equations in a power series solution of (x+3)y'(x) + 2y(x) = 0, re-indexed around x-1 with sums over k from 0 to infinity and k from 1 to infinity, ending in a sum of ((x+3)(k+1)c_{k+1} + 2c_k)(x-1)^k = 0.


Since x=1 we get:
Handwritten recurrence derivation: c_{k+1} = -2c_k / ((x+3)(k+1)), then c_{k+1} = -2c_k / (4(k+1)), then = -c_k / (2k+2).

Recurrence relations for coefficients c0 to c4: c0 = 2, c1 = -c0/(2k+2) = -1/2, c2 = 1/12 = 1/(2^2·2!), c3 = -1/96 = -1/(2^3·3!), c4 = 1/960 = 1/(2^4·4!).

Two typeset equations: c_k = (-1)^k / (2^(k-1) k!), and f(x) = c_0 + sum from k=1 to infinity of (-1)^k / (2^(k-1) k!) times (x - 1)^k.

I doubt its correctness because it looks messy. Also the convergence radian R goes to 0, giving only a solution for x=0 which is not correct, since the beginning condition states y(1)=2.
Handwritten-style typeset working for the radius of convergence: R equals the limit as k goes to infinity of |a_n / a_(n+1)|, then the limit as k goes to infinity of 2^k (k+1)(-1)^k over (-1)^(k+1) 2^(k-1) k!, which tends to 0.
 
Attachments
  • Four lines of series algebra: (x + 3)y'(x) + 2y(x) = 0, then the power series substitutions with sums over k of k c_k (x - 1)^(k-1), c_k (x - 1)^k and (k + 1) c_(k+1) (x - 1)^k, ending with the combined sum over k of ((x + 3)(k + 1)c_(k+1) + 2c_k)(x - 1)^k = 0.
    Screenshot 2023-12-20 140022.png
    9.4 KB · Views: 150
Last edited:
If you set [itex]y(x) = \sum_{k=0}^\infty c_k(x - 1)^k[/itex] then [itex]x[/itex] cannot appear in the recurrence relation for [itex]c_k[/itex]; the [itex]c_k[/itex] are supposed to be independent of [itex]x[/itex]. You need to write [tex]\begin{split}(x + 3)y' &= <br /> (x - 1 + 4)\sum_{k=1}^\infty kc_k (x-1)^{k-1} \\<br /> &= \sum_{k=1}^\infty kc_k (x - 1)^k + 4\sum_{k=1}^\infty kc_k (x- 1)^{k-1} \end{split}[/tex] and then compare coefficients of [itex](x-1)^k[/itex].
 
pasmith said:
If you set [itex]y(x) = \sum_{k=0}^\infty c_k(x - 1)^k[/itex] then [itex]x[/itex] cannot appear in the recurrence relation for [itex]c_k[/itex]; the [itex]c_k[/itex] are supposed to be independent of [itex]x[/itex]. You need to write [tex]\begin{split}(x + 3)y' &=<br /> (x - 1 + 4)\sum_{k=1}^\infty kc_k (x-1)^{k-1} \\<br /> &= \sum_{k=1}^\infty kc_k (x - 1)^k + 4\sum_{k=1}^\infty kc_k (x- 1)^{k-1} \end{split}[/tex] and then compare coefficients of [itex](x-1)^k[/itex].
Oh, I tried that too but did not go through it completely. So I get thefollowing:
Equation: sum from k=1 to infinity of k c_k (x-1)^k, plus 4 times sum from k=0 to infinity of (k+1) c_{k+1} (x-1)^k, plus 2 times sum from k=0 to infinity of c_k (x-1)^k, equals 0.

System of recurrence equations for power series coefficients: 4c1 + 2c0 = 0, c1 + 8c2 + 2c1 = 0, 2c2 + 12c3 + 2c2 = 0, 3c3 + 16c4 + 2c3 = 0, followed by an ellipsis.

List of power series coefficients: c0 = 2, c1 = -1, c2 = 3/8, c3 = -1/8, c4 = 5/128, followed by an ellipsis.

However the general solution formula does not seem obvious. Where might I have gone wrong?
 
Last edited:
You can write the ODE as [tex] \sum_{k=0}^\infty ( kc_k + 4(k+1)c_{k+1} + 2c_k )(x-1)^k = 0[/tex] from which it follows that [tex] c_{k+1} = -\frac{k+2}{4(k+1)}c_k, \quad k \geq 0.[/tex] This linear first-order recurrence can be easily solved, since the general solution of [tex] a_{k+1} = f(k)a_k[/tex] is [tex] a_k = a_0 \prod_{r=0}^{k-1} f(r).[/tex] Note that by inspection [itex]y = A(x + 3)^{-2}[/itex] is the general solution of [itex](x + 3)y' + 2y = 0[/itex] so that you can check your answer against [tex]\begin{split}<br /> y(x) &= 16y(1)(x + 3)^{-2} \\<br /> &= 16y(1)(x - 1 + 4)^{-2} \\<br /> &= y(1) \left(1 + \frac{x-1}{4}\right)^{-2} \\<br /> &= y(1) \left(1 - 2\frac{x-1}4 + \dots<br /> + \frac{(-2)(-3) \cdots (-n - 1)}{n!}\left(\frac{x-1}4\right)^n + \dots \right)\end{split}[/tex]
 
pasmith said:
You can write the ODE as [tex] \sum_{k=0}^\infty ( kc_k + 4(k+1)c_{k+1} + 2c_k )(x-1)^k = 0[/tex] from which it follows that [tex] c_{k+1} = -\frac{k+2}{4(k+1)}c_k, \quad k \geq 0.[/tex] This linear first-order recurrence can be easily solved, since the general solution of [tex] a_{k+1} = f(k)a_k[/tex] is [tex] a_k = a_0 \prod_{r=0}^{k-1} f(r).[/tex] Note that by inspection [itex]y = A(x + 3)^{-2}[/itex] is the general solution of [itex](x + 3)y' + 2y = 0[/itex] so that you can check your answer against [tex]\begin{split}<br /> y(x) &= 16y(1)(x + 3)^{-2} \\<br /> &= 16y(1)(x - 1 + 4)^{-2} \\<br /> &= y(1) \left(1 + \frac{x-1}{4}\right)^{-2} \\<br /> &= y(1) \left(1 - 2\frac{x-1}4 + \dots<br /> + \frac{(-2)(-3) \cdots (-n - 1)}{n!}\left(\frac{x-1}4\right)^n + \dots \right)\end{split}[/tex]
I tried that, but I get stuck in the manipulation on the most left sum to k=0?
Equation: sum from k=1 to infinity of k c_k (x-1)^k, plus 4 times sum from k=0 to infinity of (k+1) c_{k+1} (x-1)^k, plus 2 times sum from k=0 to infinity of c_k (x-1)^k, equals 0.

From your answer it turned to this somehow?
Equation: sum from k=0 to infinity of k c_k (x - 1)^k, plus 4 times sum from k=0 to infinity of (k + 1) c_{k+1} (x - 1)^k, plus 2 times sum from k=0 to infinity of c_k (x - 1)^k, equals 0.

Shouldn't the most left term be
Summation from k = 0 to infinity of (k + 1) c_{k+1} (x - 1)^{k+1}, written as an infinite series in powers of (x - 1).
 
Last edited:
No; [tex] (x-1)y' = \sum_{k=1}^\infty kc_k(x-1)^k = \sum_{k=0}^\infty kc_k(x-1)^k[/tex] because [itex]0c_0(x-1)^0 = 0[/itex].
 
pasmith said:
No; [tex] (x-1)y' = \sum_{k=1}^\infty kc_k(x-1)^k = \sum_{k=0}^\infty kc_k(x-1)^k[/tex] because [itex]0c_0(x-1)^0 = 0[/itex].
Yeah, I realised that too! Thanks a lot!
 
pasmith said:
No; [tex] (x-1)y' = \sum_{k=1}^\infty kc_k(x-1)^k = \sum_{k=0}^\infty kc_k(x-1)^k[/tex] because 0c0(x−1)0=0.
Are you sure about this?
I did like this:
Four stacked power series equations with summation over k from 0 or 1 to infinity, reindexing step by step to reach a single sum equal to zero: sum of ((x-1)kc_k + 4(k+1)c_{k+1} + 2c_k)(x-1)^k = 0.

And since x=1 we get the following
Recurrence relation for power series coefficients: c_{k+1} = -c_k(2 + (x - 1)k) / (4(k + 1)), then = -c_k / (2(k + 1)).

And eventually
Typeset list of coefficients: c0 = 2, c1 = -1, c2 = 1/4, c3 = -1/24, c4 = 1/192.

Typeset equations listing coefficients c1 = -1, c2 = 1/2^2, c3 = 1/(2^3 times 3), c4 = 1/(2^4 times 3 times 4), then ck = (-1)^k / (2^k times k!), and f(x) equals the sum from k=0 to infinity of (-1)^k over (2^k times k!) times (x - 1)^k.
 
The fundamental issue here is that [tex](x- 1)\sum_{k=1}^\infty kc_k(x-1)^{k-1} = \sum_{k=1}^\infty kc_k(x-1)^{k} = \sum_{k=0}^\infty kc_k(x-1)^k.[/tex]