Skip to content
ihateDesmos

Integral of cos x

Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The integral of cos x
∫
cos(x)
dx =
sin(x)+C

The integral of cos x is sin x + C, with no minus sign, because the derivative of sin x is cos x.

−6−4−2246−220
Open in calculator
y=cos(x)
in blue and its integral
y=sin(x)
(with C = 0) in red.

How to integrate cos x

Method: standard integral.

  1. 1
    We know that d/dx sin x = cos x.
  2. 2
    So sin x is an antiderivative of cos x.
  3. 3
    Adding the constant gives sin x + C.

What it means

The area under cos x from 0 to π/2 is exactly 1, the height sin x reaches at π/2. Sine’s value at any point is the running total of area under the cosine curve.

The integral from 0 to π/2

Using the antiderivative: F(π/2) − F(0) = 1, which is about 1. A direct numerical integration of cos x gives 1, which agrees.

−6−5−4−3−2−1123456−2−112

Check by differentiating

The derivative of the answer should give back the original function. The last column measures that slope directly from the answer, and it matches.

Checking the integral
xcos xSlope of the answer
−5.030.3122980.312298
−3.14−0.999999−0.999999
−1.260.3058170.305817
011
1.88−0.3043−0.3043
3.77−0.808965−0.808965
5.030.3122980.312298

Common mistakes

  • Adding a minus sign out of habit from sin x.

Frequently asked questions

What is the integral of cos x?
The integral of cos x is sin x + C.
What is the integral of cos x from 0 to π/2?
1, which is about 1.
What is the integral of cos(ax)?
sin(ax)/a + C.

Keep going

Integrate any function

Type your own function into the integral calculator for the steps, the answer and a graph.

Open the integral calculator