y=cosxy = \cos x

Graph of the Cosine Function y=cosxy = \cos x

y=cosxy = \cos x is the xx-coordinate of the point at angle xx, measured in radians, on the unit circle1. Where the sine gives the height of that point, the cosine gives its horizontal position. The graph is the same wave as the sine, only shifted.

Domain and range

The domain is all real numbers and the range is the interval [1,1][-1, 1].

  • The domain is all real numbers
  • The range is 1y1-1 \leq y \leq 1
  • The amplitude is 11 and the period is 2π2\pi
  • The maximum 11 falls at x=2nπx = 2n\pi and the minimum 1-1 at x=(2n+1)πx = (2n+1)\pi

Periodicity

Since cos(x+2π)=cosx\cos(x + 2\pi) = \cos x, the period is 2π2\pi.

Symmetry

Since cos(x)=cosx\cos(-x) = \cos x, it is an even function, symmetric about the yy-axis. This is the sharpest difference from the sine, which is odd.

Monotonicity and extrema

The derivative is y=sinxy' = -\sin x. The function attains its maximum 11 at x=2nπx = 2n\pi and its minimum 1-1 at x=(2n+1)πx = (2n + 1)\pi. In particular it starts at a crest, since cos0=1\cos 0 = 1.

The second derivative y=cosxy'' = -\cos x changes sign at each zero, so the inflection points sit at x=π2+nπx = \dfrac{\pi}{2} + n\pi and coincide with the zeros.

Notable values

xxcosx\cos x
0011
π6\dfrac{\pi}{6}32\dfrac{\sqrt{3}}{2}
π4\dfrac{\pi}{4}22\dfrac{\sqrt{2}}{2}
π3\dfrac{\pi}{3}12\dfrac{1}{2}
π2\dfrac{\pi}{2}00
π\pi1-1

The zeros are the solutions of cosx=0\cos x = 0, namely x=π2+nπx = \dfrac{\pi}{2} + n\pi.

Approximation near the origin

The tangent at (0,1)(0, 1) is horizontal, and near that crest a downward parabola approximates the curve closely.

cosx1x22\cos x \approx 1 - \frac{x^2}{2}

The Taylor series has only even powers and converges for every real number.

cosx=1x22!+x44!\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots

Comparison with the sine

Itemy=sinxy = \sin xy=cosxy = \cos x
Value at x=0x = 00011
Symmetryoddeven
Where the maximum fallsπ2+2nπ\dfrac{\pi}{2} + 2n\pi2nπ2n\pi
Zerosnπn\piπ2+nπ\dfrac{\pi}{2} + n\pi
Derivativecosx\cos xsinx-\sin x

Since cosx=sin(x+π2)\cos x = \sin\left( x + \dfrac{\pi}{2} \right), the cosine is the sine wave shifted left by π2\dfrac{\pi}{2}. The points where cosx=0\cos x = 0 fix the positions of the vertical asymptotes of tanx\tan x and secx\sec x. In Euler's formula eix=cosx+isinxe^{ix} = \cos x + i\sin x, the cosine supplies the real part.

Tying angles to lengths

The cosine links angles with lengths, as in the dot product and the law of cosines2.

ab=abcosθc2=a2+b22abcosC\begin{align*} \vec{a} \cdot \vec{b} &= |\vec{a}||\vec{b}|\cos\theta \\ c^2 &= a^2 + b^2 - 2ab\cos C \end{align*}

Applications

  • Computing the angle between two vectors
  • The law of cosines in solving triangles
  • The power factor of alternating current
  • The cosine components of a Fourier expansion

As a wave it is identical to the sine, but because it peaks at x=0x = 0 it is the natural reference for phase.

  1. Sine and cosine, Wikipedia
  2. Law of cosines, Wikipedia