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
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\),
The factor \(n\) is essential. The cosine derivative also contributes a negative sign. Since \(a_0\) is constant, its derivative is zero.
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
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.
A term multiplied by a constant \(c\) still has that constant multiplying its derivative.
Sine becomes cosine; cosine becomes negative sine.
For input \(nx\), the chain rule contributes the factor \(n\).
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:
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:
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\):
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.
- Differentiate \(P(x)=7+2\sin(4x)-3\cos(2x)\).
- What is the derivative of a constant term \(a_0\), and why does it not appear in the general derivative formula?
- In differentiating \(c\cos(nx)\), which two features of the result come from differentiating the cosine and applying the chain rule?
- Differentiate \(Q(x)=\sin(3x)+\cos(3x)\). Do the two resulting terms cancel?
- Why does the finite-sum rule alone not justify differentiating an infinite trigonometric series term by term?