AP Calculus AB and BC

Integral of sin x: Answer, Proof, and Mistakes

The integral of sin x is -cos x + C. The sign flips because the derivative of cos x is -sin x, so the antiderivative of sin x needs a minus sign in front. Check it by differentiating: the derivative of -cos x + C is sin x. As a definite integral, sin x from 0 to pi equals 2.

∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C

Why the antiderivative of sin x carries a minus sign

Antidifferentiation is differentiation run backwards, so the fastest way to find ∫sin⁡x dx\int \sin x\,dx is to ask which function has sin⁡x\sin x as its derivative. The trig derivative that produces a sine is the one for cosine, and it comes with a negative sign.

ddx[cos⁡x]=−sin⁡x\frac{d}{dx}\left[\cos x\right] = -\sin x

That is off by a factor of −1-1, so multiply by −1-1. Differentiating −cos⁡x-\cos x cancels the two negatives and leaves exactly sin⁡x\sin x.

ddx[−cos⁡x+C]=−(−sin⁡x)=sin⁡x\frac{d}{dx}\left[-\cos x + C\right] = -(-\sin x) = \sin x

Because the check works for every real xx, the antiderivative is valid on the whole real line. There is no domain restriction to state, unlike ∫1x dx\int \frac{1}{x}\,dx.

∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C

The + C is part of the answer

An indefinite integral names a whole family of functions, since any constant differentiates to zero. Writing −cos⁡x-\cos x without +C+ C on a free-response indefinite integral loses a point. On a definite integral the constant cancels in the subtraction, so you do not write it there.

Definite integrals of sin x you should recognize

Antiderivatives of sin⁡x\sin x appear on the AP exam mostly inside definite integrals evaluated with the Fundamental Theorem of Calculus (Topic 6.7). Unit 6, Integration and Accumulation of Change, is weighted 15 to 20 percent on both AB and BC, so these evaluations are worth drilling until they are automatic.

One arch of the sine curve is the standard case. Substituting the limits into −cos⁡x-\cos x gives a clean whole number, which is why this integral shows up so often in area and average-value problems.

∫0πsin⁡x dx=[−cos⁡x]0π=−cos⁡π+cos⁡0=1+1=2\int_0^{\pi} \sin x\,dx = \left[-\cos x\right]_0^{\pi} = -\cos\pi + \cos 0 = 1 + 1 = 2

Over a full period the answer is zero, because the arch below the axis contributes the same amount with the opposite sign. This is the difference between net signed area and total area: for total area you would integrate ∣sin⁡x∣|\sin x|, or double the result over [0,π][0, \pi].

∫02πsin⁡x dx=[−cos⁡x]02π=−1+1=0\int_0^{2\pi} \sin x\,dx = \left[-\cos x\right]_0^{2\pi} = -1 + 1 = 0

The same antiderivative feeds Unit 8. The average value of sin⁡x\sin x on [0,π][0, \pi] (Topic 8.1) is the integral divided by the length of the interval, and it is a number worth remembering.

1π−0∫0πsin⁡x dx=2π\frac{1}{\pi - 0}\int_0^{\pi} \sin x\,dx = \frac{2}{\pi}
  • ∫0π/2sin⁡x dx=1\int_0^{\pi/2} \sin x\,dx = 1, the quarter arch.
  • ∫0πsin⁡x dx=2\int_0^{\pi} \sin x\,dx = 2, one full arch.
  • ∫02πsin⁡x dx=0\int_0^{2\pi} \sin x\,dx = 0, one full period of net signed area.
  • The average value of sin⁡x\sin x on [0,π][0, \pi] is 2π≈0.6366\frac{2}{\pi} \approx 0.6366.

When the sine has something else inside it

A bare sin⁡x\sin x is rare. Most AP integrals hand you sin⁡(something)\sin(\text{something}), and then the rule is substitution (Topic 6.9), not the memorized form. The tell is that differentiating −cos⁡(3x)-\cos(3x) would produce an extra factor of 3 by the chain rule, so the antiderivative has to divide it back out.

∫sin⁡(3x) dx=−13cos⁡(3x)+C\int \sin(3x)\,dx = -\frac{1}{3}\cos(3x) + C

The general linear case follows the same pattern for any nonzero constant kk. This shortcut is safe only when the inside is linear; anything else needs a real substitution.

∫sin⁡(kx) dx=−1kcos⁡(kx)+C\int \sin(kx)\,dx = -\frac{1}{k}\cos(kx) + C

When the inside is not linear, look for its derivative sitting in the integrand. In ∫xsin⁡(x2) dx\int x\sin(x^2)\,dx, let u=x2u = x^2, so du=2x dxdu = 2x\,dx and x dx=12dux\,dx = \frac{1}{2}du.

12∫sin⁡u du=−12cos⁡u+C\frac{1}{2}\int \sin u\,du = -\frac{1}{2}\cos u + C
∫xsin⁡(x2) dx=−12cos⁡(x2)+C\int x\sin(x^2)\,dx = -\frac{1}{2}\cos(x^2) + C

A squared sine is a different animal entirely. sin⁡2x\sin^2 x is not a composite of the form sin⁡(u)\sin(u), so no substitution untangles it directly; you rewrite it with the power-reducing identity sin⁡2x=1−cos⁡(2x)2\sin^2 x = \frac{1 - \cos(2x)}{2} first.

∫sin⁡2x dx=x2−sin⁡(2x)4+C\int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin(2x)}{4} + C

Common mistakes with the integral of sin x

  1. Dropping the minus sign. The derivative of sin⁡x\sin x is +cos⁡x+\cos x, but the integral of sin⁡x\sin x is −cos⁡x+C-\cos x + C. Going forwards and backwards move the sign in opposite directions, and mixing them up is the most common error on this integral.
  2. Forgetting the constant of integration. An indefinite integral without +C+ C is an incomplete answer.
  3. Skipping the reciprocal factor on a composite. ∫sin⁡(3x) dx=−13cos⁡(3x)+C\int \sin(3x)\,dx = -\frac{1}{3}\cos(3x) + C, not −cos⁡(3x)+C-\cos(3x) + C. Differentiate your answer to catch this in seconds.
  4. Sign-flipping the limits. In [−cos⁡x]0π\left[-\cos x\right]_0^{\pi} you compute (−cos⁡π)−(−cos⁡0)(-\cos\pi) - (-\cos 0), which is 1+1=21 + 1 = 2. Distributing the outer minus sign carelessly turns a 2 into a 0.
  5. Reporting 0 as the area under one full period. ∫02πsin⁡x dx=0\int_0^{2\pi} \sin x\,dx = 0 is the net signed area; the total area is 4.
  6. Working in degrees. Every antiderivative here assumes radians, so a calculator left in degree mode will disagree with your exact answer.

Always check by differentiating

Antidifferentiation has a free verification step that differentiation does not. Differentiate your candidate and see whether the integrand comes back. If ddx[−cos⁡x]=sin⁡x\frac{d}{dx}\left[-\cos x\right] = \sin x, the answer is right, sign and all.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of sin x?

∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C, valid for every real xx. Verify it by differentiating: ddx[−cos⁡x+C]=sin⁡x\frac{d}{dx}\left[-\cos x + C\right] = \sin x.

Why is the integral of sin x negative cos x?

Because ddx[cos⁡x]=−sin⁡x\frac{d}{dx}\left[\cos x\right] = -\sin x. Cosine alone differentiates to −sin⁡x-\sin x, which is off by a factor of −1-1, so the antiderivative of sin⁡x\sin x must be −cos⁡x-\cos x to cancel that sign.

What is the integral of sin x from 0 to pi?

It equals 2. Evaluate the antiderivative at the endpoints: [−cos⁡x]0π=−cos⁡π+cos⁡0=1+1=2\left[-\cos x\right]_0^{\pi} = -\cos\pi + \cos 0 = 1 + 1 = 2. That is the area under one arch of the sine curve.

What is the integral of sin(2x)?

∫sin⁡(2x) dx=−12cos⁡(2x)+C\int \sin(2x)\,dx = -\frac{1}{2}\cos(2x) + C. Substituting u=2xu = 2x contributes the factor 12\frac{1}{2}, which undoes the chain rule factor you would pick up differentiating cos⁡(2x)\cos(2x).

Is the integral of sin x the same as the derivative of cos x?

They are related but not equal. ddx[cos⁡x]=−sin⁡x\frac{d}{dx}\left[\cos x\right] = -\sin x, while ∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C. Both carry a minus sign, but one turns cosine into sine and the other turns sine into cosine.