Tutorials › Calculus I › Substitution With Sine And Cosine Compositions

Substitution and Reversing the Chain Rule · Tutorial 1130 of 1495

Substitution With Sine And Cosine Compositions

Use the inner function and its derivative to integrate sine and cosine compositions, including cases where a constant factor must be adjusted.

Intermediate 9 min read

What You'll Learn

  • Recognize the patterns sin(g(x))g'(x) and cos(g(x))g'(x)
  • Apply the substitution rule to sine and cosine compositions
  • Handle affine inner functions and constant derivative factors
  • Work with polynomial inner functions when their derivatives match
  • Check antiderivatives by differentiating them
  • Identify and correct the missing chain factor error

Recognizing Sine and Cosine Composition Patterns

When an expression contains sine or cosine of a function, the chain rule tells us how to differentiate it. Substitution reverses that process: if the derivative of the inner function is also present as a factor, the integral can be recognized as the derivative of a simple trigonometric expression.

For example, differentiating \(\sin(x^2)\) gives \(2x\cos(x^2)\). This makes an integral containing \(\cos(x^2)\) together with the factor \(2x\) a natural candidate for substitution. The essential feature is not merely that the integrand contains a trigonometric function. The derivative of its inner function must also be accounted for.

Key pattern: If \(g\) is differentiable, then \(\sin(g(x))g'(x)\) has antiderivative \(-\cos(g(x))\), and \(\cos(g(x))g'(x)\) has antiderivative \(\sin(g(x))\).

The Sine and Cosine Substitution Rules

The standard derivatives of sine and cosine are

$$ \frac{d}{du}\sin u=\cos u, \qquad \frac{d}{du}\cos u=-\sin u. $$

Applying the chain rule to a differentiable inner function \(g\) gives

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

These derivative identities directly give the corresponding indefinite integral rules. The constant \(C\) is included because adding a constant to an antiderivative does not change its derivative.

Substitution rules: For differentiable \(g\), on an interval where the expressions are defined,
$$ \int \cos(g(x))g'(x)\,dx=\sin(g(x))+C, \qquad \int \sin(g(x))g'(x)\,dx=-\cos(g(x))+C. $$

The sign in the sine rule is important: the derivative of cosine is negative sine. To see the substitution notation, set \(u=g(x)\), so \(du=g'(x)\,dx\). Then the sine pattern becomes \(\int \sin(u)\,du=-\cos(u)+C\), and the cosine pattern becomes \(\int \cos(u)\,du=\sin(u)+C\). Replacing \(u\) by \(g(x)\) gives the stated rules.

Why the Rules Work

The chain rule provides a complete justification. Suppose \(G\) is an antiderivative of a function \(h\), so \(G'(u)=h(u)\). Differentiating \(G(g(x))\) gives

$$ \frac{d}{dx}G(g(x))=G'(g(x))g'(x)=h(g(x))g'(x). $$

Thus \(G(g(x))\) is an antiderivative of \(h(g(x))g'(x)\). For cosine, take \(h(u)=\cos u\) and \(G(u)=\sin u\). For sine, take \(h(u)=\sin u\) and \(G(u)=-\cos u\). This is precisely why the inner derivative belongs in the integrand: it is the factor generated when the outer antiderivative is differentiated through the composition.

Worked Examples

Worked Example: A Cosine Composition With a Polynomial Inner Function

Evaluate \(\int 2x\cos(x^2+3)\,dx\). The inner function is \(g(x)=x^2+3\), so \(g'(x)=2x\), which matches the factor multiplying the cosine.

Set \(u=x^2+3\). Then \(du=2x\,dx\), and the integral becomes

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

Check by differentiating:

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

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

Worked Example: A Sine Composition With a Polynomial Inner Function

Evaluate \(\int 6x^2\sin(2x^3-1)\,dx\). Let \(g(x)=2x^3-1\). Its derivative is \(g'(x)=6x^2\), exactly the factor outside the sine.

Set \(u=2x^3-1\), so \(du=6x^2\,dx\). Using the sine rule,

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

Differentiate the proposed answer:

$$ \frac{d}{dx}\bigl(-\cos(2x^3-1)\bigr) =\sin(2x^3-1)\cdot 6x^2 =6x^2\sin(2x^3-1). $$

This is the original integrand, including its positive sign.

Worked Example: An Affine Inner Function and a Constant Factor

Evaluate \(\int \cos(4x+1)\,dx\). Here \(g(x)=4x+1\), so \(g'(x)=4\). The integrand does not contain the factor \(4\), so first account for it:

$$ \int \cos(4x+1)\,dx =\frac{1}{4}\int 4\cos(4x+1)\,dx. $$

Set \(u=4x+1\), which gives \(du=4\,dx\). Therefore,

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

Check by differentiation:

$$ \frac{d}{dx}\left(\frac{1}{4}\sin(4x+1)\right) =\frac{1}{4}\cos(4x+1)\cdot 4 =\cos(4x+1). $$

The factor \(4\) from the chain rule cancels the coefficient \(\frac{1}{4}\), leaving the original integrand.

Matching the Inner Derivative

In practice, identify the inner function first, then differentiate it. Compare that derivative with the factors already in the integrand. If they match, the relevant substitution rule applies directly. If they differ by a nonzero constant, a constant multiple can be taken outside or introduced to make the match.

1
Identify the inner function.
In \(\sin(3x^2+2)\), for example, the inner function is \(3x^2+2\).
2
Differentiate it.
For \(g(x)=3x^2+2\), the derivative is \(g'(x)=6x\).
3
Compare with the integrand.
Look for the factor \(6x\), or for a constant multiple of it, alongside \(\sin(g(x))\) or \(\cos(g(x))\).
4
Apply the matching rule.
Use \(-\cos(g(x))\) for the sine pattern and \(\sin(g(x))\) for the cosine pattern, including any necessary constant factor.

For instance, the inner derivative for \(3x^2+2\) is \(6x\). Thus an integrand such as \(6x\cos(3x^2+2)\) matches the cosine rule exactly, while \(x\cos(3x^2+2)\) does not have the full inner derivative as a factor.

A Common Pitfall: Losing the Chain Factor

A frequent mistake is to integrate a composed cosine as though its inner function were just \(x\). For example, the following calculation is wrong:

$$ \int \cos(3x)\,dx \overset{\text{wrong}}{=} \sin(3x)+C. $$

Differentiating the proposed answer reveals the error:

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

which is three times the required integrand. Since the inner derivative is \(3\), the correct antiderivative includes a factor of \(\frac{1}{3}\):

$$ \int \cos(3x)\,dx =\frac{1}{3}\sin(3x)+C, \qquad \frac{d}{dx}\left(\frac{1}{3}\sin(3x)\right) =\cos(3x). $$

This correction depends on the inner derivative being a constant. If an integral contains a trigonometric composition but no matching derivative factor and no constant relationship that supplies it, this rule alone does not provide an antiderivative. A substitution is a method for recognizing a derivative pattern, not permission to ignore a factor that is absent.

Choosing the Sign and the Constant

The outer antiderivative determines the sign. The patterns can be compared directly:

Integrand patternAntiderivative
\(\cos(g(x))g'(x)\)\(\sin(g(x))+C\)
\(\sin(g(x))g'(x)\)\(-\cos(g(x))+C\)

A useful way to avoid sign errors is to differentiate the proposed result once. For the sine pattern, differentiating \(-\cos(g(x))\) gives \(\sin(g(x))g'(x)\), not its negative. For the cosine pattern, differentiating \(\sin(g(x))\) gives \(\cos(g(x))g'(x)\). This short check confirms both the sign and the chain factor.

Why These Patterns Matter

Many integrals that initially look complicated are simple once the inner function and its derivative are recognized together. Polynomial inner functions often produce a polynomial factor that is exactly their derivative. Affine inner functions produce a constant derivative, which explains why a reciprocal constant is needed when that factor is not already present.

The same reasoning also tells you when the direct pattern is not present. For example, \(\int x\cos(x^2+1)\,dx\) does not contain the full derivative \(2x\) as a factor. One can rewrite it as \(\frac{1}{2}\int 2x\cos(x^2+1)\,dx\), so in this particular case a constant adjustment completes the match. By contrast, a factor that cannot be related to the inner derivative by a constant cannot be repaired by this basic pattern alone.

Takeaway: For a sine or cosine composition, identify the inner function, find its derivative, and check whether that derivative is present or differs from the available factor by a constant. Then use the correct outer antiderivative and verify the result by differentiation.

Check Your Understanding

For each question, identify the inner derivative and decide which sine or cosine rule applies.

  1. Evaluate \(\int 5\cos(5x-2)\,dx\).
  2. Evaluate \(\int 4x\sin(2x^2+7)\,dx\).
  3. Evaluate \(\int \cos(6x)\,dx\), including the required constant factor.
  4. What is the derivative of \(-\cos(x^3+1)\)?
  5. Explain why \(\int \sin(g(x))\,dx\) does not automatically match the sine substitution rule when \(g'(x)\) is not a constant equal to \(1\).

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