Definite integrals of trigonometric functions

The antiderivative of sin⁡x\sin x is −cos⁡x-\cos x. We use it to find the area of one arch of the sine curve.

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

The area is 22. The arch has height 11 and width π≈3.14\pi \approx 3.14, so against the rectangle of the same width and height, of area π\pi, the ratio is 2π≈0.64\dfrac{2}{\pi} \approx 0.64. An arch of the sine fills about six tenths of the rectangle.

Mind the sign

FunctionAntiderivative
sin⁡x\sin x−cos⁡x-\cos x
cos⁡x\cos xsin⁡x\sin x

Since (−cos⁡x)′=sin⁡x(-\cos x)' = \sin x, the antiderivative is −cos⁡x-\cos x and not cos⁡x\cos x. It is the flip side of the minus sign that appears when cos⁡\cos is differentiated into −sin⁡-\sin.

Over a full period it is zero

∫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

It comes out 00 because the trough from π\pi to 2π2\pi lies below the xx-axis and is counted negative.

IntervalDefinite integralArea
00 to π\pi2222
π\pi to 2π2\pi−2-222
00 to 2π2\pi0044

To get the area 44, integrate ∣sin⁡x∣|\sin x|, or double the 22 obtained from a single arch.

Reading it on the graph of the antiderivative

The slope of y=−cos⁡xy = -\cos x is 00 at x=0x = 0, 11 at x=π2x = \dfrac{\pi}{2} and 00 at x=πx = \pi, which are exactly the values of sin⁡x\sin x. Where sin⁡\sin is positive −cos⁡-\cos increases, and where sin⁡\sin is negative it decreases.

The rise from −cos⁡0=−1-\cos 0 = -1 to −cos⁡π=1-\cos \pi = 1, an increase of 22, is the area itself. That a definite integral is a difference of antiderivatives can be seen between the two graphs.

The wave on the graph is y=sin⁡xy = \sin x, the wave lagging it by π2\dfrac{\pi}{2} is the antiderivative y=−cos⁡xy = -\cos x, and the large dots are the two ends of the integral.