## Definitions

### General

The cosine function, in modern notation written as cos(x), is a trigonometric function. Trigonometric functions are commonly established as functions of angle, in the context of right triangle geometry. This way, the cosine of an angle φ is defined as the ratio of the adjacent side of a right triangle containing φ, divided by its hypotenuse (see figure):

\[ \cos(\varphi) = \frac{\textrm{adjacent side}}{\textrm{hypotenuse}} \]

Unfortunately the above definition is limited to a range of angles between 0 and 90°. Extending that range, a convenient definition employs a unit circle (radius equal to 1). Any point of the circle, corresponds to a pair of sine and cosine values, of the angle that is contained by the horizontal positive axis and the radial segment towards that point, as shown in the figure below. Particularly, the cosine is found as the coordinate on the horizontal axis. The angle φ is assumed positive in counter-clockwise direction. The equivalence of the circle points, as sine and cosine pairs, is established by examining the right triangle, having as hypotenuse the radial segment towards a circumferential point (length equal to unity), and either of the axes. Angles larger than 90°, as well as negative ones, are possible, if the appropriate sign of the coordinates is respected.

The above definitions of cosine function are based on a geometrical construct (right triangle or unit circle) and assume that its argument is an angle. This association to an angle is restrictive, considering the broad use of trigonometric functions in mathematics, physics, engineering etc. Applications may accept any real value \( x\in \mathbb{R} \) as argument, with any imaginable meaning given to it, or no meaning at all. In that case, x should be better measured in radians (\(1 rad = \frac{180^\circ}{\pi}\)). Thus, derivation and integration rules are more conveniently applied.

### Series

All trigonometric functions can be defined in an infinite series form. Cosine function can be written as:

\[ \begin{split} \cos x & = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n}}{(2n)!} = \\ & = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \frac{x^6}{720} \cdots \end{split} \]

The above series converges for any x. However, the number of terms required to converge, increases with the value of x, which makes it impractical for numerical calculations at an arbitrary range. For a limited range however (i.e. 0≤x≤π) it can be useful.

### Properties

The cosine function is periodic, with a period equal to 2π. Therefore:

\[ \cos (x + 2k\pi ) = \cos x, \quad k\in \mathbb{Z} \]

Also the cosine function changes sign at π intervals, according to the following expression:

\[ \cos (x+k\pi) = -\cos x, \quad k\in \mathbb{Z} \]

Sine and cosine functions are associated through an argument shift equal to π/2:

\[ \cos x = \sin(\frac{\pi}{2}+x)\]

The derivative of the cosine function (x in radians) is:

\[ \left(\cos x\right)' = -\sin x \]

The integral of the cosine function (x in radians) is given by:

\[ \int \cos x\, \mathrm{d}x = \sin x +C \]

### Identities

The following formulas are valid for the cosine function:

\[ \begin{split} & \cos (-a) &= \cos a \\ \\ & \cos (2a) &= \cos^2 a - \sin^2 a\\ \\ & \cos (2a) &= \frac{1-\tan^2 a}{1+\tan^2 a}\\ \\ & \cos(a+b) &= \cos a\cos b-\sin a\sin b\\ \\ & \cos(a-b) &= \cos a\cos b+\sin a\sin a\\ \\ & \cos^2 a &= 1 - \sin^2 a \\ \\ & \cos^2 a &= \frac{1 + \cos(2a)}{2} \\ \\ & \cos^2 a &= \frac{1}{1+\tan^2 a}\\ \\ \end{split} \]