AP Calculus AB and BC

Integral of cos x: Answer, Proof, and Mistakes

The integral of cos x is sin x + C. Because the derivative of sin x is cos x, sin x is an antiderivative of cos x, and adding an arbitrary constant C gives every antiderivative. For a definite integral the constant cancels, so the integral of cos x from a to b equals sin(b) minus sin(a).

cosxdx=sinx+C\int \cos x\,dx = \sin x + C

Why the integral of cos x is sin x + C

Antidifferentiation is differentiation run backwards. A function FF is an antiderivative of ff when F(x)=f(x)F'(x) = f(x), so to integrate cosx\cos x you only need to name the function whose derivative is cosx\cos x. That function is sinx\sin x, one of the basic derivatives memorized in Unit 2, Topic 2.7.

ddx[sinx]=cosx\frac{d}{dx}\left[\sin x\right] = \cos x

Reading that statement right to left gives the indefinite integral. Note the differential dxdx: it is part of the notation, not decoration, and AP readers expect it.

cosxdx=sinx+C\int \cos x\,dx = \sin x + C

Why the + C is not optional

Constants differentiate to zero, so sinx\sin x, sinx+4\sin x + 4, and sinx100\sin x - 100 all have derivative cosx\cos x. The symbol CC stands for that whole family. On an indefinite integral, leaving it off is a lost point; on a definite integral it cancels and does not appear.

There is no domain restriction to state. Both cosx\cos x and sinx\sin x are defined and continuous for every real xx, so the rule holds on all of R\mathbb{R}, unlike 1xdx=lnx+C\int \frac{1}{x}\,dx = \ln|x| + C, which breaks at x=0x = 0.

Definite integrals of cos x

Once you have an antiderivative, the Fundamental Theorem of Calculus (Topic 6.7) turns any definite integral of cosx\cos x into one subtraction.

abcosxdx=sinbsina\int_a^b \cos x\,dx = \sin b - \sin a

Over a quarter period starting at zero, the area under one arch of the cosine curve comes out to exactly 1.

0π/2cosxdx=sinπ2sin0=10=1\int_0^{\pi/2} \cos x\,dx = \sin\frac{\pi}{2} - \sin 0 = 1 - 0 = 1

Extend the interval to π\pi and the answer collapses to zero, because the curve sits above the axis on (0,π2)\left(0, \frac{\pi}{2}\right) and an equal amount below it on (π2,π)\left(\frac{\pi}{2}, \pi\right).

0πcosxdx=sinπsin0=0\int_0^{\pi} \cos x\,dx = \sin \pi - \sin 0 = 0

Signed area against total area

A definite integral reports signed area, so the zero above is correct and is not a mistake. If a question asks for the total area between y=cosxy = \cos x and the xx-axis on [0,π][0, \pi], split at x=π2x = \frac{\pi}{2} and add the absolute values, which gives 1+1=21 + 1 = 2.

Integrating composites such as cos(u)

Bare cosx\cos x is rare on the free-response section. What actually appears is cos\cos of something, which calls for u-substitution (Topic 6.9), the reverse of the chain rule.

cos(u)du=sin(u)+C\int \cos(u)\,du = \sin(u) + C

Example 1. For cos(5x)dx\int \cos(5x)\,dx, let u=5xu = 5x, so du=5dxdu = 5\,dx and dx=15dudx = \frac{1}{5}\,du. The reciprocal of the inside coefficient comes out front.

cos(5x)dx=15sin(5x)+C\int \cos(5x)\,dx = \frac{1}{5}\sin(5x) + C

Example 2. For xcos(x2)dx\int x\cos(x^2)\,dx, let u=x2u = x^2, so du=2xdxdu = 2x\,dx. The stray xx outside is exactly what makes the substitution work, up to the factor of 12\frac{1}{2}.

xcos(x2)dx=12sin(x2)+C\int x\cos(x^2)\,dx = \frac{1}{2}\sin(x^2) + C

Example 3. cos2xdx\int \cos^2 x\,dx is a different problem entirely, since no substitution clears the square. Use the power-reduction identity cos2x=1+cos(2x)2\cos^2 x = \frac{1 + \cos(2x)}{2} first, then integrate term by term.

cos2xdx=x2+sin(2x)4+C\int \cos^2 x\,dx = \frac{x}{2} + \frac{\sin(2x)}{4} + C

Check any antiderivative by differentiating

Every result on this page can be confirmed in one line. Differentiate x2+sin(2x)4\frac{x}{2} + \frac{\sin(2x)}{4} and you get 12+cos(2x)2=1+cos(2x)2=cos2x\frac{1}{2} + \frac{\cos(2x)}{2} = \frac{1 + \cos(2x)}{2} = \cos^2 x. If differentiating your answer does not return the integrand, the answer is wrong, and this costs about ten seconds.

Common mistakes with the integral of cos x

  • Importing a minus sign. Differentiating cosine produces one, ddx[cosx]=sinx\frac{d}{dx}[\cos x] = -\sin x, but integrating it does not: cosxdx=sinx+C\int \cos x\,dx = \sin x + C, positive. The negative belongs to the other pair, sinxdx=cosx+C\int \sin x\,dx = -\cos x + C.
  • Dropping the constant of integration. An indefinite integral names a family of functions, so sinx\sin x alone is an incomplete answer.
  • Forgetting the 1k\frac{1}{k} on cos(kx)\cos(kx). The answer to cos(3x)dx\int \cos(3x)\,dx is 13sin(3x)+C\frac{1}{3}\sin(3x) + C; differentiate sin(3x)\sin(3x) and the chain rule hands back a stray 3.
  • Working in degrees. The rule depends on ddx[sinx]=cosx\frac{d}{dx}[\sin x] = \cos x, which only holds in radians, so keep a graphing calculator in radian mode for every integral on the AP exam.
  • Confusing cos2x\cos^2 x with cos(x2)\cos(x^2). The first needs power reduction; the second has no elementary antiderivative at all and will never be asked for as an indefinite integral.
  • Carrying limits through a substitution unchanged. If you switch to uu in a definite integral, either convert the limits to uu values or convert back to xx before evaluating.

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 cos x?

cosxdx=sinx+C\int \cos x\,dx = \sin x + C. Sine is the antiderivative because ddx[sinx]=cosx\frac{d}{dx}[\sin x] = \cos x, and the constant CC covers every function in that family. The rule is valid for all real xx.

Why is there no negative sign in the integral of cos x?

The minus sign appears when you differentiate cosine, since ddx[cosx]=sinx\frac{d}{dx}[\cos x] = -\sin x. Integration reverses the derivative of sine instead, and that derivative is +cosx+\cos x, so cosxdx=sinx+C\int \cos x\,dx = \sin x + C. The companion rule with the negative is sinxdx=cosx+C\int \sin x\,dx = -\cos x + C.

What is the integral of cos(kx)?

cos(kx)dx=1ksin(kx)+C\int \cos(kx)\,dx = \frac{1}{k}\sin(kx) + C for any nonzero constant kk. Substituting u=kxu = kx gives du=kdxdu = k\,dx, which is where the 1k\frac{1}{k} comes from. For example, cos(5x)dx=15sin(5x)+C\int \cos(5x)\,dx = \frac{1}{5}\sin(5x) + C.

What is the definite integral of cos x from 0 to pi?

It is 0. By the Fundamental Theorem, 0πcosxdx=sinπsin0=0\int_0^{\pi} \cos x\,dx = \sin \pi - \sin 0 = 0. The positive area on (0,π2)\left(0, \frac{\pi}{2}\right) exactly cancels the negative area on (π2,π)\left(\frac{\pi}{2}, \pi\right). The total unsigned area is 2.

Is the integral of cos squared x just sine squared?

No. There is no product rule for integrals, so you cannot square the answer. Apply the identity cos2x=1+cos(2x)2\cos^2 x = \frac{1 + \cos(2x)}{2} first, which gives cos2xdx=x2+sin(2x)4+C\int \cos^2 x\,dx = \frac{x}{2} + \frac{\sin(2x)}{4} + C.