Tutorials › Calculus I › Differentiating Trigonometric Polynomials

Trigonometric Derivatives · Tutorial 507 of 1495

Differentiating Trigonometric Polynomials

Differentiate each mode of a finite trigonometric polynomial, track its coefficient and sign, and verify the result.

Intermediate 9 min read

What You'll Learn

  • Recognize a finite trigonometric polynomial in standard form.
  • Differentiate sine and cosine terms with integer-frequency inputs.
  • Apply the derivative rule to a finite sum term by term.
  • Explain why the finite-sum rule permits this procedure.
  • Check signs and frequency factors in a derivative.
  • Distinguish finite sums from infinite trigonometric series.

Introduction

A trigonometric polynomial is a finite combination of sine and cosine terms. Its coefficients determine the size and sign of each term, while its integer frequencies determine the inputs to the trigonometric functions. Differentiating such a function is systematic: differentiate each term, keep track of its coefficient, and account for the factor contributed by the chain rule.

The word finite matters. The sum rule for derivatives applies to a finite sum and lets us differentiate its terms one at a time. It does not, by itself, justify differentiating an infinite trigonometric series term by term.

Definition and General Form

Definition: A real trigonometric polynomial in \(x\) with integer frequencies is a function that can be written, for some integer \(N\geq 0\), as $$ P(x)=a_0+\sum_{n=1}^{N}\bigl(a_n\cos(nx)+b_n\sin(nx)\bigr), $$ where \(a_0,a_1,\ldots,a_N\) and \(b_1,\ldots,b_N\) are real constants. If \(N=0\), the sum is empty and \(P(x)=a_0\).

The integer \(n\) in a term such as \(\sin(nx)\) or \(\cos(nx)\) is its frequency. The expression is still a finite sum: it has at most two trigonometric terms for each integer \(n\) from \(1\) to \(N\), together with a constant. Some coefficients may be zero, so not every possible mode needs to occur.

To differentiate, we use the familiar sine and cosine derivatives together with the chain rule. For a constant \(n\), the inner function \(nx\) has derivative \(n\). Thus, for each positive integer \(n\),

$$ \frac{d}{dx}\sin(nx)=n\cos(nx), \qquad \frac{d}{dx}\cos(nx)=-n\sin(nx). $$

The factor \(n\) is essential. The cosine derivative also contributes a negative sign. Since \(a_0\) is constant, its derivative is zero.

Theorem: If \(P\) is the trigonometric polynomial above, then $$ P'(x)=\sum_{n=1}^{N}\bigl(-n a_n\sin(nx)+n b_n\cos(nx)\bigr). $$ In particular, the constant term contributes nothing to \(P'(x)\).

Why the Rule Works

The result follows from the derivatives of the individual terms and the rule for differentiating a finite sum. Here is the finite-sum justification from the definition of a derivative. Write \(P\) as a finite sum of functions \(f_1,\ldots,f_m\), where each \(f_j\) is one constant, sine, or cosine term. If each \(f_j\) is differentiable at \(x\), then

$$ \frac{P(x+h)-P(x)}{h} = \frac{\sum_{j=1}^{m}f_j(x+h)-\sum_{j=1}^{m}f_j(x)}{h} = \sum_{j=1}^{m}\frac{f_j(x+h)-f_j(x)}{h}, \qquad h\ne 0. $$

There are only finitely many summands, so the limit of this sum as \(h\) tends to zero is the sum of the individual limits. Each limit is \(f_j'(x)\), because each term is differentiable. Therefore \(P'(x)=\sum_{j=1}^{m}f_j'(x)\). Applying the sine and cosine derivative formulas to the terms of \(P\) gives the stated theorem.

1
Keep the coefficient.
A term multiplied by a constant \(c\) still has that constant multiplying its derivative.
2
Differentiate the trigonometric function.
Sine becomes cosine; cosine becomes negative sine.
3
Include the frequency factor.
For input \(nx\), the chain rule contributes the factor \(n\).
4
Combine the finite results.
Add the derivatives of all terms and set the derivative of a constant term to zero.

Worked Examples

Worked Example: Differentiating a Polynomial with Three Modes

Differentiate $$ F(x)=4+3\cos x-2\sin(2x)+5\cos(4x). $$ The constant \(4\) differentiates to zero. For the remaining terms, apply the sine and cosine rules, including the input-frequency factor:

$$ \begin{aligned} \frac{d}{dx}(3\cos x)&=3(-\sin x)(1)=-3\sin x,\\ \frac{d}{dx}\bigl(-2\sin(2x)\bigr)&=-2\cos(2x)(2)=-4\cos(2x),\\ \frac{d}{dx}\bigl(5\cos(4x)\bigr)&=5\bigl(-\sin(4x)\bigr)(4)=-20\sin(4x). \end{aligned} $$

Adding these derivatives gives $$ F'(x)=-3\sin x-4\cos(2x)-20\sin(4x). $$

To check, differentiate the original terms independently: the constant gives \(0\); \(3\cos x\) gives \(-3\sin x\); \(-2\sin(2x)\) gives \(-4\cos(2x)\); and \(5\cos(4x)\) gives \(-20\sin(4x)\). Their sum agrees with the result.

Worked Example: Tracking Coefficients and Signs

Differentiate $$ G(x)=-\frac12+6\sin(3x)+2\cos(5x)-4\sin(2x). $$ The constant term contributes zero. For the first sine term, the coefficient \(6\) is multiplied by the frequency \(3\). For the cosine term, differentiation changes cosine to negative sine and contributes a factor of \(5\). For the last sine term, the coefficient is already negative:

$$ \begin{aligned} \frac{d}{dx}\left(6\sin(3x)\right)&=6\cos(3x)(3)=18\cos(3x),\\ \frac{d}{dx}\left(2\cos(5x)\right)&=2\bigl(-\sin(5x)\bigr)(5)=-10\sin(5x),\\ \frac{d}{dx}\left(-4\sin(2x)\right)&=-4\cos(2x)(2)=-8\cos(2x). \end{aligned} $$

Consequently, $$ G'(x)=18\cos(3x)-10\sin(5x)-8\cos(2x). $$

Check each term against the original: differentiating \(6\sin(3x)\) gives \(18\cos(3x)\); differentiating \(2\cos(5x)\) gives \(-10\sin(5x)\); differentiating \(-4\sin(2x)\) gives \(-8\cos(2x)\); and the constant gives zero. The term-by-term check reproduces \(G'(x)\).

Worked Example: Sine and Cosine Terms at the Same Frequency

Differentiate $$ H(x)=2\sin x-3\cos(3x)+4\sin(3x)+\cos(6x). $$ There are two different terms with frequency \(3\), one cosine term and one sine term. Differentiate them separately, as well as the terms with frequencies \(1\) and \(6\):

$$ \begin{aligned} \frac{d}{dx}(2\sin x)&=2\cos x,\\ \frac{d}{dx}\bigl(-3\cos(3x)\bigr)&=-3\bigl(-\sin(3x)\bigr)(3)=9\sin(3x),\\ \frac{d}{dx}\bigl(4\sin(3x)\bigr)&=4\cos(3x)(3)=12\cos(3x),\\ \frac{d}{dx}\bigl(\cos(6x)\bigr)&=-\sin(6x)(6)=-6\sin(6x). \end{aligned} $$

Therefore, $$ H'(x)=2\cos x+9\sin(3x)+12\cos(3x)-6\sin(6x). $$

For a check, differentiating each of the four displayed terms of \(H\) gives, in order, \(2\cos x\), \(9\sin(3x)\), \(12\cos(3x)\), and \(-6\sin(6x)\). Adding these four results gives exactly the stated derivative. The two frequency-\(3\) terms do not cancel: after differentiation, one is a sine term and the other is a cosine term.

A Common Mistake: Omitting the Frequency Factor

A frequent error is to differentiate \(\cos(3x)\) as though its input were just \(x\). For example, the calculation $$ \frac{d}{dx}\bigl(5\cos(3x)\bigr)=-5\sin(3x) $$ is incorrect. It differentiates the outer cosine but omits the derivative of the inner input \(3x\).

The chain rule supplies that missing factor: the derivative of \(3x\) is \(3\). Hence the correct calculation is $$ \frac{d}{dx}\bigl(5\cos(3x)\bigr) =5\bigl(-\sin(3x)\bigr)(3) =-15\sin(3x). $$

The sign and the frequency factor are separate checks. For a positive cosine coefficient, the derivative has a negative sign; for a negative cosine coefficient, the two negatives may produce a positive result. In either case, the frequency factor remains.

What the Finite-Sum Rule Does Not Say

The theorem applies to a finite number of terms. A finite trigonometric polynomial is differentiable everywhere because it is a finite sum of differentiable sine, cosine, and constant functions. No corresponding conclusion follows just from the fact that an infinite trigonometric series converges pointwise.

For instance, the series \(\sum_{n=1}^{\infty}\sin(nx)/n^2\) converges for every real \(x\), since the absolute value of its \(n\)th term is at most \(1/n^2\), and the series \(\sum_{n=1}^{\infty}1/n^2\) converges. If one formally differentiates its terms and then sets \(x=0\), the resulting terms are \(\cos(n\cdot 0)/n=1/n\), whose sum diverges. Thus pointwise convergence of the original series does not establish that differentiation can be interchanged with an infinite sum. Infinite trigonometric series require additional hypotheses before term-by-term differentiation is justified.

Why This Method Is Useful

Finite trigonometric polynomials provide a compact way to describe functions built from several oscillatory modes. The derivative rule keeps the same finite-mode structure: each sine term becomes a cosine term, each cosine term becomes a negative sine term, and each coefficient is multiplied by its frequency. This makes it possible to calculate derivatives reliably without expanding the expression into a different form.

When checking a result, inspect each original term separately. Confirm that its coefficient is present, that the sine or cosine change and sign are correct, and that the frequency factor has been included. Finally, verify that the derivative of every constant is zero. These checks address the most common errors while preserving the finite-sum reasoning that justifies the procedure.

Check Your Understanding

Use the finite trigonometric-polynomial rule to answer each question.

  1. Differentiate \(P(x)=7+2\sin(4x)-3\cos(2x)\).
  2. What is the derivative of a constant term \(a_0\), and why does it not appear in the general derivative formula?
  3. In differentiating \(c\cos(nx)\), which two features of the result come from differentiating the cosine and applying the chain rule?
  4. Differentiate \(Q(x)=\sin(3x)+\cos(3x)\). Do the two resulting terms cancel?
  5. Why does the finite-sum rule alone not justify differentiating an infinite trigonometric series term by term?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

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