# Precision with Taylor Expansions

when you take a 1st order taylor expansion of a function, so:

$$f(a) + f'(a)(x-a)$$

does that mean that if the result is only accurate to one decimal place? so for a value a.bcd, d would be the uncertain value?

Edit: changed from second order to first due to an error that another user pointed out

-

Normally, I would see that called a first-order approximation, not a second-order one. It means that as $x \to a$, the error in this approximation goes to 0 more rapidly than $x$ goes to $a$. More precisely:

$$\lim_{x \to a} \frac{f(x) - \left( f(a) + f'(a) (x-a) \right)}{x - a} = 0$$

Understanding the error is an important thing to learn in calculus! When you learned Taylor series, you should have also learned formulas for the remainder of a truncated Taylor series.

If $f$ is twice differentiable at $a$, one way to describe the error is similar to that of the mean value theorem:

$$f(x) = f(a) + f'(a) (x-a) + R(x, a)$$

where

$$R(x,a) = \frac{1}{2} f''(\xi) (x-a)^2$$

and $\xi$ is some value between $a$ and $x$. (The precise value of $\xi$, of course, depends on both $x$ and $a$) Commonly, one can find upper bounds on the value of $f''(\xi)$: for example, if $f''(x)$ is an increasing function and $x > a$, you know $f''(a) < f''(\xi) < f''(x)$.

Making use of the remainder term is an important skill when it is important to know how good your approximations are when using Taylor series!

-

Nope, try with $e^x$ with $x=1$...

$$e = 1 + 1 + \frac{1}{2!} + \frac{1}{3!} + ...$$

taking only the first two terms, you get $2 \ne 2.71$

-
isn't the proper taylor expansion for e: e + 0 + 0 +....? – kjh Oct 12 '12 at 22:49
@kjh Well, I mean the expansion for $e^x$ using $x=1$ – Alex Oct 12 '12 at 22:50
then the expansion would still be: e^x + (e^x)(x-a) + ((e^x)(x-a)^2)/(2!) ...wouldn't it? – kjh Oct 12 '12 at 22:52
so with the first two terms you'd get 1 + e. it'd still be off, I see what you're getting at. – kjh Oct 12 '12 at 22:53
@kjh No, not 1+e... look at the last example here: en.wikipedia.org/wiki/Taylor_series#Examples – Alex Oct 12 '12 at 22:57

The error term of an $n$th order Taylor expansion is $\frac{1}{(n+1)!} f^{(n+1)}(\xi) (x-a)^{n+1}$ for some $a<\xi<x$. Since $\xi$ depends on $a,x,n$; you cannot really tell much about the error in general: can only say things in function-by-function basis.

In real life, what you mostly (i.e. for functions whose $n+1$th derivative is reasonably smooth function) see is that the error after retaining $n$ terms of a Taylor series goes as $a^{n+1}$: i.e. if $a=10^{-2}$, you'll roughly gain 2 decimal places of accuracy by adding one more term in your Taylor series.

-