Tutorials › AP Calculus › Sine and Cosine Antiderivatives

Antiderivatives and Substitution · Tutorial 487 of 999

Sine and Cosine Antiderivatives

Find sine and cosine antiderivatives with linear arguments, account for the inner constant, and verify each result by differentiating.

Intermediate 8 min read

What You'll Learn

  • Recall the antiderivatives of sine and cosine and why their signs differ
  • Integrate sine and cosine when the angle is a linear expression
  • Adjust for a constant multiplier outside the trigonometric function
  • Handle a constant angle separately when the coefficient of the variable is zero
  • Check an antiderivative by differentiating it
  • Spot and correct common sign and coefficient errors

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.

Key formulas: For a constant \(a\ne 0\) and constant \(b\), the antiderivatives of \(\sin(ax+b)\) and \(\cos(ax+b)\) include the factor \(1/a\). The sign in the sine formula is negative; the cosine formula has a positive sign.

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\).

Definition: If \(F'(x)=f(x)\), then \(F\) is an antiderivative of \(f\), and \(\int f(x)\,dx=F(x)+C\), where \(C\) is any constant.

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:

$$ \int \cos x\,dx=\sin x+C \qquad\text{and}\qquad \int \sin x\,dx=-\cos x+C. $$

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\):

$$ \int (\cos x+\sin x)\,dx = \sin x-\cos x+C. $$

Differentiate the result term by term:

$$ \frac{d}{dx}\bigl(\sin x-\cos x+C\bigr) = \cos x+\sin x. $$

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\).

Theorem: For constants \(a\ne 0\) and \(b\), $$ \int \sin(ax+b)\,dx=-\frac{1}{a}\cos(ax+b)+C \qquad\text{and}\qquad \int \cos(ax+b)\,dx=\frac{1}{a}\sin(ax+b)+C. $$

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.

1
Differentiate the proposed sine antiderivative.
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). $$
2
Differentiate the proposed cosine antiderivative.
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). $$
3
Include the arbitrary constant.
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:

$$ \int A\sin(ax+b)\,dx = -\frac{A}{a}\cos(ax+b)+C $$
$$ \int A\cos(ax+b)\,dx = \frac{A}{a}\sin(ax+b)+C, \qquad a\ne 0. $$

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:

$$ \int 5\sin\left(3x-\frac{\pi}{6}\right)\,dx = -\frac{5}{3}\cos\left(3x-\frac{\pi}{6}\right)+C. $$

Differentiate the proposed answer. Differentiating the cosine contributes \(-\sin(3x-\frac{\pi}{6})\), and differentiating its angle contributes \(3\):

$$ \begin{aligned} \frac{d}{dx}\left[-\frac{5}{3}\cos\left(3x-\frac{\pi}{6}\right)+C\right] &= -\frac{5}{3}\left[-\sin\left(3x-\frac{\pi}{6}\right)\right](3)\\ &=5\sin\left(3x-\frac{\pi}{6}\right). \end{aligned} $$

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:

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

Differentiate the result, including the derivative \(-2\) of the angle:

$$ \begin{aligned} \frac{d}{dx}\left[2\sin\left(\frac{\pi}{2}-2x\right)+C\right] &= 2\cos\left(\frac{\pi}{2}-2x\right)(-2)\\ &= -4\cos\left(\frac{\pi}{2}-2x\right). \end{aligned} $$

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:

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

Now differentiate each term:

$$ \begin{aligned} \frac{d}{dx}\left[\frac{1}{2}\sin(4x)-6\cos\left(\frac{x}{2}\right)+C\right] &= \frac{1}{2}\cos(4x)(4) -6\left[-\sin\left(\frac{x}{2}\right)\right]\left(\frac{1}{2}\right)\\ &= 2\cos(4x)+3\sin\left(\frac{x}{2}\right). \end{aligned} $$

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:

$$ \int 7\sin\left(\frac{\pi}{6}\right)\,dx = \frac{7}{2}x+C. $$

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:

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

which has both the wrong sign and an extra factor of \(3\). The corrected antiderivative is \(-\frac{1}{3}\cos(3x)+C\), because:

$$ \frac{d}{dx}\left[-\frac{1}{3}\cos(3x)\right] = -\frac{1}{3}\bigl[-\sin(3x)\bigr](3) = \sin(3x). $$

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.

  1. Find \(\int \cos(5x)\,dx\).
  2. Find \(\int 6\sin(2x+\frac{\pi}{3})\,dx\).
  3. Find \(\int -3\cos(\frac{\pi}{4}-x)\,dx\).
  4. Find \(\int \left(\sin x+4\cos(3x)\right)\,dx\).
  5. Explain why the formula for \(\int \sin(ax+b)\,dx\) requires \(a\ne 0\), and state how to handle \(a=0\).

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