Understanding the Error of Taylor Polynomials in Approximating Functions

Click For Summary
The error of a Taylor polynomial of order n is expressed as f^{n+1}(s)/(n+1)! (x-a)^{n+1}, where s is a value between a and x. For linear approximations, the error is calculated as f''(s)/2 (x-a)^2. In the example of approximating √(47) using a = 49, the function f(x) = x^{1/2} leads to a specific error range based on the choice of s. The approximation error can be bounded by evaluating s at its extreme values, yielding a range of 0.00145772 to 0.00155176. The actual approximation error of 0.00148825 falls within this calculated range, confirming the accuracy of the method.
wahaj
Messages
154
Reaction score
2
the error of a taylor series of order(I think that's the right word) n is given by
\frac{f^{n+1} (s)}{n!} (x-a)^n

I think this is right. The error in a linear approximation would simply be

\frac{f''(s)}{2} (x-a)^2

My question is what is s and how do I find it. Use linear approximation of √(47) if you need to use an example because I just did that question so it might be easier to explain.
 
Physics news on Phys.org
wahaj said:
the error of a taylor series of order(I think that's the right word) n is given by
\frac{f^{n+1} (s)}{n!} (x-a)^n
Actually, it should be
$$\frac{f^{n+1} (s)}{(n+1)!} (x-a)^{n+1}$$

I think this is right. The error in a linear approximation would simply be

\frac{f''(s)}{2} (x-a)^2

My question is what is s and how do I find it.
All that you know for sure is that ##s## is a number between ##a## and ##x##, and it depends on ##x##.

Use linear approximation of √(47) if you need to use an example because I just did that question so it might be easier to explain.
OK, you didn't specify a value for ##a##, so I'll pick ##a = 49##. Then, if I still remember how to take derivatives, we should have
$$f(x) = x^{1/2}$$
$$f'(x) = \frac{1}{2}x^{-1/2}$$
$$f''(x) = \frac{-1}{4}x^{-3/2}$$
so
$$\begin{align}f(a) + f'(a)(x-a) + \frac{1}{2}f''(s)(x-a)^2 &= (49)^{1/2} + \frac{1}{2}(49)^{-1/2}(x-49) + \frac{-1}{8}s^{-3/2}(x-49)^2\\
&= 7 + \frac{1}{14}(x-49) - \frac{1}{8}s^{-3/2}(x-49)^2\\
\end{align}$$
where ##s## is some number between ##a## and ##x##. Setting ##x=47##, we get
$$\sqrt{47} = 7 - \frac{1}{7} - \frac{1}{2}s^{-3/2}$$
where ##s## is some number satisfying ##47 \leq s \leq 49##. Putting it another way, if we use only the linear approximation ##7 - 1/7##, then the approximation error is
##-\frac{1}{2}s^{-3/2}## for some ##47 \leq s \leq 49##. We can bound this error by taking the worst case ##s## (the value that maximizes the absolute approximation error), which in this case is obtained by choosing ##s=47##. Then the approximation error is guaranteed to satisfy
$$|\textrm{approximation error}| \leq \frac{1}{2}(47)^{-3/2} = 0.00155176...$$
Actually, we can also obtain a lower bound for the approximation error by choosing the best-case value of ##s##, namely ##s = 49##. The error will be at least ##\frac{1}{2}(49)^{-3/2} = 0.00145772...##. Thus we in fact have
$$0.00145772... \leq |\textrm{approximation error}| \leq 0.00155176...$$
We can check this: the actual value of ##\sqrt{47}## is
$$\sqrt{47} = 6.8556546...$$
and our approximation is
$$7 - 1/7 = 6.85714285...$$
and the error is therefore ##6.85714285... - 6.8556546... = 0.00148825...## which is indeed within the computed range.
 
Last edited:
Thanks that makes more sense than my book
 
There are probably loads of proofs of this online, but I do not want to cheat. Here is my attempt: Convexity says that $$f(\lambda a + (1-\lambda)b) \leq \lambda f(a) + (1-\lambda) f(b)$$ $$f(b + \lambda(a-b)) \leq f(b) + \lambda (f(a) - f(b))$$ We know from the intermediate value theorem that there exists a ##c \in (b,a)## such that $$\frac{f(a) - f(b)}{a-b} = f'(c).$$ Hence $$f(b + \lambda(a-b)) \leq f(b) + \lambda (a - b) f'(c))$$ $$\frac{f(b + \lambda(a-b)) - f(b)}{\lambda(a-b)}...

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K