practicecalculus
Trigonometric functions

Cosine Function cos(x): Graph, Derivative, Integral and Properties

The cosine function cos(x): its graph, domain, range, period, key values, derivative −sin(x), integral sin(x) + C and common mistakes.

Trigonometric functions Updated 3 min read

At a glance

f(x) = \cos x
Domain
(-\infty, \infty)
Range
[-1, 1]
Derivative
-\sin x
Integral
\sin x + C
Period
2\pi
Symmetry
Even: \cos(-x) = \cos x
On this page
  1. Definition of cos x
  2. Graph of y = cos x
  3. Key values of cosine
  4. Properties of the cosine function
  5. Derivative of cos x
  6. Integral of cos x
  7. Worked examples
  8. Common mistakes
  9. How cosine connects to other topics

The cosine function takes an angle x, measured in radians, and returns the x-coordinate of the point at that angle on the unit circle. Its graph is the same wave as sine, shifted left by a quarter period, so it starts at its peak instead of at zero.

Definition of cos x

Travel a distance x counterclockwise around the unit circle from (1, 0). The point you reach is (\cos x, \sin x), so

\cos x = \text{the } x\text{-coordinate of the point at angle } x.

For an acute angle in a right triangle this is the ratio \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}.

Graph of y = cos x

Graph of y = cos x from −2π to 2π
Cosine starts at its maximum \cos 0 = 1, crosses zero at odd multiples of \frac{\pi}{2} and reaches -1 at x = \pm\pi.

Key values of cosine

x 0 \frac{\pi}{6} \frac{\pi}{4} \frac{\pi}{3} \frac{\pi}{2} \pi \frac{3\pi}{2} 2\pi
\cos x 1 \frac{\sqrt{3}}{2} \frac{\sqrt{2}}{2} \frac{1}{2} 0 -1 0 1

Notice the row is the sine row read backward on \left[0, \frac{\pi}{2}\right], because \cos x = \sin\left(\frac{\pi}{2} - x\right).

Properties of the cosine function

  • Domain and range. All real numbers in, values in [-1, 1] out.
  • Period. \cos(x + 2\pi) = \cos x, and A\cos(bx) has amplitude |A| and period \frac{2\pi}{|b|}.
  • Zeros. \cos x = 0 exactly when x = \frac{\pi}{2} + k\pi for an integer k. These are the places where tangent and secant have vertical asymptotes.
  • Even symmetry. \cos(-x) = \cos x.
  • Identities. \sin^2 x + \cos^2 x = 1, and the double angle formula \cos(2x) = \cos^2 x - \sin^2 x = 2\cos^2 x - 1 = 1 - 2\sin^2 x.

Derivative of cos x

\frac{d}{dx}\cos x = -\sin x

The minus sign makes sense on the graph: just after x = 0 cosine is falling, and -\sin x is negative there. At x = \pi cosine bottoms out, and -\sin\pi = 0. The second derivative is -\cos x, so cosine, like sine, satisfies y'' = -y.

With the chain rule, \frac{d}{dx}\cos(u) = -\sin(u)\cdot u'.

Integral of cos x

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

For example, \int_0^{\pi/2}\cos x\,dx = \sin\frac{\pi}{2} - \sin 0 = 1.

Worked examples

Example 1: chain rule. Differentiate f(x) = \cos(4x - 1). The inside derivative is 4, so f'(x) = -4\sin(4x - 1).

Example 2: power of cosine. Differentiate g(x) = \cos^3 x = (\cos x)^3. The outer power gives 3\cos^2 x and the inside gives -\sin x:

g'(x) = -3\cos^2 x\sin x

Example 3: u-substitution. Evaluate \int x\cos(x^2)\,dx. Let u = x^2, so du = 2x\,dx:

\int x\cos(x^2)\,dx = \frac{1}{2}\int \cos u\,du = \frac{1}{2}\sin(x^2) + C

Example 4: a tangent line. At x = \frac{\pi}{2}, \cos x = 0 and the slope is -\sin\frac{\pi}{2} = -1. The tangent line is y = -\left(x - \frac{\pi}{2}\right).

Common mistakes

  1. Dropping the minus sign. \frac{d}{dx}\cos x = -\sin x, not \sin x. A useful memory aid: derivatives of the "co" functions (cosine, cotangent, cosecant) all carry a minus sign.
  2. Adding a minus sign to the integral. \int\cos x\,dx = \sin x + C with no minus sign.
  3. Misreading \cos^2 x. \cos^2 x means (\cos x)^2, not \cos(\cos x) and not \cos(x^2).
  4. Forgetting the inside derivative. \frac{d}{dx}\cos(2x) = -2\sin(2x), not -\sin(2x).

How cosine connects to other topics

Cosine is the denominator of tangent and the reciprocal of secant (see reciprocal trig functions). Restricted to [0, \pi], it has the inverse arccosine. In Calculus 2 you will integrate powers of cosine using the identity \cos^2 x = \frac{1 + \cos 2x}{2}, and meet its Taylor series \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots. For more practice differentiating it, see the guide to derivatives of trig functions.

Practice it now

Sine, cosine and tangent

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of cos x?

The derivative of \cos x is -\sin x. With the chain rule, \frac{d}{dx}\cos(u) = -\sin(u)\,u'.

What is the integral of cos x?

The antiderivative of \cos x is \sin x + C, because the derivative of \sin x is \cos x.

Is cosine even or odd?

Cosine is even: \cos(-x) = \cos x. Its graph is symmetric about the y-axis.

What is the difference between the sine and cosine graphs?

They are the same wave shifted by a quarter period: \cos x = \sin\left(x + \frac{\pi}{2}\right). Cosine starts at its maximum, \cos 0 = 1, while sine starts at zero.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.