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.

sinxdx=cosx+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 sinxdx\int \sin x\,dx is to ask which function has sinx\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[cosx]=sinx\frac{d}{dx}\left[\cos x\right] = -\sin x

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

ddx[cosx+C]=(sinx)=sinx\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 1xdx\int \frac{1}{x}\,dx.

sinxdx=cosx+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 cosx-\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 sinx\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 cosx-\cos x gives a clean whole number, which is why this integral shows up so often in area and average-value problems.

0πsinxdx=[cosx]0π=cosπ+cos0=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 sinx|\sin x|, or double the result over [0,π][0, \pi].

02πsinxdx=[cosx]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 sinx\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π00πsinxdx=2π\frac{1}{\pi - 0}\int_0^{\pi} \sin x\,dx = \frac{2}{\pi}
  • 0π/2sinxdx=1\int_0^{\pi/2} \sin x\,dx = 1, the quarter arch.
  • 0πsinxdx=2\int_0^{\pi} \sin x\,dx = 2, one full arch.
  • 02πsinxdx=0\int_0^{2\pi} \sin x\,dx = 0, one full period of net signed area.
  • The average value of sinx\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 sinx\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=2xdxdu = 2x\,dx and xdx=12dux\,dx = \frac{1}{2}du.

12sinudu=12cosu+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. sin2x\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 sin2x=1cos(2x)2\sin^2 x = \frac{1 - \cos(2x)}{2} first.

sin2xdx=x2sin(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 sinx\sin x is +cosx+\cos x, but the integral of sinx\sin x is cosx+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 [cosx]0π\left[-\cos x\right]_0^{\pi} you compute (cosπ)(cos0)(-\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πsinxdx=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[cosx]=sinx\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?

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

Why is the integral of sin x negative cos x?

Because ddx[cosx]=sinx\frac{d}{dx}\left[\cos x\right] = -\sin x. Cosine alone differentiates to sinx-\sin x, which is off by a factor of 1-1, so the antiderivative of sinx\sin x must be cosx-\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: [cosx]0π=cosπ+cos0=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[cosx]=sinx\frac{d}{dx}\left[\cos x\right] = -\sin x, while sinxdx=cosx+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.