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.
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.
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.
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
To check, differentiate the result. The outer sine differentiates to cosine, and the inner expression differentiates to \(6x\):
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
Check by differentiating. The derivative of \(-\cos(g(x))\) is \(\sin(g(x))g'(x)\):
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\):
Therefore, with \(u=x^2\) and \(du=2x\,dx\), the substitution gives
Check by differentiation:
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
Check by differentiating:
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.
For \(\cos(3x^2+1)\), the inner function is \(3x^2+1\).
Here, \(\frac{d}{dx}(3x^2+1)=6x\).
Check whether the integrand contains the inner derivative, or a constant multiple of it.
Use \(u=g(x)\), \(du=g'(x)\,dx\), and the appropriate basic trigonometric antiderivative.
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
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.
- Evaluate \(\int 8x\cos(4x^2-7)\,dx\).
- Evaluate \(\int (6x+1)\sin(3x^2+x)\,dx\).
- Evaluate \(\int 5\cos(5x+2)\,dx\).
- For \(\int 2x\sin(x^2)\,dx\), explain why the antiderivative includes a negative sign.
- What derivative check would reveal that \(\sin(x^2)+C\) is not an antiderivative of \(3x\cos(x^2)\)?