LECTURE 8 Solving Differential Equations Using Power Series We are now going to employ power series to find solutions to differential equations of the form () y + p(x)y + q(x)y = 0 where the functions p(x) and q(x) are polynomials. Let us begin with a simple example. Example 8.. Given that y(x) satisfies y + y + x 2 y = 0 y(0) = y (0) = 2 Write down the first four terms of the Taylor Expansion of y(x) about x = 0. The Taylor expansion of y(x) about x = 0 is the power series y (n) (0) x n (2) n! = y(0) + y (0)x + 2 y (0)x 2 + y (0)x 3 + 24 yiv (0)x 4 + From the initial conditions we know that y(0) = y (0) = 2 We can use the differential equation to determine the values of all the higher derivatives of y(x) at x = 0. This is done as follows. Isolating the y term on the left hand side of the differential equation we obtain (3) y (x) = y (x) x 2 y(x) Evaluating (3) at x = 0 yields (4) y (0) = (2) (0) 2 () = 2 To obtain y (0) we can differentiate both sides of (3) and get y (x) = y (x) = 2xy (5) y (x) = y (x) 2xy(x) x 2 y (x) We can now evaluate (5) at x = 0 to obtain y (0) = y (0) 2(0)y(0) (0) 2 y (0) = y (0) = 2 where we have used (4) to evaluate y (0). Continuing in the same manner we can differentiate (5) to obtain y iv (x) = y (x) 2y(x) 2xy(x) 2xy (x) x 2 y (x) 80
8. SOLVING DIFFERENTIAL EQUATIONS USING POWER SERIES 8 which upon evaluation at x = 0 yields y iv (0) = y (0) 2y(0) 2(0)y(0) 2(0)y (0) 2(0)y (0) (0) 2 y (0) = y (0) 2y(0) = 2 2 = 4 We now plug these results for y(0), y (0), y (0), y (0), and y iv (0) into (2) and obtain + 2x + 2 2 x2 + 2 x3 + 4 24 x4 + = + 2x x 2 + 3 x3 x4 + It should be clear that the method of this example can easily be extended to compute as many terms of the Taylor expansion of the solution of the differential equations as we want. Example 8.2. In this example I will demonstrate an equivalent, but more systematic method of computing a power series expression for the solution of a differential equation. Consider the follwing initial value problem: () y y = 0 y(2) = y (2) = We shall look for a power series solution around x o = 2; i.e., a solution of the form (7) a n (x 2) n. Our task is then is to determine the coefficients a n so that this y(x) indeed satisfies (). Now already the first two coefficients are determined by the initial conditions. To see this note and so Similarly, and so y(x) a n (x 2) n = a 0 + a (x 2) + a 2 (x 2) 2 + a 3 (x 2) 3 + = y (2) = a 0 + a 0 + a 2 0 2 + a 3 0 3 + = a 0 y (x) na n (x 2) n = 0 + a + 2a 2 (x 2) + 3a 3 (x 2) 2 + = y (2) = a. The remaining coefficients a n can now be determined by the differential equation. Differentiating term by term we have y (x) = d dx [ [ a n (x 2) n ] ] a 0 + a (x 2) + a 2 (x 2) 2 + a 3 (x 2) 3 + = d dx = a + 2a 2 (x 2) + 3a 3 (x 2) 2 + n= na n (x 2) n. Differentiating again one finds y = n(n )a n (x 2) n 2.
8. SOLVING DIFFERENTIAL EQUATIONS USING POWER SERIES 82 if (7) is to solve (), we need 0 = n(n )a n (x 2) n 2 + a n (x 2) n. To solve the equation above we first put the first power series in standard form: 0 n(n )a n (x 2) n 2 a n (x 2) n = m=0 (m + 2)(m + )a m+2 (x 2) m a n (x 2) n ((n + 2) (n + )a n+2 a n ) (x 2) n This must vanish for all x, so the total coefficient of each power of (x 2) n must vanish separately: (n + 2) (n + ) a n+2 a n = 0, n. We thus conclude a n+2 = (n + 2)(n + ) a n. n. A relationship of this type between the coefficients of a power series is called a recursion relation. Here is how one applies the recursion relation to determine (almost) all of the coefficients a n. To start, let s suppose a 0 and a are given. Then The following pattern emerges: a 2 = a 0+2 = (0+2)(0+) a 0 = 2 a 0 a 3 = a +2 = (+2)(+) a = 3 2 a a 4 = a 2+2 = (2+2)(+2) a 2 = 4 3 a = 4 3 2 a 0 a 5 = a 3+2 = (3+2)(3+) a 3 = 5 4 a 3 = 5 4 3 2 a a = a 4+2 = (4+2)(4+) a 4 = 5 a 4 = 5 4 3 2 a 0 if n is even, i.e., n = 2k, then a n = n! a o if n is odd, i.e., n = 2k +, then a n = n! a But as we have already seen, the initial conditions imply y(2) = a 0 = y (2) = a = { a n = n! if n is even, n! if n is odd ( (x 2) + 2 (x 2)2 3! (x 2)3 ) + 4! (x 2)4 + = + 2! (x 2)2 + 4! (x 2)4 + ( ) (x 2) + 3! (x 2)3 + 5! (x2)5 + = cosh(x 2) sinh(x 2) In the last step we have simply identified the power series within the parentheses as the Taylor expansions of cosh(x 2) and sinh(x 2). This example generalizes as follows. To construct a power series solution around the point x = x o, we procede as follows: () Set y(x) a n(x x o ) n. (2) Plug the expression () for y(x) into the differential equation; (3) Manipulate the resulting equation to obtain an equation in which single power series expression (rather that a sum of several power series) is set equal to zero. (4) Set the coefficient of each power of (x x o ) separately equal to zero. The resulting set of equations gives us the recursion relation for the coefficients a n.
8. SOLVING DIFFERENTIAL EQUATIONS USING POWER SERIES 83 (5) Solve the recursion relations, one by one, starting with the equation for a 2 in terms of a 0 and a, until all the coefficients a n are expressed in terms of a 0 and a. () Write down the solution y(x) using the results of preceding step. A good question to ask at this point is: what is the special significance of a 0 and a? Here is the answer. Recall that the equation y + p(x)y + q(x)y = 0 always has a unique solution satisfying given initial conditions y(x o ) = y o, y (x o ) = y o so long as p(x), and q(x) are well-behaved functions at x o ; in particular, if p(x) and q(x) are polynomials. Suppose we found a power series solution to this differential equation in the manner described above; a n (x x o ) n. Then y(x o ) a n(x o x o ) n = a 0 + 0 + 0 + 0 + = a 0, y (x o ) na n(x o x o ) n = 0 + a + 0 + 0 + = a. So the coefficients a o and a correspond exactly to the initial values of y and y at x o. Example 8.3. Find a general solution of around x o =. We set y + xy + y = 0 a n (x ) n and plug into the differential equation: 0 = n(n )a n (x ) n 2 + x na n (x ) n + a n (x ) n. n= The hardest part about this problem will be to combine the three power series appearing on the right hand side of the equation above into a single power series. We have 0 n(n )a n(x ) n 2 + x n= na n(x ) n a n(x ) n n(n )a n(x ) n 2 + (x + ) n= na n(x ) n a n(x ) n n(n )a n(x ) n 2 + (x ) n= na n(x ) n + n= na n(x ) n a n(x ) n n(n )a n(x ) n 2 n= na n(x ) n n= na n(x ) n a n(x x o ) n m=0 (m + 2)(m + )a m+2(x ) m na n(x ) n k=0 (k + )a k+(x ) k a n(x ) n (n + 2)(n + )a n+2(x ) n + na n(x ) n (n + )a n+(x ) n a n(x ) n ((n + 2)(n + )a n+2 + na n + (n + )a n+ + a n ) (x ) n We must therefore have or 0 = (n + 2)(n + )a n+2 + na n + (n + )a n+ + a n a n+2 = a n + a n+ (n + 2).
8. SOLVING DIFFERENTIAL EQUATIONS USING POWER SERIES 84 a 2 = a0+a 2 a 3 = a+a2 3 = a 3 + a0+a = a0 a a 4 = a2+a3 4 = a0+a 8 a0 a 24 = a0+2a 2 So up to order four the general solution is or a 0 + a (x ) a 0 + a 2 Example 8.4. Find a series solution of (x ) 2 + a 0 a (x ) 3 + a 0 + 2a (x ) 4 + 2 ) a 0 ( 2 (x )2 + (x )3 + 2 (x )4 + ( +a x 2 (x )2 (x )3 + (x )4 + ) about x = 0 satisfying the initial condition Plugging y xy = 0 y(0) =, y (0) = 2. a n x n into the differential equation yields 0 n(n )a nx n 2 x a nx n n(n )a nx n 2 a nx n+ (n + 2)(n + )a n+2x n n= a n x n = 2a 2 n= (n + 2)(n + )a n+2x n = 2a 2 n= ((n + 2)(n + )a n+2 a n ) x n Demanding that the total coefficient of each power of x must vanish leads to The latter equation can also be written as a 2 = 0 a n+2 = a n+3 = a n (n+2)(n+) a n (n + 3)(n + 2) Now the initial conditions imply a 0 =, a = 2. We also have a 2 = 0, and the recursion relation above yields a 3 = a 4 = a 5 = a = a 7 = a 0 (3)(2) = (2)(3) = a (4)(3) = 2 (4)(3) = a 2 (5)(4) = 0 20 = 0 a 3 ()(5) = ()(5) = 80 a 4 (7)() = (7)() = 252. n= a n x n So up, to order seven, + 2x + x3 + x4 + 80 x + 252 x7 + is a solution of the initial value problem.