Tutorials › Calculus II › Integrating Sine-Cosine Products at Different Frequencies

Sine and Cosine Powers · Tutorial 113 of 998

Integrating Sine-Cosine Products at Different Frequencies

Use product-to-sum identities to turn different-frequency trigonometric products into sums whose antiderivatives can be found and checked directly.

Beginner 9 min read

What You'll Learn

  • Apply product-to-sum identities to sine-sine, cosine-cosine, and sine-cosine products.
  • Integrate the resulting terms while retaining their frequency factors.
  • Use the distinct-frequency condition to identify when the formulas apply.
  • Explain what changes when a difference frequency is zero.
  • Check product antiderivatives by differentiation.

Why Convert a Product into a Sum?

Products such as \(\sin(5x)\sin(2x)\) and \(\sin(3x)\cos(2x)\) are not in the basic form of a single sine or cosine function. Product-to-sum identities rewrite each product as a sum of simpler trigonometric terms. Each term can then be integrated directly, provided its frequency is not zero.

The key detail is that integrating a trigonometric function with frequency \(k\) introduces a factor of \(1/k\). In products with distinct positive frequencies \(a\) and \(b\), the resulting frequencies are \(a+b\) and \(a-b\). The difference can be negative, but it is nonzero when \(a\ne b\); keeping its sign in the formula avoids sign errors.

Definition: In this tutorial, \(a\) and \(b\) are positive integer frequencies, and \(x\) is the variable of integration. A different-frequency product means that \(a\ne b\). Antiderivatives are understood up to an arbitrary constant \(C\).

Identities and the Frequency Condition

The product-to-sum identities express products of two trigonometric functions as sums. They follow from the angle-sum and angle-difference identities; here they are stated in the forms needed for integration.

$$ \begin{aligned} \sin(ax)\cos(bx) &=\frac{1}{2}\left[\sin((a+b)x)+\sin((a-b)x)\right],\\ \sin(ax)\sin(bx) &=\frac{1}{2}\left[\cos((a-b)x)-\cos((a+b)x)\right],\\ \cos(ax)\cos(bx) &=\frac{1}{2}\left[\cos((a-b)x)+\cos((a+b)x)\right]. \end{aligned} $$

For any nonzero real number \(k\), the chain rule gives the basic antiderivatives

$$ \int \sin(kx)\,dx=-\frac{\cos(kx)}{k}+C, \qquad \int \cos(kx)\,dx=\frac{\sin(kx)}{k}+C. $$

The denominator is the signed frequency \(k\), not its absolute value. If \(a\ne b\), both \(a+b\) and \(a-b\) are nonzero, so these rules apply to every term in the identities. If \(a=b\), the difference frequency is zero, and the rule for a nonzero frequency cannot be used on that term.

Important condition: The different-frequency formulas below require \(a\ne b\). The sum frequency \(a+b\) is positive because \(a\) and \(b\) are positive. The difference frequency \(a-b\) may be positive or negative, but it must not be zero.

Antiderivative Formulas for Distinct Frequencies

Integrating the three product-to-sum identities term by term gives the formulas below. Their signed denominators make them valid whether \(a>b\) or \(b>a\).

$$ \int \sin(ax)\cos(bx)\,dx = -\frac{\cos((a+b)x)}{2(a+b)} -\frac{\cos((a-b)x)}{2(a-b)} +C. $$
$$ \int \sin(ax)\sin(bx)\,dx = \frac{\sin((a-b)x)}{2(a-b)} -\frac{\sin((a+b)x)}{2(a+b)} +C. $$
$$ \int \cos(ax)\cos(bx)\,dx = \frac{\sin((a-b)x)}{2(a-b)} +\frac{\sin((a+b)x)}{2(a+b)} +C. $$

Why the Formulas Work

A reliable justification is to differentiate the proposed antiderivative and recover the original product. This checks both the signs and the frequency factors. For example, let

$$ F(x)= -\frac{\cos((a+b)x)}{2(a+b)} -\frac{\cos((a-b)x)}{2(a-b)}, \qquad a\ne b. $$

By the chain rule, the derivative of \(\cos(kx)\) is \(-k\sin(kx)\). Therefore

$$ \begin{aligned} F'(x) &=\frac{1}{2}\sin((a+b)x)+\frac{1}{2}\sin((a-b)x)\\ &=\sin(ax)\cos(bx), \end{aligned} $$

where the last equality is the product-to-sum identity for sine times cosine. Thus \(F\) is an antiderivative of the original product. The other two formulas are checked in the same way: differentiating \(\sin(kx)/k\) gives \(\cos(kx)\), and the corresponding product-to-sum identity recovers the product.

This argument also explains the denominators. When a term has frequency \(k\), differentiating its sine or cosine produces a factor of \(k\). Dividing by \(k\) in the antiderivative cancels that factor. A zero frequency is different: \(\cos(0x)=1\), whose antiderivative is \(x\), not \(\sin(0x)/0\).

Worked Examples

Worked Example: Integrating a Sine-Cosine Product

Find \(\int \sin(3x)\cos(2x)\,dx\).

The frequencies are \(a=3\) and \(b=2\), so \(a+b=5\) and \(a-b=1\). Apply the sine-cosine product-to-sum identity:

$$ \sin(3x)\cos(2x) =\frac{1}{2}\left[\sin(5x)+\sin(x)\right]. $$

Integrate each term, including its frequency factor:

$$ \begin{aligned} \int \sin(3x)\cos(2x)\,dx &=\frac{1}{2}\int\sin(5x)\,dx +\frac{1}{2}\int\sin(x)\,dx\\ &=-\frac{\cos(5x)}{10}-\frac{\cos(x)}{2}+C. \end{aligned} $$

Check by differentiation:

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

The derivative is the original integrand, so the antiderivative is correct.

Worked Example: Integrating a Sine-Sine Product

Find \(\int \sin(5x)\sin(2x)\,dx\).

Here \(a-b=3\) and \(a+b=7\). The product-to-sum identity gives

$$ \sin(5x)\sin(2x) =\frac{1}{2}\left[\cos(3x)-\cos(7x)\right]. $$

Now integrate both cosine terms:

$$ \begin{aligned} \int \sin(5x)\sin(2x)\,dx &=\frac{1}{2}\int\cos(3x)\,dx -\frac{1}{2}\int\cos(7x)\,dx\\ &=\frac{\sin(3x)}{6}-\frac{\sin(7x)}{14}+C. \end{aligned} $$

Differentiate the result to check it:

$$ \begin{aligned} \frac{d}{dx}\left[\frac{\sin(3x)}{6}-\frac{\sin(7x)}{14}\right] &=\frac{1}{2}\cos(3x)-\frac{1}{2}\cos(7x)\\ &=\sin(5x)\sin(2x). \end{aligned} $$

The check confirms both the minus sign between the cosine terms and the frequency factors in the antiderivative.

Worked Example: Integrating a Cosine-Cosine Product

Find \(\int \cos(4x)\cos(x)\,dx\).

The two frequencies give \(a-b=3\) and \(a+b=5\). Thus

$$ \cos(4x)\cos(x) =\frac{1}{2}\left[\cos(3x)+\cos(5x)\right]. $$

Integrating term by term gives

$$ \begin{aligned} \int \cos(4x)\cos(x)\,dx &=\frac{1}{2}\int\cos(3x)\,dx +\frac{1}{2}\int\cos(5x)\,dx\\ &=\frac{\sin(3x)}{6}+\frac{\sin(5x)}{10}+C. \end{aligned} $$

Differentiate to verify:

$$ \begin{aligned} \frac{d}{dx}\left[\frac{\sin(3x)}{6}+\frac{\sin(5x)}{10}\right] &=\frac{1}{2}\cos(3x)+\frac{1}{2}\cos(5x)\\ &=\cos(4x)\cos(x). \end{aligned} $$

The derivative reproduces the product, completing the check.

When the Frequencies Match

The condition \(a\ne b\) matters. If \(a=b\), the difference-frequency term becomes a constant, because \(\cos((a-a)x)=1\). Its integral is \(x\). The product-to-sum identities therefore give the following special cases for positive \(a\):

$$ \begin{aligned} \int \sin(ax)\cos(ax)\,dx &=-\frac{\cos(2ax)}{4a}+C,\\ \int \sin^2(ax)\,dx &=\frac{x}{2}-\frac{\sin(2ax)}{4a}+C,\\ \int \cos^2(ax)\,dx &=\frac{x}{2}+\frac{\sin(2ax)}{4a}+C. \end{aligned} $$

For instance, the sine-sine identity becomes \(\sin^2(ax)=\tfrac12[1-\cos(2ax)]\). Integrating the constant term \(\tfrac12\) produces \(x/2\), while integrating the other term produces \(-\sin(2ax)/(4a)\). The zero-frequency case is handled directly; it is not obtained by substituting \(a=b\) into a formula with denominator \(a-b\).

Common Pitfalls

A frequent mistake is reversing the difference terms in the sine-sine identity. For example, the following calculation is wrong:

$$ \sin(5x)\sin(2x) \mathrel{\not=} \frac{1}{2}\left[\cos(7x)-\cos(3x)\right]. $$

The correct order is the cosine of the difference minus the cosine of the sum:

$$ \sin(5x)\sin(2x) =\frac{1}{2}\left[\cos(3x)-\cos(7x)\right]. $$

The sign error is easy to detect by setting \(x=0\). The original product is zero, and the correct right-hand side is \(\tfrac12(1-1)=0\). The incorrect right-hand side would be \(\tfrac12(1-1)=0\) too, so this particular check does not distinguish the two orders; instead, differentiate the proposed antiderivative or test a value such as \(x=\pi/7\). At that value, \(\cos(7x)=\cos(\pi)=-1\), while \(\cos(3x)=\cos(3\pi/7)\), and reversing the terms changes the result. The identity as stated follows from the product-to-sum formula and should be retained in that order.

Another common error is omitting a frequency factor during integration. For example, \(\int \cos(5x)\,dx\) is not \(\sin(5x)\); differentiating \(\sin(5x)\) gives \(5\cos(5x)\). The correct antiderivative is \(\sin(5x)/5+C\). Finally, do not replace \(a-b\) by \(|a-b|\) in a formula without also tracking how the trigonometric term changes. Using the signed frequency as written is the safest approach.

A Reliable Procedure

For a product with distinct positive integer frequencies, keep the calculation organized in three stages:

1
Find the sum and difference.
Calculate \(a+b\) and \(a-b\). Confirm that \(a-b\ne0\).
2
Choose the matching identity.
Use the identity corresponding to sine-sine, cosine-cosine, or sine-cosine.
3
Integrate and check.
Integrate each term with its own frequency factor, then differentiate the result to recover the product.

Converting the product before integrating makes the calculation transparent: every term is a basic sine or cosine, every denominator comes from its frequency, and differentiation provides a direct check. The main decision is not a complicated integration technique; it is correctly identifying the sum and difference frequencies and respecting the zero-frequency exception.

Check Your Understanding

Use product-to-sum identities and check your proposed antiderivatives by differentiation.

  1. Rewrite \(\sin(6x)\cos(2x)\) as a sum of trigonometric terms. What are its sum and difference frequencies?
  2. Find an antiderivative of \(\sin(4x)\sin(x)\).
  3. Find an antiderivative of \(\cos(3x)\cos(2x)\).
  4. Why is the distinct-frequency condition needed in the displayed formulas?
  5. What term must be integrated directly when the difference frequency is zero?

Test yourself: Calculus II 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