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.
The Sine and Cosine Substitution Rules
The standard derivatives of sine and cosine are
Applying the chain rule to a differentiable inner function \(g\) gives
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.
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
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
Check by differentiating:
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,
Differentiate the proposed answer:
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:
Set \(u=4x+1\), which gives \(du=4\,dx\). Therefore,
Check by differentiation:
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.
In \(\sin(3x^2+2)\), for example, the inner function is \(3x^2+2\).
For \(g(x)=3x^2+2\), the derivative is \(g'(x)=6x\).
Look for the factor \(6x\), or for a constant multiple of it, alongside \(\sin(g(x))\) or \(\cos(g(x))\).
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:
Differentiating the proposed answer reveals the error:
which is three times the required integrand. Since the inner derivative is \(3\), the correct antiderivative includes a factor of \(\frac{1}{3}\):
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 pattern | Antiderivative |
|---|---|
| \(\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.
Check Your Understanding
For each question, identify the inner derivative and decide which sine or cosine rule applies.
- Evaluate \(\int 5\cos(5x-2)\,dx\).
- Evaluate \(\int 4x\sin(2x^2+7)\,dx\).
- Evaluate \(\int \cos(6x)\,dx\), including the required constant factor.
- What is the derivative of \(-\cos(x^3+1)\)?
- 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\).