PAGE 1

11.1 Approx. Functions w/ Polynomials (part 2)

Taylor series of \( f(x) \) near \( x = a \)

\[ \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!} (x-a)^k = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!} (x-a)^2 + \frac{f'''(a)}{3!} (x-a)^3 + \dots \]

if we chop it off after \( k \), we get the k-th order Taylor Polynomial

for example, \( k = 2 \),

\[ P_2 = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!} (x-a)^2 \approx f(x) \quad \text{but NOT exactly equal} \]

the terms we throw away \( (k \ge 3) \) form the Remainder

here, the remainder \( (k \ge 3) \)

\[ R_2 = \frac{f'''(a)}{3!} (x-a)^3 + \frac{f^{(4)}(a)}{4!} (x-a)^4 + \dots \]

\( R_2 \) is the remainder after 2nd order.

itself an infinite series which converges to one term

PAGE 2

the remainder converges to

\[ R_k = \frac{f^{(k+1)}(c)}{(k+1)!} (x-a)^{k+1} \]

where \( a < c < x \)

Taylor's Remainder Theorem

so, in general, approximation of \( f(x) \) using \( k^{th} \) order Taylor Polynomial

\[ f(x) = \underbrace{P_k(x)}_{k^{th} \text{ order Taylor Polynomial}} + \underbrace{R_k(x)}_{remainder} \]

\( c \) is usually not easy to find, so instead of finding it, we usually try to put a bound on \( |R_k| \) and use it to estimate error

PAGE 3

the absolute error is

\[ | f(x) - P_k(x) | = | R_k | = \left| \frac{f^{(k+1)}(c)}{(k+1)!} (x-a)^{k+1} \right| \]

true

\( k^{th} \) order Taylor polynomial

we don't find \( c \) but instead we find the max \( | f^{(k+1)}(x) | \) and call it \( M \)

then the |error| is no more than

\[ \left| \frac{M}{(k+1)!} (x-a)^{k+1} \right| \]
PAGE 4

example

\( f(x) = e^{-2x} \quad a = 0 \)

approx using \( P_2 \) and estimate the error.

\[ \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!} (x-a)^k \]

\( f(x) = e^{-2x} \quad f(a) = f(0) = e^0 = 1 = (-2)^0 \)

\( f'(x) = -2e^{-2x} \quad f'(a) = f'(0) = -2e^0 = -2 = (-2)^1 \)

\( f''(x) = 4e^{-2x} \quad f''(0) = 4 = (-2)^2 \)

\( f'''(x) = -8e^{-2x} \quad f'''(0) = -8 = (-2)^3 \)

\( \vdots \)

\( f^{(k)}(0) = (-2)^k \)

Taylor series

\[ e^{-2x} = 1 - 2x + \frac{(-2)^2}{2!} x^2 + \frac{(-2)^3}{3!} x^3 + \frac{(-2)^4}{4!} x^4 + \dots \]

estimate using \( P_2(x) \)

\[ e^{-2x} \approx 1 - 2x + \frac{(-2)^2}{2!} x^2 = 1 - 2x + 2x^2 \]

with remainder

\[ R_2(x) = \frac{(-2)^3}{3!} x^3 + \frac{(-2)^4}{4!} x^4 + \dots = \frac{f'''(c)}{3!} x^3 \]

\( a < c < x \) where \( a = 0 \)

PAGE 5
\[ f'''(x) = -8e^{-2x} \]
\[ \frac{f'''(x)}{3!} x^3 = \frac{-8e^{-2x}}{3!} x^3 \]
\[ \frac{f'''(c)}{3!} x^3 = -\frac{4}{3} e^{-2c} x^3 \quad \text{where } 0 < c < x \]

now let's use \( P_2(x) \) to estimate \( e^{-0.02} \) (as an example)

\[ e^{-2x} \approx P_2(x) = 1 - 2x + 2x^2 \]
\[ e^{-0.02} \approx P_2(0.01) = 1 - 2(0.01) + 2(0.01)^2 = \frac{4901}{5000} \quad (0.9802) \]

what is the error?

it is exactly equal to \( |R_2(c)| \) but we don't know \( c \)

\[ 0 < c < 0.01 \]

can we at least bound \( e^{-2c} \) ?

PAGE 6

\( e^{-2x} \) is a monotonic decreasing function, so on \( 0 < c < 0.01 \) the maximum of \( |e^{-2c}| \) is at the left end \( (x=0) \)

\[ |e^{-2c}| \leq |e^{-2(0)}| = 1 \quad \text{the max } |e^{-2c}| \text{ can be is } 1 \]

so,

\[ |R_2(x)| \leq \left| \frac{f'''(c)}{3!} (0.01)^3 \right| \]
\[ \leq \left| -\frac{4}{3} e^{-2c} (0.01)^3 \right| = \frac{4}{3,000,000} \]

so, our approx. of \( e^{-0.02} = \frac{4901}{5000} \) is no more than \( \frac{4}{3,000,000} \) off

\[ \frac{4901}{5000} - \frac{4}{3,000,000} \leq e^{-0.02} \leq \frac{4901}{5000} + \frac{4}{3,000,000} \]
Graph of a decreasing exponential curve on axes, showing max value at x=0 and ending at x=0.01.
PAGE 7

Taylor Series Approximation and Error Estimation

The Taylor series expansion for \( e^{-2x} \) is given by:

\[ e^{-2x} \approx 1 - 2x + \frac{(-2)^2}{2!}x^2 + \frac{(-2)^3}{3!}x^3 + \frac{(-2)^4}{4!}x^4 + \frac{(-2)^5}{5!}x^5 + \dots \]

Example: Estimating \( e^{-1} \) using \( P_3 \)

As an example, to estimate \( e^{-1} \) using the third-degree Taylor polynomial \( P_3 \):

\[ e^{-2x} \approx 1 - 2x + \frac{(-2)^2}{2!}x^2 + \frac{(-2)^3}{3!}x^3 \]

To find \( e^{-1} \), we set \( -2x = -1 \), which implies \( x = \frac{1}{2} \):

\[ e^{-1} = e^{-2(\frac{1}{2})} \approx 1 - 2(\frac{1}{2}) + \frac{(-2)^2}{2!}(\frac{1}{2})^2 + \frac{(-2)^3}{3!}(\frac{1}{2})^3 \]\[ \approx 1 - 1 + (\frac{1}{2}) - \frac{4}{3}(\frac{1}{8}) \]\[ \approx \frac{1}{2} - \frac{1}{6} \approx \frac{1}{3} \]

Error Estimation

The remainder term, or error, for the third-degree polynomial is:

\[ |\text{error}| = R_3(x) = \frac{f^{(4)}(a)}{4!}x^4 + \frac{f^{(5)}(a)}{5!}x^5 + \dots \]\[ = \left| \frac{f^{(4)}(c)}{4!}x^4 \right| \]

Bound \( |f^{(4)}(c)| \) instead of finding \( c \).