• 沒有找到結果。

USING SERIES TO SOLVE DIFFERENTIAL EQUATIONS

在文檔中 INFINITE SERIES (頁 92-101)

Functions of Period Other Than 2π

2. Fourier series is a part of the field of Fourier analysis, which is central to many engineering applications. Fourier analysis

7.10 USING SERIES TO SOLVE DIFFERENTIAL EQUATIONS

In chapter 6, we saw how to solve several different types of differential equations. Among second order equations, we saw how to solve only those with constant coefficients, such as

y− 6y+ 9y = 0.

In cases such as this, we looked for a solution of the form of y= er x. So, what if the coefficients aren’t constant? For instance, suppose you wanted to solve the equation

y+ 2xy+ 2y = 0.

We leave it as an exercise to show that substituting y = er x in this case does not lead to a solution. However, it turns out that in many cases such as this, we can find a solution by assuming that the solution can be written as a power series, such as

y=

n=0

anxn.

The idea is to substitute this series into the differential equation and then use the resulting equation to determine the coefficients, a0, a1, a2,. . . , an. Before we see how to do this in general, we illustrate this for a simple equation, whose solution is already known, to demonstrate that we arrive at the same solution either way.

EXAMPLE 10.1 Power Series Solution of a Differential Equation Use a power series to determine the general solution of

y+ y = 0.

Solution First, observe that since this equation has constant coefficients, we already know how to find a solution. We leave it as an exercise to show that the general solution is

y= c1sin x+ c2cos x, where c1and c2are constants.

We now look for a solution of the equation in the form of the power series y= a0+ a1x+ a2x2+ a3x3+ · · · =

n=0

anxn.

To substitute this into the equation, we first need to obtain representations for yand y. Assuming that the power series is convergent and has a positive radius of convergence, recall that we can differentiate it term-by-term to obtain the derivatives

y= a1+ 2a2x+ 3a3x2+ · · · =

n=1

nanxn−1

and

y= 2a2+ 6a3x+ · · · =

n=2

n(n− 1)anxn−2. Substituting these power series into the differential equation, we get

0= y+ y =

n=2

n(n− 1) anxn−2+

n=0

anxn. (10.1)

The immediate objective here is to combine the two series in (10.1) into one power series.

Since the powers in the one series are of the form xn−2and in the other series are of the form xn, we will first need to rewrite one of the two series. Notice that we have that

y=

n=2

n(n− 1)anxn−2= 2a2+ 3 · 2a3x+ 4 · 3a4x2+ · · ·

=

n=0

(n+ 2)(n + 1)an+2xn.

Substituting this into equation (10.1) gives us 0= y+ y =

n=0

(n+ 2)(n + 1) an+2xn+

n=0

anxn

=

n=2

[(n+ 2)(n + 1) an+2+ an]xn. (10.2) Read equation (10.2) carefully; it says that the power series on the far right converges to the constant function f (x)= 0. Another way to think of this is as the Taylor series expansion of the zero function. In view of this, all of the coefficients must be zero. That is,

0= (n + 2)(n + 1) an+2+ an,

for n= 0, 1, 2,. . . . We solve this for the coefficient with the largest index, to obtain an+2= −an

(n+ 2)(n + 1), (10.3)

for n= 0, 1, 2,. . . . Equation (10.3) is called the recurrence relation. From here, we’d like to use (10.3) to determine all of the coefficients of the series solution. This may seem like a tall order, but it’s not as difficult as it sounds. The general idea is to write out (10.3) for a number of specific values of n and then try to recognize a pattern that the coefficients follow. We begin by recognizing that (10.3) relates an+2to an, for each n. In other words, a2is related to a0; a4is related to a2, which in turn is related to a0and so on.

So, all of the coefficients with even indices (a2, a4, a6,. . .) are all related to a0. Likewise, you should be able to see that all of the coefficients with odd indices are related to a1. To recognize the pattern, we simply write out a few terms, as follows. From (10.3), we have for the even-indexed coefficients that

a2 = −a0

2· 1 = −1 2! a0, a4 = −a2

4· 3 = 1

4· 3 · 2 · 1a0= 1 4!a0, a6 = −a4

6· 5 = −1 6! a0, a8 = −a6

8· 7 = 1 8!a0

and so on. (Try to write down a10 by recognizing the pattern, without referring to the recurrence relation.) Since we can write each even-indexed coeffiecient as a2n, for some n, note that we can now write down a simple formula that works for any of these coefficients.

We have

a2n = (−1)n

(2n)! a0, (10.4)

for n= 0, 1, 2,. . . . Similarly, using (10.3), we have that the odd-indexed coefficients are a3= −a1

3· 2 =−1 3!a1, a5= −a3

5· 4 = 1 5!a1, a7= −a5

7· 6 =−1 7!a1, a9= −a7

9· 8 = 1 9!a1

and so on. Since we can write each odd-indexed coefficient as a2n+1(or alternatively as a2n−1), for some n, note that we have the following simple formula for the odd-indexed coefficients:

a2n+1= (−1)n (2n+ 1)!a1.

Since we have now written every coefficient in terms of either a0or a1, we can rewrite the solution by separating the a0terms from the a1terms. We have

y=

n=0

anxn = a0+ a1x+ a2x2+ a3x3+ · · ·

= a0

1− 1

2!x2+ 1

4!x4+ · · ·

 + a1

x− 1

3!x3+ 1

5!x5+ · · ·



= a0

 n=0

(−1)n (2n)!x2n

y1(x)

+ a1

 n=0

(−1)n (2n+ 1)!x2n+1

y2(x)

= a0y1(x)+ a1y2(x), (10.5)

where y1(x) and y2(x) are two solutions of the differential equation (assuming the series converge). At this point, you should be able to easily check that both of the indicated power series converge absolutely for all x, by using the Ratio Test. Beyond this, you might also recognize that the series solutions y1(x) and y2(x) that we obtained are in fact, the Maclaurin series expansions of cos x and sin x, respectively. In light of this, (10.5) is an equivalent solution to that found by using the methods of Chapter 6. 

The method used to solve the differential equation in example 10.1 is certainly far more complicated than the methods we used in Chapter 6 for solving the same equation. It is not our intention here to provide you with a new and even more complicated method for solving the same old equations. Rather, this new method can be used to solve a wider range of differential equations than those solvable using our earlier methods. Now that we have verified that our new power series method gives the same solution as our earlier method, we turn our attention to equations that cannot be solved using our earlier, simpler methods.

We begin by returning to an equation mentioned in the introduction to this section.

EXAMPLE 10.2 Solving a Differential Equation with Variable Coefficients Find the general solution of the differential equation

y+ 2xy+ 2y = 0.

Solution First, observe that since the coefficient of y is not constant, we have little choice but to look for a series solution of the equation. As in example 10.1, we begin by assuming that we may write the solution as a power series,

y=

n=0

anxn.

As before, we have

y=

n=1

nanxn−1

and

y=

n=2

n(n− 1)anxn−2.

Substituting these three power series into the equation, we get

0= y+ 2xy+ 2y =

n=2

n(n− 1) anxn−2+ 2x

n=1

nanxn−1+ 2

n=0

anxn

=

n=2

n(n− 1) anxn−2+

n=1

2nanxn+

n=0

2anxn, (10.6)

where in the middle term, we moved the x into the series and combined powers of x. In order to combine the three series, we must only rewrite the first series so that its general term is a multiple of xn, instead of xn−2. As we did in example 10.1, we have

 n=2

n(n− 1) anxn−2=

n=0

(n+ 2)(n + 1) an+2xn,

and so, from (10.6), we have

0=

n=2

n(n− 1) anxn−2+

n=1

2nanxn+

n=0

2anxn

=

n=0

(n+ 2)(n + 1) an+2xn+

n=0

2nanxn+

n=0

2anxn

=

n=0

[(n+ 2)(n + 1) an+2+ 2nan+ 2an]xn

=

n=0

[(n+ 2)(n + 1) an+2+ 2 (n + 1) an]xn. (10.7)

To get this, we used the fact that 

n=12nanxn= 

n=02nanxn. (Notice that the first term in the series on the right is zero!) Reading equation (10.7) carefully, note that we again have a power series converging to the zero function, from which it follows that all of the coefficients must be zero:

0= (n + 2)(n + 1) an+2+ 2(n + 1)an,

for n= 0, 1, 2,. . . . Again solving for the coefficient with the largest index, we get the recurrence relation

an+2= − 2(n+ 1)an

(n+ 2)(n + 1) or

an+2= − 2an

n+ 2.

Much like we saw in example 10.1, the recurrence relation tells us that every second coefficient is related, so that all of the even-indexed coefficients are related to a0and all of the odd-indexed coefficients are related to a1. In order to try to recognize the pattern, we write out a number of terms, using the recurrence relation. We have

a2= −2

2a0= −a0, a4= −2

4a2= 1 2a0, a6= −2

6a4= −1 3!a0, a8= −2

8a6= 1 4!a0

and so on. At this point, you should recognize the pattern for these coefficients. (If not, write out a few more terms.) Note that we can write the even-indexed coefficients as

a2n = (−1)n n! a0,

for n = 0, 1, 2,. . . . Be sure to match this formula against those coefficients calculated above to see that they match. Continuing with the odd-indexed coefficients, we have from the recurrence relation that

a3= −2 3a1, a5= −2

5a3= 22 5· 3a1, a7= −2

7a5= − 23 7· 5 · 3a1, a9= −2

9a7= 24 9· 7 · 5 · 3a1

and so on. While you might recognize the pattern here, unlike the case for the even-indexed coefficients, it’s a bit harder to write down this pattern succinctly. Observe that the products in the denominators are not quite factorials. Rather, they are the products of the first so many odd numbers. The solution to this is to write this as a factorial, but then cancel out all of the even integers in the product. In particular, note that

1 9· 7 · 5 · 3 =

2·4

8 . 2·3

6 . 2·2

4 . 2·4

2

9! =24· 4!

9! , so that a9becomes

a9 = 24

9· 7 · 5 · 3a1= 24· 24· 4!

9! a1=22·4· 4!

9! a1. More generally, we now have

a2n+1= (−1)n22nn!

(2n+ 1)! a1, for n= 0, 1, 2,. . . .

Now that we have expressions for all of the coefficients, we can write the solution of the differential equation as

y=

n=0

anxn=

n=0

a2nx2n+ a2n+1x2n+1

= a0

 n=0

(−1)n n! x2n

y1(x)

+ a1

 n=0

(−1)n22nn!

(2n+ 1)!

y2(x)

x2n+1

= a0y1(x)+ a1y2(x),

y

x 1

2 4 6 8 10

2 3

2

3 1

FIGURE 7.53a y= y1(x).

y

x 1

0.2

0.2

0.4

0.6 0.4 0.6

2 3

2

3 1

FIGURE 7.53b y= y2(x).

where y1and y2are two power series solutions of the differential equation. We leave it as an exercise to use the Ratio Test to show that both of these series converge absolutely for all x. You are unlikely to recognize these two power series as Taylor series of familiar functions as we did in example 10.1, but even so, these are perfectly good solutions.

(Actually, you might recognize the power series for y1(x) as e−x2, but in practice recog-nizing series solutions as power series of familiar functions is rather unlikely.) To give you an idea of the behavior of these functions, we draw a graph of y1(x) in Figure 7.53a and of y2(x) in Figure 7.53b. We obtained these graphs by plotting the partial sums of these series. In particular, it’s worth noting that neither of these solutions is in the form y= er x, for any value of r . So, looking for a solution in this form, as we did for the case of a differential equation with constant coefficients cannot work here. 

From examples 10.1 and 10.2, you might get the idea that if you look for a series solution, you can always recognize the pattern of the coefficients and write the pattern down succinctly. Unfortunately, this is not at all true. Most often, the pattern is difficult to see and even more difficult to write down compactly. Still, series solutions are a valuable means of solving a differential equation. In the worst case, you can always compute a number of the coefficients of the series from the recurrence relation and then use the first so many terms of the series as an approximation to the actual solution.

In the final example, we illustrate the more common case where the coefficients are a bit more challenging to find.

EXAMPLE 10.3 A Series Solution Where the Coefficients Are Harder to Find

Use a power series to find the general solution of Airy’s equation y− xy = 0.

Solution As in both our previous examples, we begin by assuming that we may write the solution as a power series

y=

n=0

anxn.

Again, we have

y=

n=1

nanxn−1

and

y=

n=2

n(n− 1)anxn−2. Subsituting these power series into the equation, we get

0= y− xy =

n=2

n(n− 1)anxn−2− x

n=0

anxn

=

n=2

n(n− 1) anxn−2−

n=0

anxn+1.

In order to combine the two preceding series, we must rewrite one or both series so that they both have the same power of x. For simplicity, we rewrite the first series only. We have

0=

n=2

n(n− 1) anxn−2−

n=0

anxn+1

= 

n=−1

(n+ 3)(n + 2) an+3xn+1−

n=0

anxn+1

= (2)(1) a2+

n=0

(n+ 3)(n + 2) an+3xn+1−

n=0

anxn+1

= 2a2+

n=0

[(n+ 3)(n + 2) an+3− an]xn+1,

where we wrote out the first term of the first series and then combined the two series, once both had an index that started with n= 0. Again, this is a power series expansion of the zero function and so, all of the coefficients must be zero. That is,

0= 2a2 (10.8)

and

0= (n + 3)(n + 2) an+3− an, (10.9) for n= 0, 1, 2,. . . . Notice that equation (10.8) says that a2= 0. As we have seen before, (10.9) gives us the recurrence relation

an+3= 1

(n+ 3)(n + 2)an, (10.10)

for n = 0, 1, 2,. . . . Notice that here, instead of having all of the even-indexed coefficients related to a0 and all of the odd-indexed coefficients related to a1, we have a slightly different situation. In this case, (10.10) tells us that every third coefficient is related. In particular, notice that since a2= 0,(10.10) now says that

a5 = 1

5· 4a2= 0, a8 = 1

8· 7a5= 0

and so on. So, every third coefficient starting with a2is zero. But, how do we concisely write down something like this? Think about the notation a2nand a2n+1that we have used

previously. You can view a2nas a representation of every second coefficient stating with a0. Likewise, a2n+1 represents every second coefficient starting with a1. In the present case, if we want to write down every third coefficient starting with a2, we write a3n+2. We can now observe that

a3n+2= 0,

for n= 0, 1, 2,. . . . Continuing on with the remaining coefficients, we have from (10.10) that

a3= 1 3· 2a0, a6= 1

6· 5a3= 1 6· 5 · 3 · 2a0, a9= 1

9· 8a6= 1

9· 8 · 6 · 5 · 3 · 2a0

and so on. Hopefully, you see the pattern that’s developing for these coefficients. The trouble here is that it’s not as easy to write down this pattern as it was in the first two examples. Notice that the denominator in the expression for a9 is almost 9!, but with every third factor in the product deleted. Since we don’t have a way of succinctly writing this down, we write the coefficients by indicating the pattern, as follows:

a3n =(3n− 2)(3n − 5) · · · 7 · 4 · 1

(3n)! a0,

where this is not intended as a literal formula, as explicit substitution of n= 0 or n = 1 would result in negative values. Rather, this is an indication of the general pattern.

Similarly, the recurrence relation gives us a4= 1

4· 3a1, a7= 1

7· 6a4= 1 7· 6 · 4 · 3a1, a10= 1

10· 9a7= 1

10· 9 · 7 · 6 · 4 · 3a1 and so on. More generally, we can establish the pattern:

a3n+1 =(3n− 1)(3n − 4) · · · 8 · 5 · 2 (3n+ 1)! a1, where again, this is not intended as a literal formula.

Now that we have found all of the coefficients, we can write the solution, by separately writing out every third term of the series, as follows:

y=

n=0

anxn =

n=0

a3nx3n+ a3n+1x3n+1+ a3n+2x3n+2

= a0

 n=0

(3n− 2)(3n − 5) · · · 7 · 4 · 1

(3n)! x3n

y1(x)

+ a1

 n=0

(3n− 1)(3n − 4) · · · 8 · 5 · 2 (3n+ 1)! x3n+1

y2(x)

= a0y1(x)+ a1y2(x).

We leave it as an exercise to use the Ratio Test to show that the power series defining y1 and y2are absolutely convergent for all x. 

You may have noticed that in all three of our examples, we assumed that there was a solution of the form

y=

n=0

anxn = a0+ a1x+ a2x2+ · · · , only to arrive at the general solution

y= a0y1(x)+ a1y2(x),

where y1and y2were power series solutions of the equation. This is in fact not coincidental.

One can show that (at least for certain equations) this is always the case. One clue as to why this might be so lies in the following.

Suppose that we want to solve the initial value problem consisting of a second order differential equation and the initial conditions y(0)= A and y(0)= B. Taking y(x) =



n=0anxn gives us

y(x)=

n=0

nanxn−1= a1+ 2a2x+ 3a3x2+ · · · . So, imposing the initial conditions, we have

A= y(0) = a0+ a1(0)+ a2(0)2+ · · · = a0

and

B = y(0)= a1+ 2a2(0)+ 3a3(0)2+ · · · = a1.

So, irrespective of the particular equation we’re solving, we always have y(0)= a0 and y(0)= a1.

You might ask what you’d do if the initial conditions were imposed at some point other than at x = 0, say at x = x0. In this case, we look for a power series solution of the form

y=

n=0

an(x− x0)n.

It’s easy to show that in this case, we still have y(x0)= a0and y(x0)= a1.

In the exercises, we explore finding series solutions about a variety of different points.

EXERCISES 7.10

WRITING EXERCISES

1. After substituting a power series representation into a

在文檔中 INFINITE SERIES (頁 92-101)