However, at this point, f(x)=pn(x) does not necessarily hold true. The p(x) we obtained can only be regarded as an approximation of the function f(x).
We denote their error as rn(x)=f(x)−pn(x).
We find that when x→x0, rn(x)=o((x−x0)n).
Proof
Consider its equivalent proposition:
rn(x0)=rn′(x0)=⋯=rn(m)(x0)=0
We use mathematical induction for the proof.
When m=0,1, clearly:
rn(x0)=rn′(x0)=0
Assume it holds for 1≤m=k. To prove it also holds for m=k+1, i.e.,
rn(x0)=rn′(x0)=⋯=rn(k+1)(x0)=0
then
rn(x)=o((x−x0)k+1)
Thus,
rn′(x)=o((x−x0)k)
But (A chinese meme) by Lagrange’s Mean Value Theorem, there must exist ∃xt∈[x,x0] such that
This is called the Taylor’s formula with Peano remainder.
Next, we prove its uniqueness.
Proof of Uniqueness
Suppose we simultaneously have:
f(x)=i=0∑nAi(x−x0)i+o((x−x0)n)
and
f(x)=i=0∑nAi′(x−x0)i+o((x−x0)n)
Letting x→x0, we get A0=A0′. Subtract the two equations, then divide by (x−x0), to get A1=A1′. Continuing this process, we obtain:
Ai=Ai′(∀i∈[1,n]∩N)
Thus, it’s unique!
Substituting x0=0, we get a more concise expression called the Maclaurin expansion. Giving it a new name?! Actually quite ironic.
Below are the Maclaurin expansions of some basic elementary functions.
In the previous Taylor’s formula, note that n can take any value, so naturally, we consider letting it tend to infinity.
Thus, the Taylor series refers to the Taylor formula when n→∞~
Formally, the Taylor series has the following form:
f(x)=i=0∑∞Ai(x−x0)i
where
An=i!f(i)(x0)
are called the Taylor coefficients.
Although this seems very simple, it raises many problems. The most direct one is: Does that series converge? And will it still equal the original function? This is a very tricky problem.
f(x) can equal that summation if and only if the remainder term rn(x) satisfies:
limn→∞rn(x)=0
The proof is obvious.
But to prove this equality holds, we might need to study other forms of the remainder term. Below, I will discuss the case for x0=0; other cases are left for the reader to explore.
Lagrange form: rn(x)=(n+1)!f(n+1)(θx)xn+1
Cauchy form: rn(x)=n!f(n+1)(θx)(1−θ)xn+1
where θ∈[0,1].
Proof? The Lagrange form is proved using Lagrange’s Mean Value Theorem, and the Cauchy form is proved using Cauchy’s Mean Value Theorem.
Here are the specific Taylor expansions of some functions.
Taylor Expansions of Exponential and Basic Trigonometric Functions#
If a function f(x) has derivatives of all orders on the interval [0,H] or [−H,0](H>0), and when x varies within the given interval, the absolute values of all these derivatives are bounded by the same number:
∣f(n)(x)∣≤L
Then this function can be expanded as a Taylor series.
Proof
We take the remainder in the Lagrange form, then we easily get:
∣rn(x)∣=(n+1)!∣f(n+1)(θx)∣∣x∣n+1≤L⋅(n+1)!Hn+1
Let’s prove a stronger conclusion. Summing both sides, we get:
n=0∑∞∣rn(x)∣≤L⋅n=0∑∞(n+1)!Hn+1
The right-hand side clearly converges, thus we can deduce rn(x)→0!
When f(x)=ex,sin(x),cos(x), the conditions are clearly satisfied, so we can write their expansions:
Most applications of Taylor series involve estimation. Here is a classic example of estimation.
Consider the Taylor expansion of ln(1+x) we obtained earlier. We can easily get: