1. Taylor series#
Recommended reference: Strang [Str17], in particular Section 10.4.
Taylor series are a useful way of approximating a function by simpler functions, namely polynomials.
1.1. Definition and basic properties#
Recall that a power series is like a polynomial, but with possibly infinitely many powers of \(x\):
where the \(c_i\) are scalars (usually real or complex numbers).
(Taylor series)
Let \(f\) be a (real or complex) function that is infinitely differentiable at a point \(a\). The Taylor series of \(f\) at \(a\) is the power series
For almost all functions \(f\) that one encounters in practice, the Taylor series of \(f\) will converge to \(f\). This means that the polynomials
of degree \(n\) obtained by truncating the Taylor series to a finite number of terms give successively better approximations to \(f\) as \(n\to\infty\), at least for \(x\) sufficiently close to \(a\). However, there are exceptions; see the exercises.
1.2. Important examples#
1.2.1. The exponential function#
Consider the function \(f(x)=\exp(x)\). To compute its Taylor series at \(x=0\), note that all derivatives of \(f\) are equal to \(f\) itself, and take the value \(1\) at \(x=0\). This gives
1.2.2. The logarithm#
Now consider the function \(f(x)=\log(1-x)\). We have
and more generally
This gives
1.2.3. Trigonometric functions#
The Taylor series of the cosine and sine functions are given by
This can be proved directly using the familiar expressions for the derivatives of these functions. It is also instructive to derive the above formulae by taking the Taylor series of \(\exp(ix)\), splitting it into the real and imaginary parts and using Euler’s formula
1.3. Exercises#
Compute the Taylor series at \(x=0\) of the function
Derive the Taylor series for the sine and cosine functions using the two different methods sketched in Trigonometric functions.
Consider the function
Show that the Taylor series of \(f\) at \(0\) is identically zero.