Tutorials › Calculus II › Maclaurin Polynomials for Cosine

Taylor Polynomials · Tutorial 809 of 998

Maclaurin Polynomials for Cosine

Use cosine’s derivatives at zero to construct its Maclaurin polynomial at any requested degree, then evaluate the resulting polynomial carefully.

Beginner 9 min read

What You'll Learn

  • Identify the repeating pattern in the derivatives of cosine.
  • Evaluate each derivative of cosine at zero.
  • Derive the degree-n Maclaurin polynomial for cosine.
  • Determine which powers remain when a degree is specified.
  • Evaluate cosine’s Maclaurin polynomial at exact inputs.
  • Recognize common sign and truncation mistakes.

Why Cosine Has a Particularly Simple Maclaurin Polynomial

The Maclaurin polynomial for a function is its Taylor polynomial centered at zero. For cosine, the derivative pattern repeats every four steps, and evaluating those derivatives at zero makes the coefficients especially simple: every odd-power coefficient vanishes, while the even-power coefficients alternate in sign.

This pattern gives a direct formula for the polynomial through any specified degree. The degree matters, but it does not mean that every power up to that degree must appear. For cosine, only even powers occur.

Key idea: The degree-\(n\) Maclaurin polynomial for cosine contains the even powers \(x^{2j}\) that satisfy \(2j\le n\). Their coefficients alternate between positive and negative.

Cosine’s Derivatives at Zero

In calculus, trigonometric derivatives use angles measured in radians. Let \(f(x)=\cos x\). Successive differentiation gives

$$ f(x)=\cos x,\qquad f'(x)=-\sin x,\qquad f''(x)=-\cos x,\qquad f'''(x)=\sin x,\qquad f^{(4)}(x)=\cos x. $$

The fourth derivative is the original function, so the same four-function pattern repeats. At zero, \(\cos 0=1\) and \(\sin 0=0\). Consequently, the derivative values follow a repeating pattern as well:

$$ \begin{array}{c|ccccc} k & 0 & 1 & 2 & 3 & 4\\ \hline f^{(k)}(0) & 1 & 0 & -1 & 0 & 1 \end{array} $$

Every odd-order derivative has value zero at zero. The even-order derivatives alternate between \(1\) and \(-1\): the derivative of order \(2j\) has value \((-1)^j\).

Derivative pattern: For every integer \(j\ge 0\), \(f^{(2j)}(0)=(-1)^j\), and for every integer \(j\ge 0\), \(f^{(2j+1)}(0)=0\).

Deriving the Degree-\(n\) Polynomial

For a function with the required derivatives at zero, its degree-\(n\) Maclaurin polynomial is formed by using the derivatives through order \(n\):

$$ P_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(0)}{k!}x^k. $$

Here \(k!\) denotes the factorial, with \(0!=1\). To obtain cosine’s polynomial, insert its derivative values. All the odd-order terms disappear because their derivative values are zero. The term from derivative order \(2j\) is \((-1)^j x^{2j}/(2j)!\), and it is included only when \(2j\le n\).

$$ P_n(x)=\sum_{j=0}^{\lfloor n/2\rfloor} \frac{(-1)^j x^{2j}}{(2j)!} = 1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\cdots, $$

where the displayed pattern stops at the largest even power no greater than \(n\). The symbol \(\lfloor n/2\rfloor\) means the greatest integer no larger than \(n/2\).

The formula follows directly from the definition, but it is useful to see why it gives the correct derivative data. Differentiating a term \(c_kx^k\) exactly \(k\) times gives the constant \(k!c_k\). At zero, any remaining positive power of \(x\) evaluates to zero. Thus the \(k\)-th derivative of the polynomial at zero is \(k!c_k\), where \(c_k\) is its coefficient of \(x^k\). Choosing \(c_k=f^{(k)}(0)/k!\) makes that derivative equal to \(f^{(k)}(0)\). For cosine, these coefficients are precisely the alternating even-power coefficients above and zero for odd powers.

1
Find the requested degree.
Terms of degree greater than \(n\) are not included in \(P_n\).
2
Keep only even powers.
The odd derivatives of cosine vanish at zero, so the odd-power coefficients are zero.
3
Alternate the signs.
The constant and \(x^4\) terms are positive; the \(x^2\) and \(x^6\) terms are negative, with the pattern continuing.

Worked Examples

Worked Example: The Degree-4 Polynomial and Its Value at One-Half

Find the degree-4 Maclaurin polynomial for cosine, then evaluate that polynomial at \(x=\frac12\).

The even powers no greater than \(4\) are \(0\), \(2\), and \(4\). The corresponding derivative values are \(1\), \(-1\), and \(1\), so

$$ P_4(x) =\frac{1}{0!}x^0-\frac{1}{2!}x^2+\frac{1}{4!}x^4 =1-\frac{x^2}{2}+\frac{x^4}{24}. $$

Substitute \(x=\frac12\). First, \((\frac12)^2=\frac14\) and \((\frac12)^4=\frac1{16}\). Therefore,

$$ P_4\left(\frac12\right) =1-\frac{1/4}{2}+\frac{1/16}{24} =1-\frac18+\frac1{384} =\frac{384}{384}-\frac{48}{384}+\frac{1}{384} =\frac{337}{384}. $$

The result is checked by substituting into the polynomial itself: its three terms are \(1\), \(-1/8\), and \(1/384\), whose sum is \(337/384\). Thus the degree-4 polynomial gives the approximation \(\cos(\frac12)\approx\frac{337}{384}\).

Worked Example: A Degree-5 Polynomial

Find the degree-5 Maclaurin polynomial for cosine and evaluate it at \(x=1\). This example shows why the requested degree need not appear as a power in the polynomial.

The even powers no greater than \(5\) are \(0\), \(2\), and \(4\); the \(x^5\) coefficient is zero because the fifth derivative of cosine at zero is zero. Hence

$$ P_5(x)=1-\frac{x^2}{2!}+\frac{x^4}{4!} =1-\frac{x^2}{2}+\frac{x^4}{24}. $$

At \(x=1\), the powers \(1^2\) and \(1^4\) are both \(1\). Thus

$$ P_5(1)=1-\frac12+\frac1{24} =\frac{24}{24}-\frac{12}{24}+\frac{1}{24} =\frac{13}{24}. $$

Substituting \(1\) into the displayed polynomial gives exactly the same three contributions, so the evaluation checks. The resulting approximation is \(\cos(1)\approx 13/24\). In fact, \(P_5=P_4\): increasing the requested degree from \(4\) to \(5\) adds no nonzero term.

Worked Example: The Degree-8 Polynomial at \(x=2\)

Construct the degree-8 Maclaurin polynomial for cosine, then evaluate it at \(x=2\).

The even powers no greater than \(8\) are \(0\), \(2\), \(4\), \(6\), and \(8\). Use the alternating signs and the factorial denominators:

$$ P_8(x) =1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\frac{x^8}{8!} =1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}+\frac{x^8}{40320}. $$

At \(x=2\), the powers are \(2^2=4\), \(2^4=16\), \(2^6=64\), and \(2^8=256\). Substituting each value gives

$$ \begin{aligned} P_8(2) &=1-\frac{4}{2}+\frac{16}{24}-\frac{64}{720}+\frac{256}{40320}\\ &=1-2+\frac23-\frac4{45}+\frac2{315}\\ &=-\frac13-\frac4{45}+\frac2{315}\\ &=-\frac{15}{45}-\frac4{45}+\frac2{315}\\ &=-\frac{19}{45}+\frac2{315}\\ &=-\frac{133}{315}+\frac2{315}\\ &=-\frac{131}{315}. \end{aligned} $$

For the fraction reductions, \(16/24=2/3\), \(64/720=4/45\), and \(256/40320=2/315\). The last line is also confirmed by substituting \(2\) into \(P_8\) and combining the five resulting terms with denominator \(315\). Therefore the polynomial approximation is \(\cos(2)\approx-131/315\).

How the Degree Controls the Terms

The degree restriction applies to the exponent, not to the number of nonzero terms. If \(n\) is even, the polynomial includes a term of degree \(n\). If \(n\) is odd, the degree-\(n\) coefficient is zero, so the polynomial has the same nonzero terms as the degree-\((n-1)\) polynomial.

Requested degreeHighest included even powerPolynomial
22\(1-\frac{x^2}{2}\)
32\(1-\frac{x^2}{2}\)
44\(1-\frac{x^2}{2}+\frac{x^4}{24}\)
54\(1-\frac{x^2}{2}+\frac{x^4}{24}\)
66\(1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}\)

This also distinguishes the requested degree from the polynomial’s actual degree. For example, \(P_5\) is called the degree-5 Maclaurin polynomial, meaning it is constructed using derivatives through order \(5\). Since its \(x^5\) coefficient is zero, its actual degree is \(4\).

Common Mistake: Keeping an Odd-Power Term

A common error is to include a term simply because its exponent is no greater than the requested degree. For instance, the following is not the degree-5 Maclaurin polynomial for cosine:

$$ 1-\frac{x^2}{2}+\frac{x^4}{24}+\frac{x^5}{120}. $$

That \(x^5\) term is incorrect. Its coefficient would require the fifth derivative at zero to be \(1\), because \(5!(1/120)=1\). But the derivative pattern gives \(f^{(5)}(0)=0\). The correct polynomial is

$$ P_5(x)=1-\frac{x^2}{2}+\frac{x^4}{24}. $$

Another useful check is the sign pattern. A positive \(x^6\) term is also an error: the sixth derivative at zero is \(-1\), so the coefficient must be \(-1/6!=-1/720\).

Using the Polynomial as an Approximation

A Maclaurin polynomial gives a finite expression to use in place of cosine near zero. The examples show how to construct that expression from derivative data and evaluate it exactly at a chosen input. When reporting an approximation, use \(\approx\), not \(=\): a finite polynomial value is generally not the exact value of cosine at a nonzero input.

The formula identifies which terms the polynomial contains; by itself, it does not give a numerical bound on the difference between the polynomial and cosine. Here the main task is construction and evaluation: choose the requested degree, include only even powers within that degree, and apply the alternating signs and factorial denominators carefully.

Check Your Understanding

Use the derivative pattern and the degree restriction to answer these questions.

  1. What is the degree-2 Maclaurin polynomial for cosine?
  2. Why do the degree-4 and degree-5 Maclaurin polynomials for cosine have the same nonzero terms?
  3. Write the degree-6 Maclaurin polynomial for cosine, including its coefficients and signs.
  4. Evaluate the degree-4 polynomial at \(x=1\), and show the fractional arithmetic.
  5. What derivative value determines the coefficient of \(x^8\), and what is that coefficient?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon