Recently I had to bound the error in a Taylor expansion. However, I forgot the form of the error term and had to look it up. This was not the first time I’ve had to look it up. In fact, though I first learned about Taylor expansions in 2014 2 Shoutout to Ms. Dartnell! , up till 2021 I struggled to remember their remainder formula.
This post is my attempt to re-derive Taylor expansions and their error term in a way I can finally remember.
To remember Taylor expansions, all you need to remember is the fundamental theorem of calculus (FTC). If you repeatedly apply the FTC, the Taylor expansion will emerge.
The FTC says that for a function
3
To be precise,
for the FTC to hold
This is “fundamental” because it relates the two key ideas of calculus, derivatives and integrals, and says they are inverses of each other.
How do we get Taylor expansions from the FTC? It goes like this.
To begin, assume
This yields a zeroth order Taylor expansion, which approximates
Now assume
We first applied the FTC to
This yields a first order Taylor expansion, which approximates
One more. Assume
This yields a ______ order Taylor expansion, which approximates
I’ll let you fill in the blank.
If we continue to above procedure, we get the general form of a
Some comments on this identity:
First, a technical note. In order for Taylor’s theorem to hold, we must be able to take enough derivatives of
Now onto the proof.
We’ve already proven Taylor’s theorem for
To prove the theorem for arbitrary
To get the last line,
we used the identity
1
This is the formula for the volume of a
We have shown that
so by induction, Taylor’s theorem holds for all
The general form of Taylor’s theorem is useful for bounding the error of a Taylor expansion. In particular, if we can bound
As a concrete example, consider the the sine function. Its infinite-order Taylor expansion (centered at zero) is given by
How accurate is the Taylor expansion of sine up to 8th order
in the region
4
We could extend our expansion to
the entirety of
How tight is this bound?
Well the actual maximum of
Here is a plot of sine and our 8th order expansion:
Sine and its 8th order Taylor expansion about zero. The expansion is very good close to zero, and very bad far away from zero. Image is from the Wikimedia Commons.
I like this derivation of Taylor expansions because it is very easy to remember. All you have to do is repeatedly apply the fundamental theorem of calculus.
The differentiability conditions presented in this post
are stronger than necessary (see expandable proof).
For example, it suffices for
Finally, here are some links to similar derivations I came across while working on this post:
Thank you for reading and I hope you can better remember Taylor expansions and remainders in the future!
Thanks to Elton Lin and Horace He for reading drafts of this post.