Tutorials › AP Calculus › Products of Sine and Cosine Functions

Trigonometric and Exponential Derivatives · Tutorial 155 of 999

Products of Sine and Cosine Functions

Use the product rule to differentiate products of trigonometric functions, then simplify and verify the result.

Intermediate 9 min read

What You'll Learn

  • State when the product rule applies to trigonometric functions
  • Differentiate products involving sine, cosine, and tangent
  • Simplify derivatives using familiar trigonometric identities
  • Track where tangent-based expressions are defined
  • Check a derivative by expanding or differentiating an equivalent expression

Why Products Need Their Own Rule

A product of two functions changes as either factor changes. For example, in \(\sin x\cos x\), both the sine factor and the cosine factor vary with \(x\). Differentiating just one factor would miss part of the change. The product rule accounts for both contributions.

This tutorial applies that rule to products of trigonometric functions. The main ingredients are the familiar derivatives \((\sin x)'=\cos x\), \((\cos x)'=-\sin x\), and, where it is defined, \((\tan x)'=\sec^2 x\). The angles here are in radians, as required for these derivative formulas.

Product rule: If \(f\) and \(g\) are differentiable at \(x\), then their product is differentiable there and $$ \frac{d}{dx}\bigl(f(x)g(x)\bigr)=f'(x)g(x)+f(x)g'(x). $$ Differentiate one factor at a time, keeping the other factor unchanged in each term.

Why the Product Rule Works

The product rule follows directly from the definition of a derivative. To see why, suppose \(f\) and \(g\) are differentiable at \(x\). In the difference quotient for \(fg\), add and subtract \(f(x)g(x+h)\). This separates the change in \(f\) from the change in \(g\):

$$ \begin{aligned} \frac{f(x+h)g(x+h)-f(x)g(x)}{h} &=\frac{[f(x+h)-f(x)]g(x+h)+f(x)[g(x+h)-g(x)]}{h}\\ &=\frac{f(x+h)-f(x)}{h}g(x+h) +f(x)\frac{g(x+h)-g(x)}{h}. \end{aligned} $$

As \(h\) approaches zero, the first difference quotient approaches \(f'(x)\), and the second approaches \(g'(x)\). Also, differentiability of \(g\) at \(x\) implies continuity there, so \(g(x+h)\) approaches \(g(x)\). Taking the limit therefore gives

$$ (fg)'(x)=f'(x)g(x)+f(x)g'(x). $$

The two terms represent the two ways the product changes: first one factor changes while the other is held at its current value, and then the other factor changes.

Differentiate Each Factor, Then Simplify

For trigonometric products, first apply the product rule exactly as written. Then consider whether an identity makes the result shorter or more revealing. Useful identities include \(\sin^2 x+\cos^2 x=1\), \(\tan x=\frac{\sin x}{\cos x}\), and \(\cos(2x)=\cos^2 x-\sin^2 x\).

Simplification is optional: an unsimplified expression can still be a correct derivative. But a correct simplification can make a result easier to interpret, compare, or evaluate. Always preserve the original domain. In particular, any expression involving \(\tan x\) or \(\sec x\) is defined only where \(\cos x\ne 0\).

Worked Example: Differentiate \(\sin x\cos x\)

Let \(y=\sin x\cos x\). Use the product rule with \(f(x)=\sin x\) and \(g(x)=\cos x\). Their derivatives are \(f'(x)=\cos x\) and \(g'(x)=-\sin x\). Thus

$$ \begin{aligned} y' &=(\cos x)(\cos x)+(\sin x)(-\sin x)\\ &=\cos^2 x-\sin^2 x\\ &=\cos(2x). \end{aligned} $$

The last equality uses the double-angle identity. To check, the identity \(\sin x\cos x=\frac12\sin(2x)\) gives an equivalent expression for the original function. Differentiating that expression gives \(\frac12\cdot 2\cos(2x)=\cos(2x)\), agreeing with the product-rule result. This check uses the double-angle identity and its derivative as a check on this example; the product-rule calculation itself differentiated the original factors directly.

Products Involving Tangent

Tangent is a quotient, so it is not defined wherever \(\cos x=0\). Consequently, a product containing \(\tan x\) can only be differentiated on intervals where \(\cos x\ne 0\). Within that domain, use \((\tan x)'=\sec^2 x\) as the derivative of the tangent factor.

Worked Example: Differentiate \(\sin x\tan x\)

Let \(y=\sin x\tan x\). The function is defined for \(\cos x\ne 0\). Apply the product rule, using \((\sin x)'=\cos x\) and \((\tan x)'=\sec^2 x\):

$$ \begin{aligned} y' &=(\cos x)(\tan x)+(\sin x)(\sec^2 x)\\ &=\sin x+\sin x\sec^2 x\\ &=\sin x(1+\sec^2 x). \end{aligned} $$

For the second line, \(\cos x\tan x=\cos x\frac{\sin x}{\cos x}=\sin x\), valid on the domain where \(\tan x\) is defined. To check the result, rewrite the original product on that same domain as \(\sin x\tan x=\frac{\sin^2 x}{\cos x}\). Differentiating this quotient gives

$$ \begin{aligned} \frac{d}{dx}\left(\frac{\sin^2 x}{\cos x}\right) &=\frac{(2\sin x\cos x)(\cos x)-(\sin^2 x)(-\sin x)}{\cos^2 x}\\ &=\frac{2\sin x\cos^2 x+\sin^3 x}{\cos^2 x}\\ &=2\sin x+\frac{\sin^3 x}{\cos^2 x}. \end{aligned} $$

The product-rule answer has the same form when written using \(\sec^2 x=1/\cos^2 x\):

$$ \sin x(1+\sec^2 x) =\sin x+\frac{\sin x}{\cos^2 x} =\sin x+\frac{\sin x(\cos^2 x+\sin^2 x)}{\cos^2 x} =2\sin x+\frac{\sin^3 x}{\cos^2 x}. $$

Here the identity \(\sin^2 x+\cos^2 x=1\) verifies agreement. The expressions are equal wherever \(\cos x\ne 0\), the domain of the original function.

Products with More Than One Term

A factor can itself be a sum. Treat that entire sum as one factor, differentiate it using the sum rule, and still apply the product rule to the two factors. This keeps the bookkeeping clear.

Worked Example: Differentiate \(\sin x(2\cos x+1)\)

Set \(f(x)=\sin x\) and \(g(x)=2\cos x+1\). Then \(f'(x)=\cos x\), while \(g'(x)=-2\sin x\). The product rule gives

$$ \begin{aligned} \frac{d}{dx}\bigl(\sin x(2\cos x+1)\bigr) &=(\cos x)(2\cos x+1)+(\sin x)(-2\sin x)\\ &=2\cos^2 x+\cos x-2\sin^2 x\\ &=2(\cos^2 x-\sin^2 x)+\cos x\\ &=2\cos(2x)+\cos x. \end{aligned} $$

To check, expand the original function first: \(\sin x(2\cos x+1)=2\sin x\cos x+\sin x\). The first example showed that the derivative of \(\sin x\cos x\) is \(\cos(2x)\). Therefore the derivative of this expanded expression is \(2\cos(2x)+\cos x\), exactly the same result. The original product and its derivative are defined for every real \(x\).

Common Mistake: Differentiating Only One Factor

A frequent error is to differentiate one factor and leave the other out. For instance, a wrong calculation might claim

$$ \frac{d}{dx}(\sin x\cos x)=\cos x\cos x=\cos^2 x. $$

This omits the change in the cosine factor. Applying the product rule shows the missing contribution:

$$ \frac{d}{dx}(\sin x\cos x) =(\cos x)(\cos x)+(\sin x)(-\sin x) =\cos^2 x-\sin^2 x. $$

The incorrect answer can be ruled out by testing \(x=\frac{\pi}{2}\). The original function is \(\sin x\cos x=\frac12\sin(2x)\), whose derivative is \(\cos(2x)\), equal to \(-1\) at \(x=\frac{\pi}{2}\). But the incorrect expression \(\cos^2 x\) equals \(0\) there. It cannot be the derivative.

Choosing and Checking a Useful Form

After applying the rule, decide whether to leave the derivative as a sum of products or rewrite it. For example, \(\cos^2 x-\sin^2 x\) and \(\cos(2x)\) are equivalent forms. The first displays the contributions from the product rule; the second is compact and can be useful for further work.

Before finalizing a derivative, make these checks:

  • Did each factor contribute one term to the product-rule result?
  • Did the derivative of each trigonometric factor have the correct sign?
  • Do identities used in simplification hold for the expression's domain?
  • If the original expression contains tangent or secant, have you retained the restriction \(\cos x\ne 0\)?
  • Can you confirm the result using an equivalent expression or a convenient input value?

On the AP exam, a correct derivative may be accepted in an unsimplified form unless the question asks for a particular form. Still, presenting the rule before simplifying makes the reasoning visible and reduces the chance of losing a term or sign.

Takeaway: For a product of trigonometric functions, differentiate the first factor and keep the second, then keep the first and differentiate the second. Simplify only after both terms are present, and respect the domain of any tangent or secant factor.

Check Your Understanding

For each question, write enough work to show the product-rule terms and any domain restriction.

  1. Differentiate \(y=\cos x\sin x\). Express the result using a double-angle identity.
  2. Differentiate \(y=\cos x\tan x\) on its domain, and state that domain.
  3. Differentiate \(y=2\sin x(\cos x+3)\). Give one simplified form.
  4. A student says \(\frac{d}{dx}(\sin x\cos x)=\sin x(-\sin x)\). Identify the missing term and give the correct derivative.
  5. For \(y=\sin x\tan x\), explain why a derivative formula involving \(\sec x\) is not defined at \(x=\frac{\pi}{2}\).

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

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
Clinical Biostats