* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chapter 12 Infinite series, improper integrals, and Taylor series
Survey
Document related concepts
Limit of a function wikipedia , lookup
Partial differential equation wikipedia , lookup
Multipole expansion wikipedia , lookup
Path integral formulation wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
Function of several real variables wikipedia , lookup
Neumann–Poincaré operator wikipedia , lookup
Multiple integral wikipedia , lookup
Transcript
Chapter 12 Infinite series, improper integrals, and Taylor series 12.1 Introduction to series In studying calculus, we have explored a variety of functions. Among the most basic are polynomials, i.e. functions such as p(x) = x5 + 2x2 + 3x + 2. These functions have features that make them particularly easy to handle: it is elementary to compute the derivatives and integrals of polynomials. Further, the value of such a function can be computed by simple multiplications and additions, i.e. by basic operations easily handled by an ordinary calculator. This is not the case for, say, trigonometric functions. For example, to find the decimal value of sin(2.5) we require a scientific calculator. The same difficulty occurs for exponentials and logarithms. For this reason, being able to approximate a function by a polynomial is an attractive proposition. This idea forms the core topic of this chapter. We have discussed linear approximations in differential calculus, Here we extend such elementary approximation methods. Our goal is to increase the accuracy of the linear approximation by including higher order terms (quadratic, cubic, etc), i.e. to find a polynomial that approximates the given function. We first review the idea of series introduced in Chapter 1. 12.2 The geometric series Recall the geometric series seen earlier this term: 2 3 n Sn = 1 + r + r + r + . . . + r = n X rk k=0 v.2005.1 - January 5, 2009 1 Math 103 Notes Chapter 12 We have seen a trick that helps to sum the series, namely multiplying both sides by r. This leads to Sn = 1+ r + r 2 + . . . + r n rSn = r + r 2 + . . . + r n + r n+1 Subtracting the second line from the first and cancelling terms leads to (1 − r)Sn = 1 − r n+1 . Solving for the sum Sn leads to the observation made previously, namely that The sum of a finite geometric series, 2 n Sn = 1 + r + r + · · · + r = n X rk , k=0 is Sn = 1 − r n+1 . 1−r (12.1) We would like to investigate how this “sum” behaves when more and more terms of the series are included. Our goal is to find a way of attaching a meaning to the expression Sn = ∞ X rk , k=0 when the series becomes an infinite series. We will use the following definition: 12.2.1 The infinite geometric series Definition An infinite series that has a finite sum is said to be convergent. Otherwise it is divergent. Definition Suppose that S is an (infinite) series whose terms are ak . Then the partial sums, Sn , of this series are n X Sn = ak . k=0 We say that the sum of the infinite series is S, and write S= ∞ X ak , k=0 v.2005.1 - January 5, 2009 2 Math 103 Notes Chapter 12 provided that S = lim n→∞ n X ak . k=0 That is, we consider the infinite series as the limit of the partial sums as the number of terms n is increased. In this case we also say that the infinite series converges to S. We will see that only under certain circumstances will infinite series have a finite sum, and we will be interested in exploring two questions: 1. Under what circumstances does an infinite series have a finite sum. 2. What value does the partial sum approach as more and more terms are included. In the case of a geometric series, the sum of the series, 12.1 depends on the number of terms in the series, n via r n+1 . Whenever r > 1, or r < −1, this term will get bigger as n increases, whereas, for 0 < r < 1, this term decreases with n. We can say that lim r n+1 = 0 provided |r| < 1. n→∞ These observations are illustrated by two specific examples below. This leads to the following conclusion: The sum of an infinite geometric series, S = 1 + r + r2 + · · · + rk + · · · = ∞ X rk , k=0 exists provided |r| < 1 and is S= 1 . 1−r (12.2) Examples of convergent and divergent geometric series are discussed below. 12.2.2 Example: A geometric series that converges. Consider the geometric series with r = 21 , i.e. 2 3 n X n k 1 1 1 1 1 + + ...+ = Sn = 1 + + 2 2 2 2 2 k=0 Then Sn = v.2005.1 - January 5, 2009 1 − (1/2)n+1 1 − (1/2) 3 Math 103 Notes Chapter 12 We observe that as n increases, i.e. as we retain more and more terms, we obtain 1 1 − (1/2)n+1 = = 2. n→∞ 1 − (1/2) 1 − (1/2) lim Sn = lim n→∞ In this case, we write ∞ n X 1 n=0 2 =1+ 1 1 + ( )2 + . . . = 2 2 2 and we say that “the (infinite) series converges to 2”. 12.2.3 Example: A geometric series that diverges In contrast, we now investigate the case that r = 2: then the series consists of terms 2 3 n Sn = 1 + 2 + 2 + 2 + . . . + 2 = n X 2k k=0 1 − 2n+1 = 2n+1 − 1 1−2 We observe that as n grows larger, the sum continues to grow indefinitely. In this case, we say that the sum does not converge, or, equivalently, that the sum diverges. Sn = It is important to remember that an infinite series, i.e. a sum with infinitely many terms added up, can exhibit either one of these two very different behaviours. It may converge in some cases, as the first example shows, or diverge (fail to converge) in other cases. We will see examples of each of these trends again. It is essential to be able to distinguish the two. Divergent series (or series that diverge under certain conditions) must be handled with particular care, for otherwise, we may find contradictions or seemingly reasonable calculations that have meaningless results. 12.3 Trading a function for an infinite series The expression found above holds true for any number r whose magnitude is less than 1. Suppose we think of this number as a quantity we wish to vary - let us call it x to remind us that we consider it a variable. Then rewritten in terms of x, the expression we found is 1 = 1 + x + x2 + x3 + . . . 1−x when |x| < 1 We wish to understand this in a new way: on the left we have a function, namely f (x) = 1 . 1−x On the right we have what looks like an “infinite polynomial”, i.e. a sum of terms that are all powers of x. This type of expansion is called a power series, since it consists of a sum of powers of x. We v.2005.1 - January 5, 2009 4 Math 103 Notes Chapter 12 will soon see that this power series is a particular example of a Taylor series, an expansion that can be helpful in approximating more complicated functions such as trigonometric or exponential functions. One way to think of this new connection between the function on the left and the series on the right is that it defines a whole set of polynomials, each one formed by keeping one more term in the (infinite) expansion, and each one a better and better approximation of the given function. For example, we could list the successive approximations as T0 (x) T1 (x) T2 (x) Tn (x) = = = = 1 1+x 1 + x + x2 1 + x + x2 + . . . + xn The first polynomial is just the value of the function at one point (at the point x = 0, it turns out). The second is the linear approximation, arrived at by using information about the derivative. The subsequent polynomials retain more and more details of the function, as we will shortly see. We so arrive at the Taylor polynomial of degree n, shown at the end of this list. As long as |x| < 1, the Taylor polynomials provide a better and better approximation for the function f (x) = 1/(1 − x) as n gets larger. But we must take care, since if |x| > 1, the expansion will fail to converge - as we have already established previously. For example, the value x = 1 leads to 1 + 1 + 1 + ..., which does not converge. As another example, if we let x = −1, the sum looks like this: 1 + (−1) + 1 + (−1) + . . . If we add the first two terms, we get zero. If we add the third term, we get 1. Adding the fourth term gives zero. As we continue term by term, the sum keeps flipping back and forth between 0 and 1. In this case, we also say that the sum does not converge. Thus this Taylor series is valid only so long as |x| < 1. The restriction |x| < 1 is required to ensure that the infinite sum will converge to a finite result. We say that the radius of convergence of this series is 1. We have seen two ways in which a series can diverge: first, the sum may become unbounded, i.e. infinitely large. Second, the sum could jump from value to value without approaching any fixed value. In both cases, the series is divergent and will have little practical significance. 12.4 Improper integrals We will see that there is a close connection between certain infinite series and improper integrals, i.e. integrals over an infinite domain. Recall the following definition: v.2005.1 - January 5, 2009 5 Math 103 Notes Chapter 12 Definition An improper integral is an integral performed over an infinite domain, e.g. Z ∞ f (x) dx. a The value of such an integral is understood to be the limit Z ∞ f (x) dx = lim b→∞ a Z b f (x) dx. a i.e. we evaluate an improper integral by first computing a definite integral over a finite domain a ≤ x ≤ b, and then taking a limit as the endpoint b moves off to larger and larger values. Definition When the limit shown above exists, we say that the improper integral converges. Other wise we say that the improper integral diverges. With this in mind, we compute a number of classic integrals: 12.4.1 Example: A divergent integral Z b 1 1 I= dx = lim dx b→∞ x a x 1 b I = lim ln(x) = lim (ln(b) − ln(1)) b→∞ b→∞ Z ∞ 1 I = lim ln(b) = ∞ b→∞ The fact that we get an infinite value for this integral follows from the observation that ln(b) increases without bound as b increases. Thus the area under the curve f (x) = 1/x over the infinite interval 1 ≤ x ≤ ∞ is not finite. We say that the improper integral of 1/x diverges (or does not converge). 12.4.2 Example: A convergent integral Now consider the related integral I= Then Z ∞ 1 1 dx = lim b→∞ x2 Z b x−2 dx. 1 b 1 I = lim (−x ) = − lim − 1 = 1. b→∞ b→∞ b −1 1 Thus, this integral converges and we see that its value is 1. v.2005.1 - January 5, 2009 6 Math 103 Notes 12.4.3 Chapter 12 When does the integral of 1/xp converge? More generally, consider I= By a similar calculation, we find that Z ∞ 1 1 dx. xp b x1−p I = lim b→∞ (1 − p) 1 1 I = lim b1−p − 1 b→∞ 1 − p Thus this integral converges provided that the term b1−p does not “blow up” as b increases. This can only be true so long as p > 1. In this case, we have I= 1 . p−1 To summarize our result, Z 1 12.4.4 ∞ ( 1 dx xp converges if diverges if p>1 p≤1 Comparisons The integrals discussed above can be used to make comparisons that help us to identify when other improper integrals converge or diverge. The following important result establishes how these comparisons work: Suppose we are given two functions, f (x) and g(x), both continuous on some infinite interval [a, ∞). Suppose, moreover, that, at all points on this interval, the first function is smaller than the second, i.e. 0 ≤ f (x) ≤ g(x). Then the following conclusions can be made: 1. Z ∞ f (x) dx ≤ a Z ∞ g(x) dx. (This means that the area under f (x) is smaller than the area a under g(x).) Z ∞ Z 2. If g(x) dx converges, then a smaller one) Z ∞ Z 3. If f (x) dx diverges, then a larger one.) v.2005.1 - January 5, 2009 ∞ f (x) dx converges. (If the larger area is finite, so is the a ∞ g(x) dx diverges. (If the smaller area is infinite, so is the a 7 Math 103 Notes Chapter 12 Example We can determine that the integral Z converges by noting that for all x > 0 ∞ 1 x dx 1 + x3 x x 1 ≤ 3 = 2. 3 1+x x x Thus Z 1 ∞ x dx ≤ 1 + x3 Z 1 ∞ 1 dx x2 Since the larger integral on the right is known to converge, so does the smaller integral on the left. 12.5 Infinite series In this section we present a few classical series which are important landmarks and which carry special significance. These will be useful in our appreciation of the behaviour of infinite series. Geometric series We have already seen that The geometric series converges when |r| < 1 and its sum is then S= ∞ X rn = n=0 1 . 1−r If r ≥ 1 the geometric series diverges. The harmonic series The harmonic series is a sum of terms of the form 1/k where k = 1, 2, . . . . At first appearance, this series might seem to have the desired qualities of a convergent series, simply because the successive terms being added are getting smaller and smaller, but this is a misleading and deceptive observation! The harmonic series ∞ X 1 k=1 v.2005.1 - January 5, 2009 k =1+ 1 1 1 + + + ... 2 3 4 diverges 8 Math 103 Notes Chapter 12 1.0 <==== the function y=1/x The harmonic series 0.0 0.0 11.0 Figure 12.1: The harmonic series is a sum that corresponds to the area under the staircase shown above. It can be shown that the harmonic series does not converge. by comparing it to an integral of the function 1 y = f (x) = . x In Figure 12.1 we show a graph of this function superimposed on a bar graph. We will compare the areas of the steps in the bar graph with the area under the graph of this function. For the area of the steps, we note that the base width of each step is 1, and the heights form the sequence 1 1 1 {1, , , , . . . } 2 3 4 Thus the area of (infinitely many) of these steps is ∞ X1 1 1 1 1 1 1 . A = 1 · 1+ 1· + 1 · + 1 · + ··· = 1 + + + + ... = 2 3 4 2 3 4 k k=1 Thus the area of the bar graph is a geometric representation of precisely the series we are investigating, the harmonic series. On the other hand, the area under the graph of the function y = f (x) = 1/x is given by the improper integral Z ∞ 1 dx x 1 We have seen previously that this integral diverges! v.2005.1 - January 5, 2009 9 Math 103 Notes Chapter 12 ¿From Figure 12.1 we see that the areas under the function, Af and under the bar graph, Ab , satisfy Af < Ab . Thus, since the smaller of the two is infinite, so is the larger. We have established, using this comparison, that the the sum of the harmonic series cannot be finite, so that this series diverges. Other comparisons: The “p” series More generally, we can compare series of the form ∞ X 1 kp k=1 to the integral Z ∞ 1 1 dx xp in precisely the same way. This leads to the conclusion that The “p” series, ∞ X 1 kp k=1 ( converges if diverges if p>1 p≤1 For example, the series ∞ X 1 1 1 1 =1+ + + + ... 2 k 4 9 16 k=1 converges. Notice, however, that the comparison does not give us a value to which the sum converges. It merely indicates that the series does converge. Alternating series We can modify the harmonic series to produce the alternating harmonic series in which the sign alternates from term to term. ∞ X k=1 (−1)k+1 1 1 1 1 = 1 − + − + ... k 2 3 4 The alternating harmonic series converges due to the alternation of signs. (Consecutive terms nearly cancel out). We will see later how to show that this series converges, remarkably to the value ln(2). However, the convergence is “slow”: it takes many terms added together to get close to the v.2005.1 - January 5, 2009 10 Math 103 Notes Chapter 12 “final value”. The speed of convergence is important for practical reasons: if we want to devise a calculation that will help us to find an approximate decimal expansion of some number (such as ln(2)), we would certainly prefer to use a series that converges quickly, to reduce the number of calculations that have to be made. More generally, for alternating series with terms that are decreasing to zero, we have convergence, as summarized below. Suppose that successive terms ak and ak+1 have opposite signs. Then, provided the terms are getting smaller so that ak → 0, the alternating series ∞ X ak k=0 converges. 12.5.1 Example In this example, we will consider the series ∞ X 1 1 1 1 = 1+1+ + + + ... k! 2 6 24 k=0 We can see that this series converges by noticing: 1 1 1 1 1 1 1 1 1 = · · · . . . ≤ 1 · · · . . . = k−1 = k! 1 2 3 k 2 2 2 2 k−1 1 2 if k ≥ 2. In other words, the series eventually becomes smaller than a geometric series which converges. ∞ X 1 1 1 1 = 1+1+ + + + ... k! 2 6 24 k=0 < 1+1+ 1+1+ 1 1 1 + + + ... 2 4 8 1 1 1 1 1 1 + + + . . . = 1 + (1 + + ( )2 + ( )3 + . . .) 2 4 8 2 2 2 ∞ k X 1 = 1+ =1+2=3 2 k=0 Note that the series converges, and, moreover, converges to a number smaller than 3. v.2005.1 - January 5, 2009 11 Math 103 Notes 12.6 Chapter 12 Finding Taylor series Now that we understand a little bit about when series converge, we will turn our attention to finding the series representations of some elementary functions. Using one series to find another Once we have identified the expansion of some function in terms of an infinite “Taylor polynomial”, we can build up many other expansions of related functions. In this section, we repeatedly use our geometric summation formula, together with substitution and/or some other operation to find interesting new conclusions. All examples are based on the fact (discussed earlier) that ∞ X 1 = 1 + u + u2 + u3 + . . . = uk 1−u k=0 when |u| < 1. 12.6.1 Example: Simple substitution We make the substitution u = −t, then |u| < 1 means that | − t| < 1, so the above formula for the sum of a geometric series implies that: 1 = 1 + (−t) + (−t)2 + (−t)3 + . . . 1 − (−t) 1 = 1 − t + t2 − t3 + t4 + . . . 1+t This means we have produced the series for the function 1/(1 + t). 12.6.2 Example: Term by term integration We will use the results of Example 12.6.1, but we follow our substitution by integration. On the left, we integrate the function f (t) = 1/(1 + t) (to arrive at a ln type integral) and on the right we integrate the power terms of the expansion. We are permitted to integrate the power series term by term provided that the series converges. Z 0 x 1 dt = 1+t Z x (1 − t + t2 − t3 + t4 − . . .) dt 0 ∞ X x2 x3 x4 xk ln(1 + x) = x − + − + ... = (−1)k+1 2 3 4 k k=1 v.2005.1 - January 5, 2009 12 Math 103 Notes Chapter 12 This procedure has allowed us to find a series representation for a new function, ln(1 + x). ln(1 + x) = x − x2 x3 x4 + − + ... 2 3 4 When is this series expected to converge? We obtained this by starting with the geometric series which only converged when |u| < 1. We made the substitution u = −t, and then integrated for 0 < t < x. To assure convergence, the value of t is not permitted to leave the interval |t| < 1 so we certainly cannot expect the series for ln(1 + x) to converge when |x| > 1 . Indeed, for x = −1, we have ln(1 + x) = ln(0) which is undefined. We also get a right hand side of −(1 + 1 1 1 + + + . . .) 2 3 4 which is the divergent harmonic series preceded by a negative sign. Thus, we must avoid x = −1, since the expansion will not converge there, and neither is the function defined. An expansion for ln(2) Strictly speaking, our analysis does not predict what happens if we substitute x = 1 into the expansion of the function found in Example 2, because this value of x is outside of the permitted range −1 < x < 1 in which the Taylor series can be guaranteed to converge. It takes some deeper mathematics (Abel’s theorem) to prove that the result of this substitution actually makes sense, and converges, i.e. that 1 1 1 ln(2) = 1 − + − + . . . 2 3 4 We state without proof here that the alternating harmonic series converges to ln(2). 12.6.3 Example Suppose we make the substitution u = −t2 into the geometric series formula, and recall that we need |u| < 1 for convergence. Then 1 = 1 + (−t2 ) + (−t2 )2 + (−t2 )3 + . . . 1 − (−t2 ) ∞ X 1 2 4 6 8 (−1)n t2n = 1 − t + t −t + t + ... = 1 + t2 k=0 This series will converge provided |t| < 1. Now integrate both sides, and recall that the antiderivative of the function 1/(1 + t2 ) is arctan(t). Then Z x Z x 1 dt = (1 − t2 + t4 − t6 + t8 + . . .) dt 2 1 + t 0 0 ∞ X x(2k−1) x3 x5 x7 + − + ... = (−1)k+1 arctan(x) = x − 3 5 7 (2k − 1) k=1 v.2005.1 - January 5, 2009 13 Math 103 Notes Chapter 12 An expansion for π For a particular application of this expansion, consider plugging in x = 1. Then arctan(1) = 1 − 1 1 1 + − + ... 3 5 7 But arctan(1) = π/4. Thus we have found a way of computing the irrational number π, namely ! ∞ X 1 1 1 1 k+1 π = 4 1 − + − + ... = 4 . (−1) 3 5 7 (2k − 1) k=1 While it is true that this series converges, the convergence is slow. (This can be seen by adding up the first 100 or 1000 terms of this series with a spreadsheet.) This means that it is not practical to use such a series as an approximation for π. (There are other series that converge to π very rapidly.) 12.6.4 Finding the coefficients directly from the function As indicated in the introduction, approximating functions by the sum of power functions (i.e. by a polynomial or a series) is helpful in practical calculations. For one thing, we can evaluate a polynomial (or finite series) more readily than functions such as arctan or ln. In the preceding discussions, we found some series representations of functions fortuitously. Here we set out to identify the connection by starting with the function of interest. Suppose we have a function which we want to write as 2 3 f (x) = a0 + a1 x + a2 x + a3 x + . . . = ∞ X ak xk . k=0 We can use information about the function to directly determine the coefficients. To determine a0 , let x = 0 and note that f (0) = a0 + a1 0 + a2 02 + a3 03 + . . . = a0 We conclude that a0 = f (0). By differentiating both sides we find the following: f ′ (x) = a1 + 2a2 x + 3a3 x2 + . . . + kak xk−1 + . . . f ′′ (x) = 2a2 + 2 · 3a3 x + . . . + (k − 1)kak xk−2 + . . . f ′′′ (x) = 2 · 3a3 + . . . + (k − 2)(k − 1)kak xk−3 + . . . f (k) (x) = 1 · 2 · 3 · 4 . . . kak + . . . v.2005.1 - January 5, 2009 14 Math 103 Notes Chapter 12 Here we have used the notation f (k) (x) to denote the k’th derivative of the function. Now evaluate each of the above derivatives at x = 0. Then f ′ (0) = a1 , ⇒ a1 = f ′ (0) f ′′ (0) = 2a2 , ⇒ a2 = f ′′ (0) 2 f ′′′ (0) = 2 · 3a3 , ⇒ a3 = f ′′′ (0) 2·3 f (k) (0) = k!ak , ⇒ ak = f (k) (0) k! This gives us a recipe for calculating all coefficients ak . This means that if we can compute all the derivatives of the function f (x), then we know the coefficients of the Taylor series as well. Because we have evaluated all the coefficients by the substitution x = 0, we say that the resulting power series is the Taylor series of the function about x = 0. 12.6.5 Example: A Taylor series for ex Consider the function f (x) = ex . All the derivatives of this function are equal to ex . In particular, f (k) (x) = ex ⇒ f (k) (0) = 1. So that the coefficients of the Taylor series are ak = 1 f (k) (0) = k! k! Therefore the Taylor series for ex about x = 0 is ∞ a0 + a1 x + a2 x2 + a3 x3 + . . . + ak xk + . . . = 1 + x + X xk xk x2 x3 x4 + + + ...+ + ... = 2 6 24 k! k! k=0 This is a very interesting series. We state here without proof that this series converges for all values of x. Further, the function defined by the series is in fact equal to ex that is, ∞ ex = 1 + x + X xk x2 x3 + + ... = 2 6 k! k=0 The implication is that the function ex is completely determined (for all x values) by its behaviour (i.e. derivatives of all orders) at x = 0. In other words, the value of the function at x = 1, 000, 000 is determined by the behaviour of the function around x = 0. This means that ex is a very special function with superior “predictable features”. If a function f (x) agrees with its Taylor polynomial on a region (−a, a), as was the case here, we say that f is analytic on this region. It is known that ex is analytic for all x. v.2005.1 - January 5, 2009 15 Math 103 Notes Chapter 12 Remark: How the exponential function grows We can use the results of this example to establish the fact that the exponential function grows “faster” than any power function xn . That is the same as saying that the ratio of ex to xn (for any power n) increases with x. We can see this fact directly from the results of our Taylor series for ex and the following simple “division”: 2 3 n n+1 x 1 + x + x2! + x3! + . . . xn! + (n+1)! + ... ex = xn xn 1 1 x 1 + ... = n + n−1 + . . . + + x x n! (n + 1)! x > (n + 1)! We see that the last term becomes arbitrarily large as x → ∞, implying that ex =∞ x→∞ xn lim This shows that the exponential function ex grows faster than any power function, and hence also faster than any (finite) polynomial. 12.6.6 Example: Other (related) exponential functions We can also easily obtain a Taylor series expansion for functions related to ex , without assembling the derivatives. We start with the result that ∞ X uk u2 u3 e =1+u+ + + ... = 2 6 k! k=0 u Then the substitution u = −x leads to the result ∞ e−x = 1 − x + X (−x)k x2 x3 − + ... = . 2 6 k! k=0 The substitution u = x2 leads to ∞ x2 e X (x2 )k (x2 )2 (x2 )3 + + ... = =1+x + 2 6 k! k=0 2 In other words, ∞ x2 e v.2005.1 - January 5, 2009 X x2k x4 x6 + + ... = =1+x + 2 6 k! k=0 2 16 Math 103 Notes Chapter 12 2.0 T1 T3 sin(x) T2 T4 -2.0 0.0 7.0 Figure 12.2: An approximation of the function y = sin(x) by successive Taylor polynomials, T1 , T2 , T3 , T4 . The higher Taylor polynomials do a better job of approximating the function on a larger interval about x = 0. 12.6.7 Example: Taylor series of simple trigonometric functions In this example we determine the Taylor series for the function f (x) = sin x. The derivatives of y = sin(x) are f (x) = sin x f ′ (x) = cos x f ′′ (x) = − sin x f ′′′ (x) = − cos x f (4) (x) = sin x and then the cycle repeats. This means that f (0) = 0, f ′ (0) = 1, f ′′ (0) = 0, f ′′′ (0) = −1 and then the pattern repeats. In other words, 1 1 a0 = 0, a1 = 1, a2 = 0, a3 = − , a4 = 0, a5 = , . . . 3! 5! Now it is a fact that sin x is analytic for all x so that ∞ sin x = x − v.2005.1 - January 5, 2009 X x2n+1 x3 x5 x7 + − + ... = (−1)n 3! 5! 7! (2n + 1)! n=0 17 Math 103 Notes Chapter 12 Consider the sequence of polynomials T1 (x) = x x3 3! x3 x5 T3 (x) = x − + 3! 5! 3 x5 x7 x + − T4 (x) = x − 3! 5! 7! T2 (x) = x − Then these polynomials provide a better and better approximation to the function sin(x) close to x = 0. The first of these is just a linear (or tangent line) approximation that we had studied long ago. The second improves this with a quadratic approximation, etc. Figure 12.2 illustrates how the first few Taylor polynomials approximate the function sin(x) near x = 0. To determine the Taylor series for cos x, we can simply differentiate the series for sin x. d sin x dx x3 x5 x7 d (x − + − + . . .) = dx 3! 5! 7! 3x2 5x4 7x6 + − + ... = 1− 3! 5! 7! cos x = We find that ∞ 2n X x2 x4 x6 n x + − + ... = (−1) cos(x) = 1 − 2 4! 6! (2n)! n=0 12.7 Application of Taylor series In this section we illustrate some of the applications of Taylor series to problems that may be difficult to solve using other conventional methods 12.7.1 Evaluating definite integrals Some functions do not have an antiderivative that can be expressed in terms of other simple functions. Integrating these functions can be a problem, as we cannot use the convenience of evaluating that antiderivative at endpoints, as the Fundamental Theorem of Calculus specifies. In some cases, we can approximate the value of the definite integral using a Taylor series, as the following example illustrates. v.2005.1 - January 5, 2009 18 Math 103 Notes Chapter 12 Example 1 Evaluate the definite integral Z 1 sin(x2 ) dx 0 2 A simple substitution (e.g. u = x ) will not work here, and we cannot find an antiderivative. Here is how we might approach the problem using Taylor series: We know that the series expansion for sin(t) is t3 t5 t7 sin t = t − + − + . . . 3! 5! 7! 2 Substituting t = x , we have sin(x2 ) = x2 − x6 x10 x14 + − + ... 3! 5! 7! In spite of the fact that we cannot antidifferentiate the function, we can antidifferentiate the Taylor series, just as we would a polynomial: Z 1 1 x6 x10 x14 + − + . . .) dx 3! 5! 7! sin(x ) dx = Z = = 1 1 1 1 − + − + ... 3 7 · 3! 11 · 5! 15 · 7! 2 0 (x2 − 0 1 x3 x7 x11 x15 − + − + . . . 3 7 · 3! 11 · 5! 15 · 7! 0 This is an alternating series so we know that it converges. If we add up the first four terms, the pattern becomes clear: the series converges to 0.31026. 12.7.2 Solving differential equations Some differential equations cannot be solved in terms of familiar functions (just as some functions do not have antiderivatives which can be expressed in terms of familiar functions). However, Taylor series can come to the rescue again. Here we will present two examples of this idea. Example We are already familiar with the differential equation and initial condition that describes unlimited exponential growth. dy = y, dx y(0) = 1. v.2005.1 - January 5, 2009 19 Math 103 Notes Chapter 12 Indeed, from previous work, we know that the solution of this differential equation and initial condition is y(x) = ex , but we will pretend that we do not know this fact in illustrating the usefulness of Taylor series. In some cases, where separation of variables does not work, this option would have great practical value. Let us express the “unknown” solution to the differential equation as y = a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + . . . Our task is to determine values for the coefficients ai Since this function satisfies the condition y(0) = 1, we must have y(0) = a0 = 1. Differentiating this power series leads to dy = a1 + 2a2 x + 3a3 x2 + 4a4 x3 + . . . dx But according to the differential equation, match, i.e. dy dx = y, Thus, it must be true that the two Taylor series a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + . . . = a1 + 2a2 x + 3a3 x2 + 4a4 x3 + . . . This can only happen if the coefficients of like terms are the same, i.e. if the constant terms on either side of the equation are equal, if the terms of the form Cx2 on either side are equal, and so on for all powers of x. Equating coefficients, we obtain: a0 = a1 = 1, a1 = 2a2 , ⇒ a1 = 1 ⇒ a2 = a21 = a2 = 3a3 , ⇒ a3 = a2 3 = 1 2·3 a3 = 4a4 , ⇒ a4 = a3 4 = 1 2·3·4 an-1 = nan , ⇒ an = an-1 n This means that y =1+x+ 1 2 = 1 1·2·3...n = 1 n! x2 x3 xn + + ...+ + . . . = ex 2! 3! n! which, as we have seen, is the expansion for the exponential function that is the real solution we have been expecting. In the example here shown, we would hardly need to use series to arrive at the right conclusion, but in the next example, we would not find it as easy to discover the solution by other techniques discussed previously. Example 2: Airy’s equation Airy’s equation arises in the study of optics, and (with initial conditions) is as follows: v.2005.1 - January 5, 2009 20 Math 103 Notes Chapter 12 y ′′ = xy y(0) = 1 y ′ (0) = 0 As before, we will write the solution as a series: y = a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + a5 x5 + . . . Using the information from the initial conditions, we get y(0) = a0 = 1 and y ′(0) = a1 = 0. Now we can write down the derivatives: y ′ = a1 + 2a2 x + 3a3 x2 + 4a4 x3 + 5a5 x4 + . . . y ′′ = 2a2 + 2 · 3x + 3 · 4x2 + 4 · 5x3 + . . . The equation then gives y ′′ = xy 2a2 + 2 · 3a3 x + 3 · 4a4 x2 + 4 · 5a5 x3 + . . . = x(a0 + a1 x + a2 x2 + a3 x3 + . . .) 2a2 + 2 · 3a3 x + 3 · 4a4 x2 + 4 · 5a5 x3 + . . . = a0 x + a1 x2 + a2 x3 + a3 x4 + . . . Again, we can equate the coefficients of x, and use a0 = 1 and a1 = 0, to obtain 2a2 = 0 2 · 3a3 = a0 3 · 4a4 = a1 4 · 5a5 = a2 5 · 6a6 = a3 ⇒ a2 ⇒ a3 ⇒ a4 ⇒ a5 ⇒ a6 =0 1 = 2·3 =0 =0 1 = 2·3·5·6 This gives us the first few terms of the solution: x3 x6 + + ... 2·3 2·3·5·6 If we continue in this way, we can write down many terms of the series. y =1+ v.2005.1 - January 5, 2009 21