Tutorials › AP Calculus › Sine and Cosine Maclaurin Polynomials

Power Series and Taylor Polynomials · Tutorial 863 of 999

Sine and Cosine Maclaurin Polynomials

Use the cyclic derivatives of sine and cosine to build and check Maclaurin polynomials of a specified degree.

Advanced 9 min read

What You'll Learn

  • Use the Maclaurin coefficient formula to build a polynomial through a specified degree.
  • Track the four-step derivative cycles of sine and cosine at zero.
  • Identify alternating signs and factorial denominators in each polynomial.
  • Explain why sine has only odd powers and cosine only even powers.
  • Avoid including terms whose coefficients are zero, even when their powers are within the degree.
  • Evaluate the resulting polynomials at a given input.

Why Sine and Cosine Have Distinct Maclaurin Patterns

The derivatives of sine and cosine repeat in a short cycle. At zero, that cycle determines which powers appear in their Maclaurin polynomials, what the signs of the terms are, and which factorial belongs in each denominator.

A Maclaurin polynomial is a Taylor polynomial centered at \(x=0\). For sine and cosine, its terms can be constructed directly from the function values and derivatives at zero. The familiar derivative formulas \( (\sin x)'=\cos x \) and \( (\cos x)'=-\sin x \) assume that angles are measured in radians.

Definition: If \(f\) has derivatives through order \(n\) at zero, its degree-\(n\) Maclaurin polynomial is $$ P_n(x)=\sum_{j=0}^{n}\frac{f^{(j)}(0)}{j!}x^j. $$ Here \(n\) is a nonnegative integer, \(f^{(0)}=f\), and \(0!=1\). A coefficient can be zero, so a degree-\(n\) Maclaurin polynomial need not contain a nonzero \(x^n\) term.

The factorial is essential: the coefficient of \(x^j\) is \(f^{(j)}(0)/j!\), not simply \(f^{(j)}(0)\). The repeating derivatives make these coefficients especially straightforward to find.

The Derivative Cycles at Zero

Differentiate sine repeatedly, remembering that the derivative of cosine is negative sine. The functions return to their starting point after four derivatives. Their values at zero follow from \(\sin 0=0\) and \(\cos 0=1\).

$$ \begin{array}{c|cccc} j & 0 & 1 & 2 & 3\\ \hline \text{Derivative of }\sin x & \sin x & \cos x & -\sin x & -\cos x\\ \text{Value at }0 & 0 & 1 & 0 & -1 \end{array} $$

After the third derivative, the next derivative is sine again, so this pattern repeats. For cosine, the cycle begins at cosine and has a different alignment:

$$ \begin{array}{c|cccc} j & 0 & 1 & 2 & 3\\ \hline \text{Derivative of }\cos x & \cos x & -\sin x & -\cos x & \sin x\\ \text{Value at }0 & 1 & 0 & -1 & 0 \end{array} $$

Thus, sine has nonzero derivatives at zero only at odd orders, while cosine has nonzero derivatives at zero only at even orders. The values of the nonzero derivatives alternate between \(1\) and \(-1\). Applying the Maclaurin coefficient formula converts each nonzero derivative into a term by dividing by the factorial of its order.

Building the Polynomials

For sine, the nonzero derivative orders are \(1,3,5,7,\ldots\). At these orders the derivative values are \(1,-1,1,-1,\ldots\). The resulting terms are \(x/1!\), \(-x^3/3!\), \(x^5/5!\), and so on.

$$ P_n^{\sin}(x) = \sum_{k=0}^{\left\lfloor (n-1)/2\right\rfloor} (-1)^k\frac{x^{2k+1}}{(2k+1)!} \qquad (n\geq 1). $$

For \(n=0\), the sine Maclaurin polynomial is \(P_0^{\sin}(x)=0\). In the formula, the largest allowed \(k\) is chosen so that \(2k+1\leq n\); terms above degree \(n\) are not included.

For cosine, the nonzero derivative orders are \(0,2,4,6,\ldots\), with values \(1,-1,1,-1,\ldots\). Its terms begin \(1\), \(-x^2/2!\), \(x^4/4!\), and \(-x^6/6!\).

$$ P_n^{\cos}(x) = \sum_{k=0}^{\left\lfloor n/2\right\rfloor} (-1)^k\frac{x^{2k}}{(2k)!} \qquad (n\geq 0). $$

The floor symbol \(\lfloor r\rfloor\) means the greatest integer less than or equal to \(r\). It sets the final index so that the largest power included does not exceed the requested degree. These formulas describe finite polynomials; constructing one does not require claiming that an infinite series converges.

Why the Factorial Denominators Appear

The factorial denominator ensures that differentiating a polynomial the required number of times recovers the prescribed derivative at zero. To see the key point, consider a term \(a_jx^j\). Differentiating it \(j\) times gives \(j!a_j\). If \(a_j=f^{(j)}(0)/j!\), that value is exactly \(f^{(j)}(0)\).

Terms of other degrees do not change this matching at zero. A term \(a_rx^r\) with \(r>j\), after \(j\) derivatives, still contains a positive power of \(x\), so its value at zero is zero. A term with \(r<j\) has become zero after \(j\) derivatives. Therefore the \(j\)th derivative of the Maclaurin polynomial, evaluated at zero, equals \(f^{(j)}(0)\) for each order included.

Why the construction works: The coefficient \(f^{(j)}(0)/j!\) makes the \(j\)th derivative of the \(x^j\) term equal \(f^{(j)}(0)\) at zero. The other powers contribute zero to that derivative value at zero. The derivative cycle supplies the values, and the factorial converts them into polynomial coefficients.

Worked Examples

Worked Example: Construct the Degree-5 Maclaurin Polynomial for Sine

Use the derivative values at zero through order \(5\):

$$ \begin{aligned} \sin 0&=0, & (\sin x)'|_{x=0}&=\cos 0=1,\\ (\sin x)''|_{x=0}&=-\sin 0=0, & (\sin x)'''|_{x=0}&=-\cos 0=-1,\\ (\sin x)^{(4)}|_{x=0}&=\sin 0=0, & (\sin x)^{(5)}|_{x=0}&=\cos 0=1. \end{aligned} $$

Insert each value into the degree-5 Maclaurin formula:

$$ \begin{aligned} P_5^{\sin}(x) &=0+\frac{1}{1!}x+\frac{0}{2!}x^2 +\frac{-1}{3!}x^3+\frac{0}{4!}x^4+\frac{1}{5!}x^5\\ &=x-\frac{x^3}{6}+\frac{x^5}{120}. \end{aligned} $$

The powers \(x^2\) and \(x^4\) are within degree \(5\), but their coefficients are zero. As a check, differentiating the polynomial gives \(P'(x)=1-x^2/2+x^4/24\), \(P''(x)=-x+x^3/6\), \(P'''(x)=-1+x^2/2\), \(P^{(4)}(x)=x\), and \(P^{(5)}(x)=1\). Their values at zero are \(1,0,-1,0,1\), respectively, matching the sine derivatives of orders \(1\) through \(5\). Also \(P(0)=0=\sin 0\).

Worked Example: Construct the Degree-6 Maclaurin Polynomial for Cosine

The cosine derivative values at zero from order \(0\) through order \(6\) are \(1,0,-1,0,1,0,-1\). Therefore the formula gives

$$ \begin{aligned} P_6^{\cos}(x) &=\frac{1}{0!} +\frac{0}{1!}x -\frac{1}{2!}x^2 +\frac{0}{3!}x^3 +\frac{1}{4!}x^4 +\frac{0}{5!}x^5 -\frac{1}{6!}x^6\\ &=1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}. \end{aligned} $$

The signs alternate among the nonzero terms, not among every consecutive power. To check, differentiate: \(P'(x)=-x+x^3/6-x^5/120\), \(P''(x)=-1+x^2/2-x^4/24\), \(P'''(x)=x-x^3/6\), \(P^{(4)}(x)=1-x^2/2\), \(P^{(5)}(x)=-x\), and \(P^{(6)}(x)=-1\). At zero these give \(0,-1,0,1,0,-1\), and \(P(0)=1\). Together, the values match the cosine derivative cycle through order \(6\).

Worked Example: Evaluate Degree-5 and Degree-4 Polynomials at \(x=1/5\)

Use the sine polynomial from the first example and the degree-4 cosine polynomial \(P_4^{\cos}(x)=1-x^2/2!+x^4/4!\). Substituting \(x=1/5\) into the sine polynomial gives

$$ \begin{aligned} P_5^{\sin}\left(\frac15\right) &=\frac15-\frac{(1/5)^3}{6}+\frac{(1/5)^5}{120}\\ &=\frac15-\frac{1}{750}+\frac{1}{375000}\\ &=\frac{75000}{375000}-\frac{500}{375000}+\frac{1}{375000}\\ &=\frac{74501}{375000}\\ &\approx 0.1986693333. \end{aligned} $$

For cosine, substitute into its degree-4 polynomial:

$$ \begin{aligned} P_4^{\cos}\left(\frac15\right) &=1-\frac{(1/5)^2}{2}+\frac{(1/5)^4}{24}\\ &=1-\frac{1}{50}+\frac{1}{15000}\\ &=\frac{15000}{15000}-\frac{300}{15000}+\frac{1}{15000}\\ &=\frac{14701}{15000}\\ &\approx 0.9800666667. \end{aligned} $$

These are evaluations of the stated polynomials. The arithmetic check is that \(74501/375000\) is approximately \(0.1986693333\), while \(14701/15000\) is approximately \(0.9800666667\).

Reading the Degree and the Missing Powers

“Degree \(n\)” sets an upper limit; it does not promise a nonzero term at every power up to \(n\). For instance, the degree-5 sine polynomial ends with an \(x^5\) term, while its \(x^2\) and \(x^4\) coefficients vanish. A degree-5 cosine polynomial instead ends at \(x^4\), because its \(x^5\) coefficient is zero. In fact, it is the same polynomial as the degree-4 cosine polynomial.

A useful way to construct either polynomial is to write the derivative values in order, including zeros, and then divide each value by the factorial for that order. This prevents two common oversights: skipping a derivative order and assigning a sign to the wrong power. Once the zero entries are visible, the missing powers are part of the calculation rather than gaps to fill.

A Common Sign and Factorial Error

A tempting but incorrect shortcut is to assign an alternating sign to every consecutive power. For example, one might write the degree-5 sine polynomial as

$$ x-\frac{x^2}{2!}+\frac{x^3}{3!}-\frac{x^4}{4!}+\frac{x^5}{5!}. $$

This is wrong: it puts nonzero coefficients on even powers, whose sine derivatives at zero are zero. It also assigns the wrong signs and denominators to several of the odd-power terms. The correction is to use the derivative cycle first:

$$ \begin{array}{c|cccccc} \text{Power} & x^0 & x^1 & x^2 & x^3 & x^4 & x^5\\ \hline \text{Sine derivative at }0 & 0 & 1 & 0 & -1 & 0 & 1\\ \text{Coefficient} & 0 & 1 & 0 & -1/3! & 0 & 1/5! \end{array} $$

Thus the correct result is \(x-x^3/3!+x^5/5!\). The signs alternate across the nonzero sine terms, whose powers differ by two; they do not alternate across a list that includes the missing even powers.

Check Your Understanding

For each question, use the derivative values at zero and the Maclaurin coefficient formula. Keep zero coefficients visible until you have determined which powers actually contribute.

  1. Find the degree-3 Maclaurin polynomial for sine, showing the derivative values at zero through order \(3\).
  2. Find the degree-5 Maclaurin polynomial for cosine. Which power is the highest nonzero power?
  3. Explain why the coefficient of \(x^4\) in the sine Maclaurin polynomial is zero.
  4. What is the coefficient of \(x^7\) in the sine Maclaurin polynomial, and what derivative value determines it?
  5. Why does the degree-7 cosine Maclaurin polynomial have the same terms as the degree-6 cosine Maclaurin polynomial?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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