Exercise: Taylor of cos(x) up to order 3

Taylor series expansion of cos(x) around zero, taking terms up to order 3.

Step-by-step expansion

Example

Find the Taylor expansion of cos(x) around a=0 up to order 3.

  1. Order-3 template with a=0:

    f(x)f(0)+f(0)x+f(0)2x2+f(0)6x3f(x)\approx f(0)+f'(0)x+\frac{f''(0)}{2}x^2+\frac{f'''(0)}{6}x^3
  2. Derivatives evaluated at 0:

    f(0)=cos0=1,f(0)=sin0=0f(0)=cos0=1,f(0)=sin0=0\begin{aligned} f(0)&=\cos 0=1, & f'(0)&=-\sin 0=0\\ f''(0)&=-\cos 0=-1, & f'''(0)&=\sin 0=0 \end{aligned}

Substituting, the expansion is:

cos(x)1x22\cos(x)\approx 1-\frac{x^2}{2}