2 Continuity, Differentiability and Taylor’s theorem
2.1 Limits of real valued functions
Let f(x) be defined on (a, b) except possibly at x0.
Definition 2.1.1. We say that lim f(x) = L if, for every real number > 0, there exists a real x→x0 number δ > 0 such that
0 < |x − x0| < δ =⇒ |f(x) − L| < . (2.1)
Equivalently,
Remark 2.1. The above definition is equivalent to: for any sequence {xn} with xn → x0, we have f(xn) → L as n → ∞.
Proof. Suppose limx→x0 f(x) exists. Take > 0 and let {xn} be a sequence converging to x0. Then there exists N such that |xn − x0| < δ for n ≥ N. Then by the definition |f(xn) − L| < . i.e., f(xn) → L. For the other side, assume that xn → c =⇒ f(xn) → L. Suppose the limit does not exist. i.e., ∃ 0 > 0 such that for any δ > 0, there is x ∈ |x − x0| < δ, for which |f(x) − L| ≥ 0. Then take 1 1 δ = n and pick xn in |xn − x0| < n , then xn → x0 but |f(xn) − L| ≥ 0. Not possible. Theorem 2.1.2. If limit exists, then it is unique.
Proof. Proof is easy.
3x 1 Examples 2.1.3. 1. lim( − 1) = . Let > 0. We have to find δ > 0 such that (2.1) x→1 2 2 holds with L = 1/2. Working backwards,
3 2 |x − 1| < when ever |x − 1| < δ := . 2 3
( x2 x 6= 2 2. Prove that lim f(x) = 4, where f(x) = x→2 1 x = 2 1 Problem: Show that lim sin( ) does not exist. x→0 x 1 1 Consider the sequences {xn} = { }, {yn} = { π }. Then it is easy to see that xn, yn → 0 nπ 2nπ + 2 1 1 and sin → 0, sin → 1. In fact, for every c ∈ [−1, 1], we can find a sequence zn such xn yn 1 that zn → 0 and sin( ) → c as n → ∞. zn By now we are familiar with limits and one can expect the following:
1 Theorem 2.1.4. Suppose lim f(x) = L and lim g(x) = M, then x→c x→c 1. lim(f(x) ± g(x)) = L ± M. x→c 2. f(x) ≤ g(x) for all x in an open interval containing c. Then L ≤ M. f L 3. lim(fg)(x) = LM and when M 6= 0, lim (x) = . x→c x→c g M 4. (Sandwich): Suppose that h(x) satisfies f(x) ≤ h(x) ≤ g(x) in an interval containing c, and L = M. Then lim h(x) = L. x→c Proof. We give the proof of (iii). Proof of other assertions are easy to prove. Let > 0. From the definition of limit, we have δ1, δ2, δ3 > 0 such that 1 |x − c| < δ =⇒ |f(x) − L| < =⇒ |f(x)| < N for some N > 0, 1 2 |x − c| < δ =⇒ |f(x) − L| < , and 2 2M |x − c| < δ =⇒ |g(x) − M| < . 3 2N
Hence for |x − c| < δ = min{δ1, δ2, δ3}, we have
|f(x)g(x) − LM| ≤ |f(x)g(x) − f(x)M| + |f(x)M − LM| ≤ |f(x)||g(x) − M| + M|f(x) − L| < .
To prove the second part, note that there exists an interval (c − δ, c + δ) around c such that g(x) 6= 0 in (c − δ, c + δ). Examples 2.1.5. (i) lim xm = 0 (m > 0). (ii) lim x sin x = 0. x→0 x→0 Remark 2.2. Suppose f(x) is bounded in an interval containing c and lim g(x) = 0. Then x→c lim f(x)g(x) = 0. x→c 1 Examples 2.1.6. (i) lim |x| sin = 0. (ii) limx→0 |x| ln |x| = 0. x→0 x One sided limits: Let f(x) is defined on (c, b). The right hand limit of f(x) at c is L, if given > 0, there exists δ > 0, such that
0 < x − c < δ =⇒ |f(x) − L| < .
Notation: lim f(x) = L. Similarly, one can define the left hand limit of f(x) at b and is denoted x→c+ by lim f(x) = L. x→b−
Both theorems above holds for right and left limits. Proof is easy.
2 sin θ Problem: Show that limθ→0 θ = 1. Solution: Consider the unit circle centered at O(0, 0) and passing through A(1, 0) and B(0, 1). Let Q be the projection of P on x−axis and the point T is such that A is the projection of T on x−axis. Let OT be the ray with ∠AOT = θ, 0 < θ < π/2. Let P be the point of intersection of OT and circle. Then ∆OPQ and ∆OTA are similar triangles and hence, Area of ∆OAP < Area of sector OAP < area of ∆OAT . i.e.,
1 1 1 sin θ < θ < tan θ 2 2 2 sin θ sin θ dividing by sin θ, we get 1 > > cos θ. Now lim cos θ = 1 implies that lim = 1. θ θ→0+ θ→0+ θ sin θ Now use the fact that is even function. θ At this stage, it is not difficult to prove the following:
Theorem 2.1.7. limx→a f(x) = L exists ⇐⇒ limx→a+ f(x) = limx→a− f(x) = L.
Limits at infinity and infinite limits
Definition 2.1.8. f(x) has limit L as x approaches +∞, if for any given > 0, there exists M > 0 such that x > M =⇒ |f(x) − L| < .
Similarly, one can define limit as x approaches −∞.
1 1 Problem: (i) lim = 0, (ii) limx→−∞ = 0. (iii) lim sin x does not exist. x→∞ x x x→∞ π Solution: (i) and (ii) are easy. For (iii), Choose xn = nπ and yn = 2 +2nπ. Then xn, yn → ∞ and sin xn = 0, sin yn = 1. Hence the limit does not exist.
Above two theorems on limits hold in this also.
Definition 2.1.9. (Horizontal Asymptote:) A line y = b is a horizontal asymptote of y = f(x) if either lim f(x) = b or lim f(x) = b. x→∞ x→−∞
1 Example 2.1.10. (i) y = 1 is a horizontal asymptote for 1 + x+1
Definition 2.1.11. (Infinite Limit): A function f(x) approaches ∞ (f(x) → ∞) as x → x0 if, for every real B > 0, there exists δ > 0 such that
0 < |x − x0| < δ =⇒ f(x) > B.
Similarly, one can define for −∞. Also one can define one sided limit of f(x) approaching ∞ or −∞.
3 1 1 1 Examples 2.1.12. (i) lim = ∞, (ii) limx→0 2 sin( ) does not exist. x→0 x2 x x For (i) given B > 0, we can choose δ ≤ √1 . For (ii), choose a sequence {x } such that B n 1 sin 1 = 1, say 1 = π + 2nπ and 1 = nπ. Then lim f(x ) = → ∞ and lim f(y ) = 0, xn xn 2 yn n 2 n n→∞ xn n→∞ though xn, yn → 0 as n → ∞. Definition 2.1.13. (Vertical Asymptote:) A line x = a is a vertical asymptote of y = f(x) if either lim f(x) = ±∞ or lim f(x) = ±∞. x→a+ x→a− x+3 Example 2.1.14. f(x) = x+2 . x = −2 is a vertical asymptote and y = 1 is a horizontal asymptote.
2.2 Continuous functions Definition 2.2.1. A real valued function f(x) is said to be continuous at x = c if (i) c ∈ domain(f) (ii) lim f(x) exists x→c (iii) The limit in (ii) is equal to f(c).
In other words, for every sequence xn → c, we must have f(xn) → f(c) as n → ∞. That is, for a given > 0, there exists δ > 0 such that
|x − c| < δ =⇒ |f(x) − f(c)| < .
( x2 sin( 1 ) x 6= 0 Examples 2.2.2. 1. f(x) = x is continuous at 0. 0 x = 0 √ Let > 0. Then |f(x) − f(0)| ≤ |x2|. So it is enough to choose δ = . ( 1 sin 1 x 6= 0 2. g(x) = x x is not continuous at 0. 0 x = 0 Choose 1 = π + 2nπ. Then lim x = 0 and f(x ) = 1 → ∞. xn 2 n n xn The following theorem is an easy consequence of the definition. Theorem 2.2.3. Suppose f and g are continuous at c. Then (i) f ± g is also continuous at c (ii) fg is continuous at c f (iii) is continuous at c if g(c) 6= 0. g Theorem 2.2.4. Composition of continuous functions is also continuous i.e., if f is continuous at c and g is continuous at f(c) then g(f(x)) is continuous at c. Corollary 2.2.5. If f(x) is continuous at c, then |f| is also continuous at c. Theorem 2.2.6. If f, g are continuous at c, then max(f, g) is continuous at c.
4 Proof. Proof follows from the relation
1 1 max(f, g) = (f + g) + |f − g| 2 2 and the above theorems.
Types of discontinuities
Removable discontinuity: f(x) is defined every where in an interval containing a except at x = a and limit exists at x = a OR f(x) is defined also at x = a and limit is NOT equal to function value at x = a. Then we say that f(x) has removable discontinuity at x = a. These functions can be extended as continuous functions by defining the value of f to be the limit value at x = a. ( sin x x 6= 0 Example 2.2.7. f(x) = x . Here limit as x → 0 is 1. But f(0) is defined to be 0. 0 x = 0 Jump discontinuity: The left and right limits of f(x) exists but not equal. This type of discontinuities are also called discontinuities of first kind. ( 1 x ≤ 0 Example 2.2.8. f(x) = . Easy to see that left and right limits at 0 are different. −1 x ≥ 0 Infinite discontinuity: Left or right limit of f(x) is ∞ or −∞.
1 Example 2.2.9. f(x) = x has infinite discontinuity at x = 0. Discontinuity of second kind: If either lim f(x) or lim f(x) does not exist, then c is called x→c− x→c+ discontinuity of second kind. Example 2.2.10. Consider the function ( 0 x ∈ Q f(x) = 1 x 6∈ Q
1 Then f does not have left or right limit any point c. Indeed, if c ∈ Q, then xn = c + n ∈ Q and π 1 π yn = c + n 6∈ Q. For these sequences, we will have, f(c + n ) and f(c + n ) converges to different 1 1 values. If c 6∈ Q, then choos xn ∈ (c, c + n ) ∩ Q and yn = c + n 6∈ Q. For these sequences we will again get different limit values. Properties of continuous functions
Definition 2.2.11. (Closed set): A subset A of R is called closed set if A contains all its limit points. (i.e., if {xn} ⊂ A and xn → c, then c ∈ A). Theorem 2.2.12. Continuous functions on closed, bounded interval is bounded.
5 Proof. Let f(x) be continuous on [a, b] and let {xn} ⊂ [a, b] be a sequence such that |f(xn)| > n.
Then {xn} is a bounded sequence and hence there exists a subsequence {xnk } which converges to c. Then f(xnk ) → f(c), a contradiction to |f(xnk | > nk. Theorem 2.2.13. Let f(x) be a continuous function on closed, bounded interval [a, b]. Then supremum and infimum of functions are achieved in [a, b].
Proof. Above theoem and the completeness of R implies that Supremum of f is finite Let {xn} be a sequence such that f(xn) → sup f. Then {xn} is bounded and hence by Bolzano-Weierstrass theorem, there exists a subsequence xnk such that xnk → x0 for some x0. a ≤ xn ≤ b implies x0 ∈ [a, b]. Since f is continuous, f(xnk ) → f(x0). Hence f(x0) = sup f. The attainment of minimum can be proved by noting that −f is also continuous and min f = − sup(−f). Remark 2.3. Closed and boundedness of the interval is important in the above theorem. Con- 1 sider the examples (i) f(x) = x on (0, 1) (ii) f(x) = x on R. Theorem 2.2.14. Let f(x) be a continuous function on [a, b] and let f(c) > 0 for some c ∈ (a, b), Then there exists δ > 0 such that f(x) > 0 in (c − δ, c + δ).
1 Proof. Let = 2 f(c) > 0. Since f(x) is continuous at c, there exists δ > 0 such that 1 |x − c| < δ =⇒ |f(x) − f(c)| < f(c) 2
1 1 1 i.e., − 2 f(c) < f(x) − f(c) < 2 f(c). Hence f(x) > 2 f(c) for all x ∈ (c − δ, c + δ). R b Corollary 2.2.15. Suppose a continuous functions f(x) satisfies a f(x)φ(x)dx = 0 for all continuous functions φ(x) on [a, b]. Then f(x) ≡ 0 on [a, b].
Proof. Suppose f(c) > 0. Then by above theorem f(x) > 0 in (c − δ, c + δ). Choose φ(x) so R b that φ(x) > 0 in (c − δ/2, c + δ/2) and is 0 otherwise. Then a f(x)φ(x) > 0. A contradiction. Alternatively, one can choose φ(x) = f(x).
Theorem 2.2.16. Let f(x) be a continuous function on R and let f(a)f(b) < 0 for some a, b. Then there exits c ∈ (a, b) such that f(c) = 0.
Proof. Assume that f(a) < 0 < f(b). Let S = {x ∈ [a, b]: f(x) < 0}. Then [a, a + δ) ⊂ S 1 for some δ > 0 and S is bounded. Let c = sup S. We claim that f(c) = 0. Take xn = c + n , 1 then xn 6∈ S, xn → c. Therefore, f(c) = lim f(xn) ≥ 0. On the otherhand, note that c − n is 1 NOT supremum. Therefore, there exists a point yn ∈ (c − n , c) ∩ S. Then note that yn → c, f(c) = lim f(yn) ≤ 0. Hence f(c) = 0. Corollary 2.2.17. Intermediate value theorem: Let f(x) be a continuous function on [a, b] and let f(a) < y < f(b). Then there exists c ∈ (a, b) such that f(c) = y Remark 2.4. A continuous function assumes all values between its maximum and minimum.
6 Problem: (fixed point): Let f(x) be a continuous function from [0, 1] into [0, 1]. Then show that there is a point c ∈ [0, 1] such that f(c) = c.
Define the function g(x) = f(x) − x. Then g(0) ≥ 0 and g(1) ≤ 0. Now Apply Intermediate value theorem.
Application: Root finding: To find the solutions of f(x) = 0, one can think of defining a new function g such that g(x) has a fixed point, which in turn satisfies f(x) = 0. 1/2 3 2 10 Example: (1) f(x) = x + 4x − 10 in the interval [1, 2]. Define g(x) = 4+x . We can check that g maps [1, 2] into [1, 2]. So g has fixed point in [1, 2] which is also solution of f(x) = 0.
Such fixed points can be obtained as limit of the sequence {xn}, where xn+1 = g(xn), x0 ∈ (1, 2). Note that √ 10 1 g0(x) = < . (4 + x)3/2 2 By Mean Value Theorem, ∃ z (see next section)
1 |x − x | = |g0(z)||x − x | ≤ |x − x | n+1 n n n−1 2 n n−1 Iterating this, we get 1 |x − x | < |x − x |. n+1 n 2n 1 0
Therefore, {xn} is a Cauchy sequence. (see problem after Theorem 1.4.4).
Uniformly continuous functions
Definition 2.2.18. A function f(x) is said to be uniformly continuous on a set S, if for given > 0, there exists δ > 0 such that
x, y ∈ S, |x − y| < δ =⇒ |f(x) − f(y)| < .
Here δ depends only on , not on x or y. Proposition 2.2.19. Proposition: If f(x) is uniformly continuous function ⇐⇒ for ANY two sequences {xn}, {yn} such that |xn − yn| → 0, we have |f(xn) − f(yn)| → 0 as n → ∞.
Proof. Suppose not. Then there exists {xn}, {yn} such that |xn−yn| → 0 and |f(xn)−f(yn)| > η for some η > 0. Then it is clear that for = η, there is no δ for which |x − y| < δ =⇒ |f(x) − f(y)| < . Because the above sequence satisfies |x − y| < δ, but its image does not.
For converse, assume that for any two sequences {xn}, {yn} such that |xn − yn| → 0 we have |f(xn) − f(yn)| → 0. Suppose f is not uniformly continuous. Then by the definition there exists 0 such that for any δ > 0, there exist z, w ∈ |x − y| < δ for which |f(z) − f(w)| > 0. Now take 1 1 δ = n and choose zn, wn such that |zn − wn| < n . Then |f(zn) − f(wn)| > 0. A contradiction.
7 Examples 2.2.20. 1. f(x) = x2 is uniformly continuous on bounded interval [a, b]. 2 2 Note that |x − y | ≤ |x + y||x − y| ≤ 2b|x − y|. So one can choose δ < 2b . 1 2. f(x) = x is not uniformly continuous on (0, 1). 1 1 Take xn = n+1 , yn = n , then for n large |xn − yn| → 0 but |f(xn) − f(yn)| = 1. 3. f(x) = x2 is not uniformly continuous on IR. 1 1 1 Take xn = n + n and yn = n. Then |xn − yn| = n → 0, but |f(xn) − f(yn)| = 2 + n2 > 2. Remark 2.5. 1. It is easy to see from the definition that if f, g are uniformly continuous, then f ± g is also uniformly continuous.
2. If f, g are uniformly continuous, then fg need not be uniformly continuous. This can be seen by noting that f(x) = x is uniformly continuous on IR but x2 is not uniformly continuous on IR. Theorem 2.2.21. A continuous function f(x) on a closed, bounded interval [a, b] is uniformly continuous.
Proof. Suppose not. Then there exists > 0 and sequences {xn} and {yn} in [a, b] such that 1 |xn − yn| < n and |f(xn) − f(yn)| > . But then by Bolzano-Weierstrass theorem, there exists a subsequence {xnk } of {xn} that converges to x0. Also ynk → x0. Now since f is continuous, we have f(x0) = lim f(xnk ) = lim f(ynk ). Hence |f(xnk ) − f(ynk )| → 0, a contradiction.
Corollary 2.2.22. Suppose f(x) has only removable discontinuities in [a, b]. Then f˜, the ex- tension of f, is uniformly continuous.
sin x Example 2.2.23. f(x) = x for x 6= 0 and 0 for x = 0 on [0, 1].
Theorem 2.2.24. Let f be a uniformly continuous function and let {xn} be a cauchy sequence. Then {f(xn)} is also a Cauchy sequence.
Proof. Let > 0. As f is uniformly continuous, there exists δ > 0 such that
|x − y| < δ =⇒ |f(x) − f(y)| < .
Since {xn} is a Cauchy sequence, there exists N such that
m, n > N =⇒ |xn − xm| < δ.
Therefore |f(xn) − f(xm)| < .
1 Example 2.2.25. f(x) = x2 is not uniformly continuous on (0, 1). 1 2 The sequence xn = n is cauchy but f(xn) = n is not. Hence f cannot be uniformly continuous.
8 2.3 Differentiability
Definition 2.3.1. A real valued function f(x) is said to be differentiable at x0 if
f(x + h) − f(x ) lim 0 0 exists. h→0 h
0 This limit is called the derivative of f at x0, denoted by f (x0). Example: f(x) = x2
2xh + h2 f 0(x) = lim = 2x. h→0 h Theorem 2.3.2. If f(x) is differentiable at a, then it is continuous at a.
Proof. For x 6= a, we may write,
f(x) − f(a) f(x) = (x − a) + f(a). (x − a)
f(x)−f(a) 0 Now taking the limit x → a and noting that lim(x − a) = 0 and lim (x−a) = f (a), we get the result. f Theorem 2.3.3. Let f, g be differentiable at c ∈ (a, b). Then f ± g, fg and (g(c) 6= 0) is also g differentiable at c
Proof. We give the proof for product formula: First note that
(fg)(x) − (fg)(c) g(x) − g(c) f(x) − f(c) = f(x) + g(c) . x − c x − c x − c Now taking the limit x → c, we get the product formula
(fg)0(c) = f(c)g0(c) + f 0(c)g(c).
Since g(c) 6= 0 and g is continuous, we get g(x) 6= 0 in a small interval around c. Therefore
f f g(c)f(x) − g(c)f(c) + g(c)f(c) − g(x)f(c) (x) − (c) = g g g(x)g(c)
Hence (f/g)(x) − (f/g)(c) f(x) − f(c) g(x) − g(c) 1 = g(c) − f(c) x − c x − c x − c g(x)g(c) Now taking the limit x → c, we get
f g(c)f 0(c) − f(c)g0(c) ( )0(c) = . g g2(c)
9 Theorem 2.3.4. (Chain Rule): Suppose f(x) is differentiable at c and g is differentiable at f(c), then h(x) := g(f(x)) is differentiable at c and
h0(c) = g0(f(c))f 0(c)
Proof. Define the function h as
( g(y)−g(f(c)) y 6= f(c) h(y) = y−f(c) g0(f(c)) y = f(c)
Then the function h is continuous at y = f(c) and g(y) − g(f(c)) = h(y)(y − f(c)), so
g(f(x)) − g(f(c)) f(x) − f(c) = h(f(x)) . x − c x − c Now taking limit x → c, we get the required formula.
Local extremum: A point x = c is called local maximum of f(x), if there exists δ > 0 such that 0 < |x − c| < δ =⇒ f(c) ≥ f(x).
Similarly, one can define local minimum: x = b is a local minimum of f(x) if there exists δ > 0 such that 0 < |x − b| < δ =⇒ f(b) ≤ f(x).
Theorem 2.3.5. Let f(x) be a differentiable function on (a, b) and let c ∈ (a, b) is a local maximum of f. Then f 0(c) = 0.
Proof. Let δ be as in the above definition. Then
f(x) − f(c) x ∈ (c, c + δ) =⇒ ≤ 0 x − c
f(x) − f(c) x ∈ (c − δ, c) =⇒ ≥ 0. x − c Now taking the limit x → c, we get f 0(c) = 0. Theorem 2.3.6. Rolle’s Theorem: Let f(x) be a continuous function on [a, b] and differentiable on (a, b) such that f(a) = f(b). Then there exists c ∈ (a, b) such that f 0(c) = 0.
Proof. If f(x) is constant, then it is trivial. Suppose f(x0) > f(a) for some x0 ∈ (a, b), then f attains maximum at some c ∈ (a, b). Other possibilities can be worked out similarly. Theorem 2.3.7. Mean-Value Theorem (MVT): Let f be a continuous function on [a, b] and differentiable on (a, b). Then there exists c ∈ (a, b) such that
f(b) − f(a) = f 0(c)(b − a).
10 Proof. Let l(x) be a straight line joining (a, f(a)) and (b, f(b)). Consider the function g(x) = f(x) − l(x). Then g(a) = g(b) = 0. Hence by Rolle’s theorem
f(b) − f(a) 0 = g0(c) = f 0(c) − b − a
Corollary 2.3.8. If f is a differentiable function on (a, b) and f 0 = 0, then f is constant.
Proof. By mean value theorem f(x) − f(y) = 0 for all x, y ∈ (a, b). Example 2.3.9. Show that | cos x − cos y| ≤ |x − y|. Use Mean-Value theorem and the fact that | sin x| ≤ 1. Problem: If f(x) is differentiable and sup |f 0(x)| < C for some C. Then, f is uniformly continuous. Apply mean value theorem to get |f(x) − f(y)| ≤ C|x − y| for all x, y. Definition 2.3.10. A function f(x) is strictly increasing on an interval I, if for x, y ∈ I with x < y we have f(x) < f(y). We say f is strictly decreasing if x < y in I implies f(x) > f(y). Theorem 2.3.11. A differentiable function f is (i) strictly increasing in (a, b) if f 0(x) > 0 for all x ∈ (a, b). (ii) strictly decreasing in (a, b) if f 0(x) < 0.
Proof. Choose x, y in (a, b) such x < y. Then by MVT, for some c ∈ (x, y)
f(x) − f(y) = f 0(c) > 0. x − y
Hence f(x) < f(y).
2.4 Taylor’s theorem and Taylor Series Let f be a k times differentiable function on an interval I of IR. We want to approximate this function by a polynomial Pn(x) such that Pn(a) = f(a) at a point a. Moreover, if the deriva- tives of f and Pn also equal at a then we see that this approximation becomes more accurate in a neighbourhood of a. So the best coefficients of the polynomial can be calculated using (k) (k) the relation f (a) = Pn (a), k = 0, 1, 2, ..., n. The best is in the sense that if f(x) itself is a polynomial of degree less than or equal to n, then both f and Pn are equal. This implies that n X f (k)(a) the polynomial is (x − a)k. Then we write f(x) = P (x) + R (x) in a neighbourhood k! n n k=0 of a. From this, we also expect the Rn(x) → 0 as x → a. In fact, we have the following theorem known as Taylor’s theorem:
Theorem 2.4.1. Let f(x) and its derivatives of order m are continuous and f (m+1)(x) exists in a neighbourhood of x = a. Then there exists c ∈ (a, x)( or c ∈ (x, a)) such that
(x − a)m f(x) = f(a) + f 0(a)(x − a) + ..... + f (m)(a) + R (x) m! m
11 Plot of sin(x) and its Taylor polynomials 4
← 3 x
2
1 ← x−x3/3!+x5/5! 0 ← sin(x) sin(x)
−1
−2 ← x−x3/6
−3
−4 −pi −pi/2 0 pi/2 pi −π ≤ x ≤ π
Figure 1: Approximation of sin(x) by Taylor’s polynomials
f (m+1)(c) where R (x) = (x − a)m+1. m (m + 1)! Proof. Define the functions F and g as
f (m)(y) F (y) = f(x) − f(y) − f 0(y)(x − y) − .... − (x − y)m, m!
x − y m+1 g(y) = F (y) − F (a). x − a Then it is easy to check that g(a) = 0. Also g(x) = F (x) = f(x) − f(x) = 0. Therefore, by Rolle’s theorem, there exists some c ∈ (a, x) such that
(m + 1)(x − c)m g0(c) = 0 = F 0(c) + F (a). (x − a)m+1
On the other hand, from the definition of F ,
f (m+1)(c) F 0(c) = − (x − c)m. m!
(x − a)m+1 Hence F (a) = f (m+1)(c) and the result follows. (m + 1)!
Examples: x2 x3 xn (i) ex = 1 + x + + + .... + ec, c ∈ (0, x) or (x, 0) depending on the sign of x. 2! 3! n!
12 x3 x5 xn nπ (ii) sin x = x − + + .... + sin(c + ), c ∈ (0, x) or (x, 0). 3! 5! n! 2 x2 x4 xn nπ (iii) cos x = 1 − + + .... + cos(c + ), c ∈ (0, x) or (x, 0). 2! 4! n! 2
x Problem: Find the order n of Taylor Polynomial Pn, about x = 0 to approximate e in (−1, 1) so that the error is not more than 0.005
xn Solution: We know that pn(x) = 1 + x + .... + n! . The maximum error in [-1,1] is
1 n+1 x e |Rn(x)| ≤ max |x| e ≤ . (n + 1)! [−1,1] (n + 1)!
e So n is such that (n+1)! ≤ 0.005 or n ≥ 5.
Problem: Find the interval of validity when we approximate cos x with 2nd order polynomial with error tolerance 10−4.
x2 x3 Solution: Taylor polynomial of degree 2 for cos x is 1 − 2 . So the remainder is (sin c) 3! . Since −4 x3 −4 | sin c| ≤ 1, the error will be atmost 10 if | 3! | ≤ 10 . Solving this gives |x| < 0.084
Taylor’s Series
Suppose f is infinitely differentiable at a and if the remainder term in the Taylor’s formula,
Rn(x) → 0 as n → ∞. Then we may formally write
∞ X f (n)(a) f(x) = (x − a)n. n! n=0
For fixed x the above infinite sum is a series of real numbers. One can check the convergence of such series by the convergence tests. This series is called Taylor series of f(x) about the point a.
It is also natural (why) for one to expect that Rn(x) → 0 as n → ∞ for the Taylor series to be well defined. In some cases it is easy to verify this. For example, Suppose there exists C = C(x) > 0, independent of n, such that |f (n)(x)| ≤ C(x). Then |x − a|n+1 |Rn(x)| → 0 if lim = 0. For any fixed x and a, we can always find N such that n→∞ (n + 1)! |x−a| |x − a| < N. Let q := N < 1. Then
n+1 (x − a) |x − a| |x − a| |x − a| |x − a| |x − a| = ...... (n + 1)! 1 2 N − 1 N n + 1 N−1 |x − a| n−N+2 < q (N − 1)!
13 → 0 as n → ∞ thanks to q < 1.
In case of a = 0, the formula obtained in Taylor’s theorem is known as Maclaurin’s formula and the corresponding series that one obtains is known as Maclaurin’s series.
Examples 2.4.2. 1. f(x) = ex. xn+1 xn+1 xn+1 In this case R (x) = f (n+1)(c) = ec = eθx, for some θ ∈ (0, 1). n (n + 1)! (n + 1)! (n + 1)! n+1 x θx Therefore for any given x fixed, lim |Rn(x)| = lim e = 0. n→∞ n→∞ (n + 1)! 2. f(x) = sin x. |x|2n+1 nπ In this case it is easy to see that |R (x)| ≤ | sin(c + )|. Now use the fact that n (2n + 1)! 2 | sin x| ≤ 1 and follow as in example (i). Definition 2.4.3. An infinitely differentiable function f(x) is called Real analytic at x = a if the function has Taylor series expansion: There exists R > 0 and
∞ X f (n)(a) f(x) = (x − a)n, |x − a| < R n! n=0
We state the following characterization of real analytic functions. The proof is beyond the scope of this course. Theorem 2.4.4. The following are equivalent 1. f(x) is real analytic at x = a
2. For every closed bounded interval I containing a, there exists C > 0 such that for all k ∈ N ∪ {0}:
(k) k+1 f (x) ≤ C k! ∀x ∈ I.
(2) =⇒ (1) is easy to prove: In fact
n+2 n+1 |Rn+1(x)| ≤ C |x − a| 1 = C(C|x − a|)n+1 → 0 if |x − a| < . C It is not easy to detect if a function is not real analytic. For example ( e−1/x, x > 0 f(x) = 0 x ≤ 0.
This function is infinitely differentiable and all its derivatives at 0 are equal to zero. So the Taylor series at zero identically zero. But the function is not identically equal to zero in any interval containing zero.
14 Maxima and Minima: Derivative test Definition 2.4.5. A point x = a is called critical point of the function f(x) if f 0(a) = 0. Second derivative test: A point x = a is a local maxima if f 0(a) = 0, f 00(a) < 0.
Suppose f(x) is continuously differentiable in an interval around x = a and let x = a be a critical point of f. Then f 0(a) = 0. By Taylor’s theorem around x = a, there exists, c ∈ (a, x) (or c ∈ (x, a)), f 00(c) f(x) − f(a) = (x − a)2. 2 If f 00(a) < 0. Then by Theorem2.2.14, f 00(c) < 0 in |x−a| < δ. Hence f(x) < f(a) in |x−a| < δ, which implies that x = a is a local maximum.
Similarly, one can show the following for local minima: x = a is a local minima if f 0(a) = 0, f 00(a) > 0.
Also the above observations show that if f 0(a) = 0, f 00(a) = 0 and f (3)(a) 6= 0, then the sign of f(x) − f(a) depends on (x − a)3. i.e., it has no constant sign in any interval containing a. Such point is called point of inflection or saddle point.
We can also derive that if f 0(a) = f 00(a) = f (3)(a) = 0, then we again have x = a is a local minima if f (4)(a) > 0 and is a local maxima if f (4)(a) < 0.
Summarizing the above, we have: Theorem 2.4.6. Let f be a real valued function that is differentiable 2n times and f (2n) is continuous at x = a . Then 1. If f (k)(a) = 0 for k = 1, 2, ....2n − 1 and f (2n)(a) > 0 then a is a point of local minimum of f(x)
2. If f (k)(a) = 0 for k = 1, 2, ....2n − 1 and f (2n)(a) < 0 then a is a point local maximum of f(x).
3. If f (k) = 0 for k = 1, 2, ....2n − 2 and f (2n−1)(a) 6= 0, then a is point of inflection. i.e., f has neither local maxima nor local minima at x = a. L’Hospitals Rule: Suppose f(x) and g(x) are differentiable n times, f (n), g(n) are continuous at a and f (k)(a) = g(k)(a) = 0 for k = 0, 1, 2, ...., n − 1. Also if g(n)(a) 6= 0. Then by Taylor’s theorem,
f(x) f (n)(c) lim = lim x→a g(x) x→a g(n)(c) f (n)(a) = g(n)(a)
15 In the above, we used the fact that g(n)(x) 6= 0 ”near x = a” and g(n)(c) → g(n)(a) as x → a. 1 Similarly, we can derive a formula for limits as x approaches infinity by taking x = y .
f(x) f(1/y) lim = lim x→∞ g(x) y→0 g(1/y) (−1/y2)f 0(1/y) = lim y→0 (−1/y2)g0(1/y) f 0(x) = lim x→∞ g0(x)
2.5 Power series & Taylor Series ∞ ∞ P n Given a sequence of real numbers {an}n=0, the series an(x − c) is called power series with n=0 center c. It is easy to see that a power series converges for x = c. Power series is a function of x provided it converges for x. If a power series converges, then the domain of convergence is either a bounded interval or the whole of IR. So it is natural to study the largest interval where the power series converges.
P n P n Remark 2.6. If anx converges at x = r, then anx converges for |x| < |r|.
n Proof. We can find C > 0 such that |anx | ≤ C for all n. Then x x |a xn| ≤ |a rn|| |n ≤ C| |n. n n r r Conclusion follows from comparison theorem. ∞ P n pn 1 Theorem 2.5.1. Consider the power series anx . Suppose β = lim sup |an| and R = β n=0 (We define R = 0 if β = ∞ and R = ∞ if β = 0). Then
∞ P n 1. anx converges for |x| < R n=0 ∞ P n 2. anx diverges for |x| > R. n=0 3. No conclusion if |x| = R.
n Proof. Proof of (i) follows from the root test. For a proof, take αn(x) = anx and α = pn lim sup |αn|. For (ii), one can show that if |x| > R, then there exists a subsequence {an} 1 such that an 6→ 0. Notice that α = β|x|. For (iii), observe as earlier that the series with an = n 1 and bn = n2 will have R = 1. Similarly, we can prove: ∞ P n an+1 1 Theorem 2.5.2. Consider the power series anx . Suppose β = lim and R = (We an β n=0 define R = 0 if β = ∞ and R = ∞ if β = 0). Then
16 ∞ P n 1. anx converges for |x| < R n=0 ∞ P n 2. anx diverges for |x| > R. n=0 3. No conclusion if |x| = R.
Definition 2.5.3. The real number R in the above theorems is called the Radius of convergence of power series. P xn P xn P −n 3n Examples 2.5.4. Find the interval of convergence of (i) n (ii) n! (iii) 2 x 1. β = lim | an+1 | = 1, and we know that the series does not converge for x = 1, but converges an at x = −1.
2. β = lim | an+1 | = 0. Hence the series converges everywhere. an 3. To see the subsequent non-zero terms, we write the series as P 2−n(x3)n = P 2−nyn. For pn −1 −1/3 1/3 this series βy = lim sup |an| = 2 . Therefore, βx = 2 and R = 2 .
( n 2 n is even an+1 an+1 Example 2.5.5. Let an = . Then lim sup = 4 and the limit of does 2n−1 n is odd an an 1/n P n not exist. But lim sup |an| = 1/2. So the radius of convergence of the series anx is 1/2. The following theorem is very useful in identifying the domain of convergence of some Taylor series. ∞ P n Theorem 2.5.6. (Term by term differentiation and integration): Suppose f(x) = anx n=0 converges for |x| < R. Then
∞ P n−1 0 1. nanx converges in |x| < R and is equal to f (x). n=0 ∞ P 1 n+1 R 2. n+1 anx converges in |x| < R and is equal to f(x)dx. n=0 From this theorem one concludes that a power series is infinitely differentiable with in its radius of convergence. Now it is natural to ask weather this series coincides with the Taylor series of P n the resultant function. The answer is yes and it is simple to prove that if f(x) = anx , then f (n) an = n! . The above theorem is useful to find Taylor series of some functions. Example 2.5.7. The Taylor series of f(x) = tan−1 x and a domain of its convergence.
Z dx Z tan−1 x = = 1 − x2 + x4 + ... 1 + x2 x3 x5 =x − + + ... 3 5
17 It is easy to check that the Radius of convergence of this series is equal to 1 (Try!). At the end point x = 1 we get interesting sum
1 1 1 π 1 − + − + .... = tan−1(1) = . 3 5 7 4
−1 Though the function tan x is defined on all of R, we see that the power series converges on (−1, 1). We can apply Abel’s theorem on alternating series to show that the series converges at x = 1, −1. For approximation, we can use the error approximation of alternating series discussed in the −1 previous section. The total error if we approximate tan x by sn(x), then the maximum error |x|n+1 is n+1 .
We note that the power series may converge to a function on small interval, even though the function is defined on a much bigger interval. For example the function log(1 + x) has power series that converges on (−1, 1), but log(1 + x) is defined on (−1, ∞). This is obvious due to the fact that the domain of convergence of power series is symmetric about the center. For instance, for a function defined on (−1, 3) the radius of convergence of its power series(about 0) cannot be more than 1. Another interesting application is to integrate the functions for which we have no ”clue”. For example, x x 2 4 3 5 Z 2 Z t t x x (1) erf(x) = e−t dt = (1 − + + ... = x − + + ... 0 0 1! 2! 3 10 Z x sin t Z x t2 t4 x3 x5 (2) = 1 − + = x − + + ... 0 t 0 3! 5! 3! · 3 5! · 5
18