Why the Signs Matter
The derivatives of sine and cosine are closely related, but the signs are different: the derivative of \(\sin x\) is \(\cos x\), while the derivative of \(\cos x\) is \(-\sin x\). Reversing these relationships to find antiderivatives therefore requires careful attention to the sign.
A second detail matters when the angle is not simply \(x\). If the angle is \(3x\), for example, differentiating a trigonometric function of that angle introduces a factor of \(3\). An antiderivative must account for that factor.
Throughout, angles are measured in radians, as required for the standard derivative formulas for sine and cosine. The main habit is to differentiate each proposed answer: this checks both the sign and any constant factor.
The Basic Sine and Cosine Antiderivatives
An antiderivative of a function \(f\) on an interval is a function \(F\) whose derivative equals \(f\) throughout that interval. The indefinite integral represents the family of all such antiderivatives, so it includes an arbitrary constant \(C\).
The standard derivative facts are \(\frac{d}{dx}\sin x=\cos x\) and \(\frac{d}{dx}\cos x=-\sin x\). Reversing them gives the basic formulas:
The negative sign in the sine antiderivative is essential. Differentiating \(-\cos x\) gives \(\sin x\), because the derivative of cosine already carries a negative sign. By contrast, differentiating \(\sin x\) gives \(\cos x\) without an extra sign.
Worked Example: Basic Sine and Cosine
Find \(\int (\cos x+\sin x)\,dx\), and check the result.
Integrate the two terms separately. The cosine term has antiderivative \(\sin x\), and the sine term has antiderivative \(-\cos x\):
Differentiate the result term by term:
This matches the integrand, so the antiderivative is correct. The constant disappears under differentiation, as it should.
When the Angle Is a Linear Expression
For a linear angle \(ax+b\), where \(a\) and \(b\) are constants, the chain rule gives a factor of \(a\) when differentiating a trigonometric function of \(ax+b\). For instance, differentiating \(\cos(ax+b)\) gives \(-a\sin(ax+b)\). To obtain \(\sin(ax+b)\), the antiderivative must therefore include both a negative sign and a factor of \(1/a\).
The factor \(1/a\) is the reciprocal of the coefficient of \(x\) in the angle. It is not an extra rule to memorize without reason: it cancels the factor \(a\) that appears when the proposed antiderivative is differentiated.
Why the Linear-Argument Formulas Work
The formulas follow directly from the chain rule. This short derivation also explains how to check them reliably.
For \(a\ne 0\), apply the chain rule to \(-\frac{1}{a}\cos(ax+b)\). The derivative of the outer cosine contributes a negative sine, and differentiating the inner angle contributes \(a\): $$ \frac{d}{dx}\left(-\frac{1}{a}\cos(ax+b)\right) = -\frac{1}{a}\bigl(-\sin(ax+b)\bigr)a = \sin(ax+b). $$
The chain rule gives $$ \frac{d}{dx}\left(\frac{1}{a}\sin(ax+b)\right) = \frac{1}{a}\cos(ax+b)a = \cos(ax+b). $$
The derivative of any constant \(C\) is zero, so adding \(C\) does not change either result. Thus each displayed formula gives a family of antiderivatives.
These calculations prove the formulas by checking that their derivatives equal the corresponding integrands. They also show why \(a\) must be nonzero in these versions: the displayed factor \(1/a\) is not defined when \(a=0\). A zero coefficient gives a constant angle and is handled separately below.
Including a Constant Multiple Outside
If the integrand has a constant multiplier \(A\), keep it in the calculation. The same formulas, together with the constant-multiple rule for integration, give:
Here \(A\), \(a\), and \(b\) are constants. The factor \(A\) stays in the result, while the factor \(1/a\) compensates for the inner derivative. For a sum of sine and cosine terms, find an antiderivative for each term and add the results.
Worked Example: Sine with a Shifted, Scaled Angle
Find \(\int 5\sin(3x-\frac{\pi}{6})\,dx\), and verify the answer.
The outside multiplier is \(A=5\), and the coefficient of \(x\) in the angle is \(a=3\). Use the sine formula, including its negative sign:
Differentiate the proposed answer. Differentiating the cosine contributes \(-\sin(3x-\frac{\pi}{6})\), and differentiating its angle contributes \(3\):
The derivative matches the integrand, so the result is correct.
Worked Example: Cosine with a Negative Inner Coefficient
Find \(\int -4\cos(\frac{\pi}{2}-2x)\,dx\), and check it.
In this case \(A=-4\) and \(a=-2\). The coefficient in the angle is negative, so \(A/a=(-4)/(-2)=2\). The cosine formula gives:
Differentiate the result, including the derivative \(-2\) of the angle:
This is exactly the original integrand. Keeping the negative inner coefficient in \(a\) is important: it affects the sign of \(A/a\).
Adding Several Terms
When an integrand is a sum of terms with linear sine or cosine arguments, integrate each term separately and combine the results. Differentiation checks the full expression term by term.
Worked Example: A Sum of Scaled Trigonometric Terms
Find an antiderivative of \(2\cos(4x)+3\sin(\frac{x}{2})\), and verify it.
For the first term, \(A=2\) and \(a=4\). Its antiderivative is \(\frac{2}{4}\sin(4x)=\frac{1}{2}\sin(4x)\). For the second term, \(A=3\) and \(a=\frac{1}{2}\). Its antiderivative is \(-\frac{3}{1/2}\cos(\frac{x}{2})=-6\cos(\frac{x}{2})\). Therefore:
Now differentiate each term:
The derivative equals the original sum, confirming the antiderivative.
When the Angle Is Constant
The formulas with \(1/a\) require \(a\ne 0\). If \(a=0\), then \(ax+b=b\) is constant, so the sine or cosine of the angle is just a constant value. The antiderivative of a constant \(k\) is \(kx+C\), since \(\frac{d}{dx}(kx+C)=k\).
Worked Example: A Constant Angle
Find \(\int 7\sin(\frac{\pi}{6})\,dx\), and check the answer.
Since \(\sin(\frac{\pi}{6})=\frac{1}{2}\), the integrand is the constant \(7\cdot\frac{1}{2}=\frac{7}{2}\). Thus:
Differentiate: \(\frac{d}{dx}(\frac{7}{2}x+C)=\frac{7}{2}=7\sin(\frac{\pi}{6})\). The answer checks.
Common Pitfall: Missing a Sign or Reciprocal
A frequent error is to integrate \(\sin(3x)\) as \(\cos(3x)\), or to write an answer with no factor for the inner coefficient. Both errors are caught by differentiating.
For example, the incorrect calculation \(\int\sin(3x)\,dx=\cos(3x)+C\) fails in two ways. Differentiation gives:
which has both the wrong sign and an extra factor of \(3\). The corrected antiderivative is \(-\frac{1}{3}\cos(3x)+C\), because:
A dependable check is to differentiate the proposed antiderivative before moving on. Confirm that the chain rule restores the inner coefficient and that the sign of the trigonometric derivative produces the desired integrand.
Summary of the Formulas
| Integrand | Antiderivative | Condition |
|---|---|---|
| \(\cos x\) | \(\sin x+C\) | None beyond the usual domain |
| \(\sin x\) | \(-\cos x+C\) | None beyond the usual domain |
| \(\sin(ax+b)\) | \(-\frac{1}{a}\cos(ax+b)+C\) | \(a\ne 0\) |
| \(\cos(ax+b)\) | \(\frac{1}{a}\sin(ax+b)+C\) | \(a\ne 0\) |
For a constant multiple outside the trigonometric function, multiply the stated antiderivative by that same constant. If the coefficient of \(x\) in the angle is zero, treat the integrand as a constant instead. In every case, differentiating the proposed answer should recover the integrand.
Check Your Understanding
Find each antiderivative, then check it by differentiation.
- Find \(\int \cos(5x)\,dx\).
- Find \(\int 6\sin(2x+\frac{\pi}{3})\,dx\).
- Find \(\int -3\cos(\frac{\pi}{4}-x)\,dx\).
- Find \(\int \left(\sin x+4\cos(3x)\right)\,dx\).
- Explain why the formula for \(\int \sin(ax+b)\,dx\) requires \(a\ne 0\), and state how to handle \(a=0\).