Tutorials › AP Calculus › Substitution in Trigonometric Integrals

Antiderivatives and Substitution · Tutorial 500 of 999

Substitution in Trigonometric Integrals

Recognize when a composite sine or cosine integral matches the reverse chain rule, then use substitution and verify the antiderivative by differentiation.

Intermediate 9 min read

What You'll Learn

  • Identify the inner function in a composite sine or cosine integrand
  • Match the inner derivative to the remaining factor in the integrand
  • Use substitution to integrate cosine composites
  • Account for the negative sign in sine-composite antiderivatives
  • Adjust for a constant multiple of the inner derivative
  • Verify each result by differentiating it

Recognizing a Trigonometric Composite

The basic antiderivatives of sine and cosine are useful when their arguments are simple. Substitution extends those rules to composites such as \(\cos(3x^2+1)\) and \(\sin(x^2-5x+4)\), provided the derivative of the inner expression also appears as a factor.

The key is to look at the integrand as a whole. For instance, in \(\cos(3x^2+1)\), the inner function is \(3x^2+1\), whose derivative is \(6x\). The integral \(\int 6x\cos(3x^2+1)\,dx\) contains exactly that derivative factor. The chain rule tells us why this match matters: differentiating a trigonometric function of an inner function produces the derivative of that inner function as a factor.

Definition: In an expression such as \(\sin(g(x))\) or \(\cos(g(x))\), the function \(g(x)\) is the inner function (or argument). A trigonometric composite integral has the derivative-of-the-inner-function pattern when its integrand includes \(g'(x)\) as a factor, possibly multiplied by a constant.

Trigonometric arguments in calculus are measured in radians. The formulas below use the basic antiderivatives \(\int \cos u\,du=\sin u+C\) and \(\int \sin u\,du=-\cos u+C\). The negative sign in the second formula will be important throughout.

The Substitution Pattern

Suppose \(g\) is differentiable. If the integrand contains \(\cos(g(x))g'(x)\), set \(u=g(x)\). Then \(du=g'(x)\,dx\), and the integral becomes the basic cosine antiderivative in the variable \(u\). For a sine composite, the same substitution leads to the basic sine antiderivative, including its negative sign.

Theorem: If \(g\) is differentiable on an interval, then \(\sin(g(x))+C\) is an antiderivative of \(\cos(g(x))g'(x)\), and \(-\cos(g(x))+C\) is an antiderivative of \(\sin(g(x))g'(x)\). If the integrand contains a constant multiple of \(g'(x)\) instead, adjust the constant factor before applying the pattern.

In indefinite integrals, the constant \(C\) represents any constant of integration. The substitution is a way to recognize a known antiderivative; after integrating in \(u\), the final expression must be written back in terms of \(x\).

Why the Pattern Works

The justification is the chain rule. For a differentiable \(g\), differentiating \(\sin(g(x))\) gives \(\cos(g(x))g'(x)\). Differentiating \(-\cos(g(x))\) gives \(\sin(g(x))g'(x)\). Thus, in each case, the proposed antiderivative differentiates to the original integrand.

$$ \frac{d}{dx}\sin(g(x)) = \cos(g(x))g'(x) $$
$$ \frac{d}{dx}\bigl(-\cos(g(x))\bigr) = \sin(g(x))g'(x) $$

This also explains the substitution procedure: \(u=g(x)\) and \(du=g'(x)\,dx\) replace the composite argument and its derivative together. The integral in \(x\) then has the same form as the basic integral in \(u\). The chain rule is not merely a way to check the answer after the fact; it is the reason the substitution works.

Worked Examples

Worked Example: Cosine of a Quadratic

Evaluate \(\int 6x\cos(3x^2+1)\,dx\). The inner function is \(g(x)=3x^2+1\), and its derivative is \(g'(x)=6x\), which is the factor outside the cosine.

Set \(u=3x^2+1\). Then \(du=6x\,dx\), so

$$ \int 6x\cos(3x^2+1)\,dx = \int \cos(u)\,du = \sin(u)+C = \sin(3x^2+1)+C. $$

To check, differentiate the result. The outer sine differentiates to cosine, and the inner expression differentiates to \(6x\):

$$ \frac{d}{dx}\left(\sin(3x^2+1)+C\right) = \cos(3x^2+1)\cdot 6x = 6x\cos(3x^2+1). $$

This is the original integrand, so the antiderivative is correct.

Worked Example: Sine of a Quadratic

Evaluate \(\int (2x-5)\sin(x^2-5x+4)\,dx\). Let \(g(x)=x^2-5x+4\). Its derivative is \(g'(x)=2x-5\), exactly the factor multiplying the sine.

Use \(u=x^2-5x+4\), so \(du=(2x-5)\,dx\). The integral becomes

$$ \int (2x-5)\sin(x^2-5x+4)\,dx = \int \sin(u)\,du = -\cos(u)+C = -\cos(x^2-5x+4)+C. $$

Check by differentiating. The derivative of \(-\cos(g(x))\) is \(\sin(g(x))g'(x)\):

$$ \frac{d}{dx}\left(-\cos(x^2-5x+4)+C\right) = \sin(x^2-5x+4)(2x-5). $$

Reordering the factors gives \((2x-5)\sin(x^2-5x+4)\), the original integrand. The negative sign in the antiderivative is necessary.

Worked Example: Adjusting for a Constant Factor

Evaluate \(\int 3x\cos(x^2)\,dx\). The inner function \(g(x)=x^2\) has derivative \(2x\). The integrand has \(3x\), which is not exactly \(2x\), but it is \(\frac{3}{2}\) times \(2x\):

$$ 3x=\frac{3}{2}(2x). $$

Therefore, with \(u=x^2\) and \(du=2x\,dx\), the substitution gives

$$ \int 3x\cos(x^2)\,dx = \frac{3}{2}\int 2x\cos(x^2)\,dx = \frac{3}{2}\int \cos(u)\,du = \frac{3}{2}\sin(u)+C = \frac{3}{2}\sin(x^2)+C. $$

Check by differentiation:

$$ \frac{d}{dx}\left(\frac{3}{2}\sin(x^2)+C\right) = \frac{3}{2}\cos(x^2)\cdot 2x = 3x\cos(x^2). $$

The result differentiates to the integrand. Keeping the factor \(\frac{3}{2}\) is essential: the inner derivative is \(2x\), not \(3x\).

Worked Example: A Linear Inner Function

Evaluate \(\int \sin(4x-\frac{\pi}{3})\,dx\). The inner function is \(g(x)=4x-\frac{\pi}{3}\), with derivative \(g'(x)=4\). The integrand does not include this derivative factor, so write \(dx=\frac{1}{4}(4\,dx)\).

Set \(u=4x-\frac{\pi}{3}\), so \(du=4\,dx\) and \(dx=\frac{1}{4}\,du\). Then

$$ \int \sin\left(4x-\frac{\pi}{3}\right)\,dx = \frac{1}{4}\int \sin(u)\,du = -\frac{1}{4}\cos(u)+C = -\frac{1}{4}\cos\left(4x-\frac{\pi}{3}\right)+C. $$

Check by differentiating:

$$ \frac{d}{dx}\left(-\frac{1}{4}\cos\left(4x-\frac{\pi}{3}\right)+C\right) = -\frac{1}{4}\left(-\sin\left(4x-\frac{\pi}{3}\right)\right)(4) = \sin\left(4x-\frac{\pi}{3}\right). $$

The factors \(-\frac{1}{4}\), \(-1\), and \(4\) combine to give \(1\), so the derivative matches the integrand.

A Reliable Recognition Process

When an integrand contains a sine or cosine of an expression, identify the inner function first. Then differentiate it and compare that derivative with the remaining factors in the integrand. If they match, substitution reduces the integral to a basic sine or cosine antiderivative. If they differ by a constant, account for the constant explicitly.

1
Identify the argument.
For \(\cos(3x^2+1)\), the inner function is \(3x^2+1\).
2
Differentiate the argument.
Here, \(\frac{d}{dx}(3x^2+1)=6x\).
3
Compare factors.
Check whether the integrand contains the inner derivative, or a constant multiple of it.
4
Substitute and integrate.
Use \(u=g(x)\), \(du=g'(x)\,dx\), and the appropriate basic trigonometric antiderivative.
5
Return to \(x\) and check.
Write the result in terms of \(x\), then differentiate it to compare with the original integrand.

A Common Sign and Factor Mistake

A frequent error is to treat the antiderivatives of sine and cosine as though they had the same sign. In fact, \(\int \cos u\,du=\sin u+C\), while \(\int \sin u\,du=-\cos u+C\). A related error is to omit a constant adjustment when the inner derivative is not exactly the outside factor.

For example, an incorrect attempt at \(\int 3x\cos(x^2)\,dx\) might say that \(u=x^2\), \(du=2x\,dx\), and therefore the answer is \(\sin(x^2)+C\). Differentiating this proposed answer gives

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

which is not the given integrand \(3x\cos(x^2)\). The correction is to account for the factor \(3x=\frac{3}{2}(2x)\), giving \(\frac{3}{2}\sin(x^2)+C\). Its derivative is \(3x\cos(x^2)\), as required. Checking by differentiation catches both sign errors and missing factors.

When This Pattern Applies

This method applies when the integrand has a sine or cosine of an inner function and includes the derivative of that inner function as a factor, with any constant multiplier handled correctly. It does not, by itself, provide an antiderivative when that derivative factor is absent or does not match. Recognizing the limits of the pattern is as important as recognizing a successful match.

The useful habit is to verify the proposed result: differentiate it using the chain rule and check that every factor and sign reproduces the integrand. This connects the substitution directly to the reverse process of differentiation and gives a dependable test of the final answer.

Check Your Understanding

For each integral, identify the inner function and its derivative before integrating. Then check your result by differentiation.

  1. Evaluate \(\int 8x\cos(4x^2-7)\,dx\).
  2. Evaluate \(\int (6x+1)\sin(3x^2+x)\,dx\).
  3. Evaluate \(\int 5\cos(5x+2)\,dx\).
  4. For \(\int 2x\sin(x^2)\,dx\), explain why the antiderivative includes a negative sign.
  5. What derivative check would reveal that \(\sin(x^2)+C\) is not an antiderivative of \(3x\cos(x^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