# 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.

Source: https://practicecalculus.com/functions/cosine-function
Updated: 2026-11-03

$$ f(x) = \cos x $$

## At a glance

- **Domain:** $(-\infty, \infty)$
- **Range:** $[-1, 1]$
- **Derivative:** $-\sin x$
- **Integral:** $\sin x + C$
- **Period:** $2\pi$
- **Symmetry:** Even: $\cos(-x) = \cos x$

## Key takeaways

- $\cos x$ is the $x$-coordinate of the point at angle $x$ (in radians) on the unit circle.
- Cosine is even, repeats every $2\pi$ and stays between $-1$ and $1$.
- The derivative of $\cos x$ is $-\sin x$, and $\int \cos x\,dx = \sin x + C$.

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](/functions/sine-function), 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
title: 'Graph of y = cos x from −2π to 2π'
caption: 'Cosine starts at its maximum $\cos 0 = 1$, crosses zero at odd multiples of $\frac{\pi}{2}$ and reaches $-1$ at $x = \pm\pi$.'
x: [-6.6, 6.6]
y: [-1.6, 1.6]
functions:
  - expr: cos(x)
    label: y = cos x
points:
  - [0, 1, '(0, 1)']
  - [1.5708, 0, '(π/2, 0)']
  - [3.1416, -1, '(π, −1)']
  - [4.7124, 0, '(3π/2, 0)']
```

## 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](/functions/tangent-function) 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](/rules/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](/functions/tangent-function) and the reciprocal of secant (see [reciprocal trig functions](/functions/reciprocal-trig-functions)). Restricted to $[0, \pi]$, it has the inverse [arccosine](/functions/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](/blog/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](/blog/derivatives-of-trig-functions).

## 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.
