2
$\begingroup$

I'm in the process of learning about the Lagrange error bound formula. I understand the theory behind it, but not the application of it. How would I use it to determine the smallest degree polynomial in order to approximate $e$ to within 0.02% of its actual value from $f(x)=e^x$ ?

$\endgroup$
2
  • $\begingroup$ The question seems ill-posed. $\endgroup$ – Jacky Chong Apr 8 '17 at 20:04
  • $\begingroup$ In this answer, I've worked through almost this very example. $\endgroup$ – user14972 Apr 8 '17 at 20:34
4
$\begingroup$

So, in practice, for $f(x)=e^x$ your remainder term would look like(after performing the n-th order Taylor expansion about $0$)

$R_n(x)=\frac{x^{n+1}e^c}{(n+1)!}$ for some $c\in(0,x)$.

If you're looking to approximate $e$, you'll want to set $x=1$ So that,

$R_n(1)=\frac{e^c}{(n+1)!}$ where $c\in(0,1)$.

We can take a crude bound on $e^c$, say for instance $e^c<3$ (since $c\in(0,1)$), so that

$R_n(1)<\frac{3}{(n+1)!}$

Now we see that getting the error to the desired size, we can just taylor expand to sufficiently large order.

For instance, if you have n=5, then $R_n(1)<\frac{3}{720}$ so that the error is less than $0.01$. This error only decreases as $n$ increases. So getting the desired accuracy is just a matter of choosing n to be large enough in this case.

$\endgroup$
3
  • $\begingroup$ Just a quick question on this: why $xe^c$ rather than $x^(n+1)e^c$? $\endgroup$ – rb612 Apr 9 '17 at 1:03
  • 1
    $\begingroup$ Sorry, I meant $x^{(n+1)}e^c$. $\endgroup$ – rb612 Apr 9 '17 at 6:06
  • 1
    $\begingroup$ Apologies, you're absolutely right. Edited. Sorry for the typo. Good catch. $\endgroup$ – user433011 Apr 9 '17 at 6:31
0
$\begingroup$

I'm on my mobile phone which makes this tedious to type up, but the basic idea is that you can think of the error term as a function, $L(x,n)$. You have $x=1$ because you want to approximate $e^1$ and you know what to set the equation equal to, so then you just solve for $n$ and round to the next integer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.