1.5. Series expansion#
Example: Taylor series
Find the two-term Taylor series for
about \(x = 0\).
We will evaluate the required derivatives. This will be a series of product rule calculations.
The value of the function is \(f(0) = 0\). The first derivative is:
so \(f'(0) = 1\). The second derivative is:
so \(f''(0) = 0\). This means we need to keep going! The third derivative is:
so \(f'''(0) = 12\).
Putting it all together,
1.5.1. Combining series#
Some of these calculations can sometimes be avoided by combining series together. For example, the Taylor series for \(e^x\) is well known
The argument of e in f is \(2x^2\), which is also zero when x is zero, so we can substitute it in the known series to obtain
Finally, inserting this series into f and expanding
When doing this process, it can be helpful to keep track of dropped terms using \(O\)-notation
1.5.2. Skill builder problems#
Expand the following to two terms:
\(f(x)=\cos x\) at \(x=0\)
\(f(x)=\sin x\) at \(x=0\)
Solution
The function and its derivatives at \(x=0\) are:
(1.12)#\[\begin{align} f(x) &= \sin(x) & f(0) &= 0\\ f'(x) &= \cos(x) & f'(0) &= 1 \\ f''(x) &= -\sin(x) & f''(0) &= 0 \\ f^{(3)}(x) &= -\cos(x) & f^{(3)}(0) &= -1 \end{align}\]So:
(1.13)#\[\begin{equation} \sin x \approx x-\frac{x^3}{6} \end{equation}\]\(f(x)=e^x\) at \(x=0\)
\(f(x)=\ln(1+x)\) at \(x=0\)
\(f(x)=\dfrac{1}{1+x}\) at \(x=0\)
\(f(x)=\cos(4x)\) at \(x=0\)
\(f(x)=\cos(x-\pi)\) at \(x=\pi\)
\(f(x)=e^x \sin x\) at \(x=0\)
\(f(x)=\cos x\) at \(x=\pi\)
Solution
\(f(x)=7x^2-6x+1\) at \(x=2\)