Information about Week 7.2 Taylor Series

Published on March 6, 2014

Author: anhtuantran509

Source: slideshare.net

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 2 / 31

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 3 / 31

Taylor’s Formula for Function of One Variable Let f (x ) be at least n times diﬀerentiable and let a be a real number The Taylor polynomial of order n around the point a is Pn (x ) = f (a) + (x − a)f (a) + (x − a)2 (x − a)n (n) f (a) + . . . + f (a) 2 n! n = (x − a)k (k) f (a) k! k=0 Want to use Pn (x ) to approximate f (x ) Questions: Convergence: does Pn (x ) → x as n → ∞? Order: how well does Pn (x ) approximate f (x )? Kjell Konis (Copyright © 2013) 7.2 Taylor Series 4 / 31

Approximation Error Diﬀerence between f (x ) and Pn (x ) is called the nth order Taylor approximation error Taylor approximation error: derivative form Let f (x ) be n + 1 times diﬀerentiable, f (n+1) continuous There is a point c between a and x such that f (x ) − Pn (x ) = (x − a)n+1 (n+1) f (c) (n + 1)! Taylor approximation error: integral form Let f (x ) be n + 1 times diﬀerentiable, f (n+1) continuous x f (x ) − Pn (x ) = a Kjell Konis (Copyright © 2013) 7.2 Taylor Series (x − t)n (n+1) f (t) dt n! 5 / 31

1.0 Example: Linear approximation of log(x ) log(x) −0.5 0.0 log(x) 0.5 P1(x) 0 1 2 x 3 4 Linear approximation of log(x ) around the point a = 1 Taylor polynomial of order 1 for f (x ) = log(x ) (x − a) P1 (x ) = f (a) + f (a) 1! = 0 + (x − 1) 1 1 = x −1 Kjell Konis (Copyright © 2013) 7.2 Taylor Series 6 / 31

Example: Integral Form of Taylor Approximation Error What is the Taylor approximation error at the point x = e? x f (x ) − P1 (x ) = 1 (x − t) f (t) dt 1! e f (e) − P1 (e) = (e − t) 1 e log(e) − (e − 1) = 2−e = = 1 −1 dt t2 1 e − 2 dt t t log(t) + log(e) + e t e 1 e e − log(1) + e 1 = 2 − e ≈ −0.718 Kjell Konis (Copyright © 2013) 7.2 Taylor Series 7 / 31

Example: Derivative Form of Taylor Approximation Error What is the Taylor approximation error at the point x = e? f (x ) − P1 (x ) = (x − 1)(1+1) f (c) (1 + 1)! 2−e = −(e − 1)2 2c 2 c = (e − 1)2 2e − 4 c ∈ [1, e] 1 ≤ c ≈ 1.434 ≤ e ≈ 2.718 Have to know the approximation error to ﬁnd c to ﬁnd the . . . How is this useful? Kjell Konis (Copyright © 2013) 7.2 Taylor Series 8 / 31

Bounding the Taylor Approximation Error Know that the true approximation error occurs at c ∈ [1, e] Follows that |error| ≤ max c∈[1,e] (x − 1)2 f (c) 2! ≤ (e − 1)2 2c 2 c∈[1,e] ≤ 1 (e − 1)2 ≈ 1.476 2 max Thus |f (e) − P1 (e)| < 1.477 Kjell Konis (Copyright © 2013) 7.2 Taylor Series 9 / 31

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 10 / 31

“Big O” Notation Consider a degree n polynomial as x → ∞ n ak x k P(x ) = k=0 As n → ∞, the highest order term dominates the others |P(x )| | = lim x →∞ x n x →∞ lim n k k=0 ak x | xn n−1 = lim an + x →∞ ak = |an | x n−k k=0 “Big O” notation provides a compact way to state the same information P(x ) = O(x n ) as x → ∞ Kjell Konis (Copyright © 2013) 7.2 Taylor Series 11 / 31

“Big O” Notation Formally Let f , g : R → R f (x ) = O(g(x )) as x → ∞ means there are C > 0 and M > 0 such that f (x ) ≤ C when x ≥ M g(x ) For ﬁnite points: f (x ) = O(g(x )) as x → a means there are C > 0 and δ > 0 such that f (x ) ≤C g(x ) when |x − a| ≤ δ Example: Taylor polynomial approximation error f (x ) − Pn (x ) = O (x − a)n+1 Kjell Konis (Copyright © 2013) 7.2 Taylor Series as x → a 12 / 31

“Big O” Notation Can also write the Taylor polynomial approximation as f (x ) − Pn (x ) = O (x − a)n+1 f (x ) = Pn (x ) + O (x − a)n+1 f (x ) = f (a) + . . . + (x − a)n (n) f (a) + O (x − a)n+1 n! Linear approximation is second order f (x ) = f (a) + (x − a)f (a) + O (x − a)2 as x → a Quadratic approximation is third order f (x ) = f (a) + (x − a)f (a) + Kjell Konis (Copyright © 2013) (x − a)2 f (a) + O (x − a)3 2 7.2 Taylor Series as x → a 13 / 31

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 14 / 31

Taylor’s Formula for Functions of Several Variables Let f be a function of n variables x = (x1 , x2 , . . . , xn ) Linear approximation of f around the point a = (a1 , a2 , . . . , an ) n f (x ) ≈ f (a) + (xi − ai ) i=1 ∂f (a) ∂xi If 2nd order partial derivatives continuous ⇒ 2nd order approximation n (xi − ai ) f (x ) = f (a) + i=1 O x −a 2 n i=1 O = ∂f (a) + O x − a ∂xi n (xi − ai ) i=1 Kjell Konis (Copyright © 2013) as x → a |xi − ai |2 Quadratic approximation around a is O x − a f (x ) ≈ f (a) + 2 3 n n ∂f (xi − ai )(xj − aj ) ∂ 2 f (a) + (a) ∂xi 2! ∂xi ∂xj i=1 j=1 7.2 Taylor Series 15 / 31

Taylor’s Formula in Matrix Notation Let Df (x ) = ∂f ∂f ∂f ... ∂x1 ∂xn ∂xn x1 − a1 x2 − a2 x −a = . . . xn − an ∂2f 2 ∂x1 2 ∂ f D 2 f (x ) = ∂x1.∂x2 . . 2 ∂ f ∂x1 ∂xn ∂2f ∂x2 ∂x1 ... ∂2f 2 ∂x2 ... .. . . . . ∂2f ∂x2 ∂xn ... ∂2f ∂xn ∂x1 ∂2f ∂xn ∂x2 . . . ∂2f 2 ∂xn Linear Taylor approximation f (x ) = f (a) + Df (a)(x − a) + O x − a 2 Quadratic Taylor approximation f (x ) = f (a) + Df (a)(x − a) + Kjell Konis (Copyright © 2013) 1 (x − a)T D 2 f (a)(x − a) + O x − a 2! 7.2 Taylor Series 3 16 / 31

Example: Functions of Two Variables Let f be a function of 2 variables Linear approximation of f around the point (a, b) f (x , y ) ≈ f (a, b) + (x − a) ∂f ∂f (a, b) + (y − b) (a, b) ∂x ∂y Second order approximation since (as (x , y ) → (a, b)) ∂f ∂f f (x , y ) = f (a, b) + (x − a) (a, b) + (y − b) (a, b) ∂x ∂y + O |x − a|2 + O |y − b|2 In matrix notation f (x , y ) = f (a) + Df (a, b) Kjell Konis (Copyright © 2013) x −a + O |x − a|2 + O |y − b|2 y −b 7.2 Taylor Series 17 / 31

Example: Functions of Two Variables (continued) Quadratic approximation of f around the point (a, b) f (x , y ) = f (a, b) + (x − a) + ∂f ∂f (a, b) + (y − b) (a, b) ∂x ∂y (x − a)2 ∂ 2 f ∂2f (a, b) (a, b) + (x − a)(y − b) 2! ∂x 2 ∂x ∂y + (y − b)2 ∂ 2 f (a, b) + O |x − a|3 + O |y − b|3 2! ∂y 2 Matrix notation f (x , y ) = f (a, b) + Df (a, b) + x −a y −b 1 x −a x − a y − b D 2 f (a, b) y −b 2 +O |x − a|3 + O |y − b|3 Kjell Konis (Copyright © 2013) 7.2 Taylor Series 18 / 31

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 19 / 31

Taylor Series Expansions If f is inﬁnitely many times diﬀerentiable, can deﬁne Taylor series expansion as n (x − a)k (k) f (a) n→∞ k! k=0 T (x ) = lim Pn (x ) = lim n→∞ A Taylor series expansion is a special case of a power series ∞ n ak (x − a)k = T (x ) = S(x ) ≡ lim n→∞ k=0 Power series coeﬃcients ak = ak (x − a)k k=0 f (k) (a) k! Convergence properties for Taylor series inherited from convergence properties of power series Kjell Konis (Copyright © 2013) 7.2 Taylor Series 20 / 31

Radius of Convergence The radius of convergence is the number R > 0 such that ∞ ak (x − a)k < ∞ S(x ) = ∀ x ∈ (a − R, a + R) k=0 S(x ) inﬁnitely many times diﬀerentiable on the interval (a − R, a + R) S(x ) not deﬁned if x < a − R or if x > a + R If limk→∞ |ak |1/k exists, then R= 1 lim |ak |1/k k→∞ For Taylor series expansions, if limk→∞ R= Kjell Konis (Copyright © 2013) k |f k) (a)|1/k exists, then 1 k lim (k) e k→∞ |f (a)|1/k 7.2 Taylor Series 21 / 31

Radius of Convergence So far, T (x ) < ∞ for x ∈ (a − R, a + R) Want to know if/where T (x ) = f (x ) Theorem: let 0 < r < R, if lim k→∞ rk k! max z∈[a−r ,a+r ] |f (k) (z)| = 0 Then T (x ) = f (x ) ∀ |x − a| ≤ r Kjell Konis (Copyright © 2013) 7.2 Taylor Series 22 / 31

Example Taylor series expansion of f (x ) = log(1 + x ) around the point a = 0 ∞ T (x ) = n (x − 0)k (k) (x − 0)k (k) f (0) = lim f (0) n→∞ k! k! k=0 k=0 f (x ) = (1 + x )−1 , . . . , f (k) (x ) = (−1)(k+1) (k − 1)!(1 + x )−k f (k) (0) = (−1)(k+1) (k − 1)!(1)−k = (−1)(k+1) (k − 1)! Taylor series expansion of f (x ) = log(1 + x ) around a = 0 ∞ T (x ) = ∞ (x − 0)k (k) xk f (0) = (−1)(k+1) k! k k=1 k=1 = x− Kjell Konis (Copyright © 2013) x2 x3 x4 + − + ... 2 3 4 7.2 Taylor Series 23 / 31

Example (continued) Find radius of convergence k k = lim lim (k) 1/k (k+1) (k − 1)!|1/k k→∞ |(−1) k→∞ |f (a)| = k lim k→∞ (k − 1)! 1/k = hmmm . . . Power series deﬁnition 1/k lim |ak | k→∞ (−1)(k+1) = lim k→∞ k = = Kjell Konis (Copyright © 2013) 1/k 1 1/k k→∞ k lim lim u u = 1 u 0 7.2 Taylor Series 24 / 31

Example (continued) Radius of convergence: R = 1 limk→∞ |ak |1/k Where does T (x ) = log(1 + x )? =1 (0 < r < R = 1) z∈[−r ,r ] rn n→∞ n! z∈[−r ,r ] r n (n − 1)! n→∞ n! (1 − r )n = z∈[−r ,r ] rn n→∞ n! = max |f n (z)| = = rn n→∞ n! lim 1 n→∞ n T (x ) = log(1 + x ) for |x | < Kjell Konis (Copyright © 2013) lim lim max max (−1)n+1 (n − 1)! (1 + z)n (n − 1)! |1 + z|n lim lim r 1−r n = 0 for r ≤ 1 2 1 2 7.2 Taylor Series 25 / 31

Outline 1 Taylor’s Formula for Functions of One Variable 2 “Big O” Notation 3 Taylor’s Formula for Functions of Several Variables 4 Taylor Series Expansions 5 Bond Convexity Kjell Konis (Copyright © 2013) 7.2 Taylor Series 26 / 31

Bond Pricing Formula 400 Price 300 200 100 0 0 5% 10% λ 15% 20% The price P of a bond is P = where: n F ck + n [1 + λ] 1 + λk k=1 ck = coupon payment F = face value Kjell Konis (Copyright © 2013) n = # coupon periods remaining λ = yield to maturity 7.2 Taylor Series 27 / 31

Linear Approximation 400 Price 300 200 100 0 0 q 5% 10% λ 15% 20% The tangent line used for approximation L(λ) = P(0.10) + (λ − 0.10) dP (0.10) where dλ dP − −DM P dλ Said last time: approximation can be improved by adding a quadratic term =⇒ approximate using a degree 2 Taylor polynomial Kjell Konis (Copyright © 2013) 7.2 Taylor Series 28 / 31

Convexity Recall: PVk = n ak [1 + λ]k P= k=1 = 1 P dλ2 d2 1 dλ2 P = = = Kjell Konis (Copyright © 2013) ak [1 + λ]k k=1 d 2P = Convexity: C n PVk = 1 P 1 P n ak k=1 n ak [1 + λ]−k k=1 d2 [1 + λ]−k dλ2 n ak k(k + 1)[1 + λ]−(k+2) k=1 1 P[1 + λ]2 n k(k + 1) k=1 7.2 Taylor Series ak [1 + λ]k 29 / 31

Convexity Let P0 and λ0 be the price and yield of a bond Let DM and C be the modiﬁed duration and convexity ∆P ≈ −DM P∆λ + 1 PC (∆λ)2 2 1 P ≈ P0 + −DM P(λ − λ0 ) + PC (λ − λ0 )2 2 ≈ P0 + (λ − λ0 ) dP (λ − λ0 )2 d 2 P (P0 ) + (P0 ) dλ 2 dλ2 400 Price 300 200 100 0 0 Kjell Konis (Copyright © 2013) q 5% 10% λ 7.2 Taylor Series 15% 20% 30 / 31

http://computational-finance.uw.edu Kjell Konis (Copyright © 2013) 7.2 Taylor Series 31 / 31

... Taylor Series and Partial Diﬀerentiation ... taylor diff kill Q 7.1 Taylor Series ... Q 7.2 Calculating a Maclaurin series

Read more

... Taylor Series Topics: 8.7 Taylor Series. Week 8: Derivatives, ... Week 8, Video 4: Taylor Series (8.7) ... Taylor / Maclaurin Series ...

Read more

Week 9: Power series: The exponential function, trigonometric functions H. Führ, ... Taylor series 5 Deﬁnition. Let f : ...

Read more

7.2 – Taylor Series Generally, ... Find the Taylor’s series solution for y up to and including terms in x 4 for the differential equation ...

Read more

‘Squishy Taylor’ is a brand new Australian series for early readers. ... And to be sure you always hear about future Kids’ Books of the Week, ...

Read more

How is Taylor's theorem like the mean value theorem? - Week 6 - Lecture 7 ... What is the Taylor series for sin x around zero? - Week 6 ...

Read more

Section 11.1: Taylor series Today we’re going to begin the development of the remarkable theory of Taylor series. ... on this week.) Main idea: ...

Read more

Week #6 - Taylor Series, Derivatives and Graphs Section 10.1 From “Calculus, Single Variable” by Hughes-Hallett, Gleason, ... (1 +x)−7/2 f ...

Read more

Power series and Taylor series D. DeTurck University of Pennsylvania November 5, 2015 ... 1 3 5 7 2 4 6 8 u4 + = 1 + X1 n=1 ( 1)n 1 3 5 (2n 1) 2 4 6 (2n) un

Read more

253 Find the Taylor Series for the function f (x) tn(x) centered about the polnt x 1 Table 2: Taylor for f (x) in(x) centered about the point x 1

Read more

## Add a comment