Approximation of a function by a polynomial function
1
Approximation of a function by a polynomial function 1. step: Assuming that f(x) is differentiable at x = a, from the picture we see: ๐(๐ฅ) = ๐(๐) +...
Approximation of a function by a polynomial function 1. step: Assuming that f(x) is differentiable at x = a, from the picture we see: ๐(๐ฅ) = ๐(๐) + โ๐ โ ๐(๐) + ๐โฒ(๐)โ๐ฅ
Linear approximation of f(x) at point x around x = a ๐(๐ฅ) = ๐(๐) + ๐โฒ(๐)(๐ฅ โ ๐) ๐ ๐๐๐๐๐๐๐๐ ๐น = ๐(๐ฅ) โ ๐(๐) โ ๐โฒ(๐)(๐ฅ โ ๐) will determine magnitude of error Letโs try to get better approximation of f(x). Letโs assume that f(x) has all derivatives at x = a. Letโs assume there is a possible power series expansion of f(x) around a. โ 2
Taylorโs theorem says that there exists some value ๐ง between ๐ and ๐ฅ for which: โ
โ ๐=๐+1
๐ (๐) (๐) ๐ (๐+1) (๐ง) (๐ฅ โ ๐)๐ can be replaced by ๐ ๐ (๐ฅ) = (๐ฅ โ ๐)๐+1 ๐! (๐ + 1)!
2
Approximating function by a polynomial function So we are good to go. We can find value of ๐(๐) around ๐ by calculating ๐๐ , and then adding ๐ ๐ . Instead of adding infinite number of terms (how in the world???), we have finite number of terms. Beautiful. A little problem: We know z exists, BUT we donโt know how to find z . Thatโs why we use approximation: By approximating ๐(๐) with ๐๐ we neglect ๐ ๐ . We can do it only if ๐ ๐ is very small compared to ๐๐ . So if we find maximum possible value for ๐ ๐ , and that value is small compared to ๐๐ , we found good approximation: ๐ ๐ (๐) (๐) (๐ฅ โ ๐)๐ ๐(๐ฅ) โ โ ๐! ๐=0
Problems: โข For what values of x can we expect a Taylor series to represent f (x)?โ ๐๐๐๐๐ข๐ ๐๐ ๐๐๐๐ฃ๐๐๐๐๐๐๐ โข How accurately do Taylor polynomials approximate the f (x)? โ magnitude of the error ๐ ๐
example 1: Find Taylorโs series for sin x centered at a = 0 (McLaurin series). ๐(๐ฅ) = ๐ ๐๐ ๐ฅ ๐ โฒ (๐ฅ) = ๐๐๐ ๐ฅ ๐โฒโฒ(๐ฅ) = โ๐ ๐๐ ๐ฅ ๐ โฒโฒโฒ (๐ฅ) = โ cos ๐ฅ ๐ (4) (๐ฅ) = sin ๐ฅ ๐กโ๐๐ ๐๐๐ก๐๐๐๐ ๐ค๐๐๐ ๐๐๐๐๐๐ก โ
Signs alternate and the denominators get very big; factorials grow very fast. Ratio test: ๐ฅ 2๐+3 (2๐ + 1)! 1 lim | โ | = |๐ฅ 2 | lim | | = |๐ฅ 2 | โ 0 2๐+1 ๐โโ (2๐ + 3)! ๐โโ (2๐ + 3)(2๐ + 2) ๐ฅ This converges for any value of x. The radius of convergence is infinity.
3 example 2: Find fifth order Taylorโs approximation for f(x) = ln x centered at a = 1. ๐(๐ฅ) = ln ๐ฅ ๐ โฒ (๐ฅ) = 1/ ๐ฅ ๐โฒโฒ(๐ฅ) = โ1/๐ฅ 2 ๐ โฒโฒโฒ (๐ฅ) = 2!โ๐ฅ 3 ๐ (4) (๐ฅ) = โ 3!โ๐ฅ 4 ๐ (5) (๐ฅ) = 4!โ๐ฅ 5 ๐ (๐) (๐ฅ) =