# Trigonometric identity

In mathematics, trigonometric identities are equations involving trigonometric functions that are true for all values of the occurring variables. These identities are useful whenever expressions involving trigonometric functions need to be simplified. An important application is the integration of non-trigonometric functions: a common trick involves first using the substitution rule with a trigonometric function, and then simplifying the resulting integral with a trigonometric identity.

## Notation

The following notations hold for all six trigonometric functions: sine (sin), cosine (cos), tangent (tan), cotangent (cot), secant (sec), and cosecant (csc). For brevity, only the sine case is given in the table.

sin2(x) "sine squared [of] x" the square of sine; sine to the second power sin2(x) = (sin(x))2
arcsin(x) "arcsine [of] x" the inverse function for sine arcsin(x) = y  if and only if  sin(y) = x and $\displaystyle -{\pi \over 2} \le y \le {\pi \over 2}$
(sin(x))−1 "sine [of] x, to the negative-one power" the reciprocal of sine; the multiplicative inverse of sine (sin(x))−1 = 1 / sin(x)

arcsin(x) can also be written sin−1(x); this must not be confused with (sin(x))−1.

## Definitions

$\displaystyle \tan (x) = \frac {\sin (x)} {\cos(x)} \qquad \operatorname{cot}(x) = \frac {\cos (x)} {\sin(x)} = \frac{1} {\tan(x)}$
$\displaystyle \operatorname{sec}(x) = \frac{1} {\cos(x)} \qquad \operatorname{csc}(x) = \frac{1} {\sin(x)}$

For more information, including definitions based on the sides of a right triangle, see Trigonometric functions.

## Periodicity, symmetry, and shifts

These are most easily shown from the unit circle:

Periodicity (for any integer k) Symmetry Shifts
$\displaystyle \sin(x) = \sin(x + 2k\pi) \,$ $\displaystyle \sin(-x) = -\sin(x) \,$ $\displaystyle \sin(x) = \cos\left(\frac{\pi}{2} - x\right)$
$\displaystyle \cos(x) = \cos(x + 2k\pi) \,$ $\displaystyle \cos(-x) =\; \cos(x) \,$ $\displaystyle \cos(x) = \sin\left(\frac{\pi}{2}-x\right)$
$\displaystyle \tan(x) = \tan(x + k\pi) \,$ $\displaystyle \tan(-x) = -\tan(x) \,$ $\displaystyle \tan(x) = \cot\left(\frac{\pi}{2} - x\right)$
$\displaystyle \cot(-x) = -\cot(x) \,$

For some purposes it is important to know that any linear combination of sine waves of the same period but different phase shifts is also a sine wave with the same period, but a different phase shift. In other words, we have

$\displaystyle a\sin x+b\cos x=\sqrt{a^2+b^2}\cdot\sin(x+\varphi)$

where

$\displaystyle \varphi= \left\{ \begin{matrix} {\rm arctan}(b/a),&&\mbox{if }a\ge0; \; \\ \pi+{\rm arctan}(b/a),&&\mbox{if }a<0. \; \end{matrix} \right. \;$

## Pythagorean identities

These identities are based on the Pythagorean theorem. The first is sometimes simply called the Pythagorean trigonometric identity.

$\displaystyle \sin^2(x) + \cos^2(x) = 1 \;$
$\displaystyle \tan^2(x) + 1 = \sec^2(x) \;$
$\displaystyle 1 + \cot^2(x) = \csc^2(x) \;$

Note that the second equation is obtained from the first by dividing both sides by cos²(x). To get the third equation, divide the first by sin²(x) instead.

## Angle sum and difference identities

These are also known as the addition and subtraction theorems or formulas. The quickest way to prove these is Euler's formula. The tangent formula follows from the other two. A geometric proof of the sin(x + y) identity is given at the end of this article.

$\displaystyle \sin(x \pm y) = \sin(x) \cos(y) \pm \cos(x) \sin(y)\,$
$\displaystyle \cos(x \pm y) = \cos(x) \cos(y) \mp \sin(x) \sin(y)\,$
$\displaystyle \tan(x \pm y) = \frac{\tan(x) \pm \tan(y)}{1 \mp \tan(x)\tan(y)}$
$\displaystyle {\rm c\imath s}(x+y)={\rm c\imath s}(x)\,{\rm c\imath s}(y)$
$\displaystyle {\rm c\imath s}(x-y)={{\rm c\imath s}(x)\over{\rm c\imath s}(y)}$

where

$\displaystyle {\rm c\imath s}(x)=e^{\imath x}=\cos(x)+\imath\sin(x)\,$

and

$\displaystyle \imath =\sqrt{-1}.\,$

## Double-angle formulas

These can be shown by substituting x = y in the addition theorems, and using the Pythagorean formula for the latter two. Or use de Moivre's formula with n = 2.

$\displaystyle \sin(2x) = 2 \sin (x) \cos(x) \,$
$\displaystyle \cos(2x) = \cos^2(x) - \sin^2(x) = 2 \cos^2(x) - 1 = 1 - 2 \sin^2(x) \,$
$\displaystyle \tan(2x) = \frac{2 \tan (x)} {1 - \tan^2(x)}$

The double-angle formulas can also be used to find Pythagorean triples. If (a, b, c) are the lengths of the sides of a right triangle, then (a2 − b2, 2ab, c2) also form a right triangle, where angle B is the angle being doubled. If a2 − b2 is negative, take its opposite and use the supplement of B.

## Multiple-angle formulas

If Tn is the nth Chebyshev polynomial then

$\displaystyle \cos(nx)=T_n(\cos(x)). \,$
$\displaystyle \cos(nx)+i\sin(nx)=(\cos(x)+i\sin(x))^n \,$

The Dirichlet kernel Dn(x) is the function occurring on both sides of the next identity:

$\displaystyle 1+2\cos(x)+2\cos(2x)+2\cos(3x)+\cdots+2\cos(nx) \;$
$\displaystyle = \frac{ \sin\left(\left(n+\frac{1}{2}\right)x\right) } { \sin(x/2) } \;$

The convolution of any integrable function of period 2π with the Dirichlet kernel coincides with the function's nth-degree Fourier approximation. The same holds for any measure or generalized function.

## Power-reduction formulas

Solve the second and third versions of the cosine double-angle formula for cos2(x) and sin2(x), respectively.

$\displaystyle \cos^2(x) = {1 + \cos(2x) \over 2}$
$\displaystyle \sin^2(x) = {1 - \cos(2x) \over 2}$
$\displaystyle \sin^2(x) \cos^2(x) = {1 - \cos(4 x) \over 8}$
$\displaystyle \sin^3(x) = \frac{3 \sin(x) - \sin(3 x)}{4}$
$\displaystyle \cos^3(x) = \frac{3 \cos(x) + \cos(3 x)}{4}$

## Half-angle formulas

Sometimes the formulas in the previous section are called half-angle formulas. To see why, substitute x/2 for x in the power reduction formulas, then solve for cos(x/2) and sin(x/2) to get:

$\displaystyle \cos\left(\frac{x}{2}\right) = \pm\, \sqrt{\frac{1 + \cos(x)}{2}}$
$\displaystyle \sin\left(\frac{x}{2}\right) = \pm\, \sqrt{\frac{1 - \cos(x)}{2}}$

These may also be called the half-angle formulas. Then

$\displaystyle \tan\left(\frac{x}{2}\right) = {\sin (x/2) \over \cos (x/2)} = \pm\, \sqrt{1 - \cos x \over 1 + \cos x}. \qquad \qquad (1)$

Multiply both numerator and denominator inside the radical by 1 + cos x, then simplify (using a Pythagorean identity):

$\displaystyle \tan\left(\frac{x}{2}\right) = \pm\, \sqrt{(1 - \cos x) (1 + \cos x) \over (1 + \cos x) (1 + \cos x)} = \pm\, \sqrt{1 - \cos^2 x \over (1 + \cos x)^2}$
$\displaystyle = {\sin x \over 1 + \cos x}.$

Likewise, multiplying both numerator and denominator inside the radical — in equation (1) — by
1 − cos x, then simplifying:

$\displaystyle \tan\left(\frac{x}{2}\right) = \pm\, \sqrt{(1 - \cos x) (1 - \cos x) \over (1 + \cos x) (1 - \cos x)} = \pm\, \sqrt{(1 - \cos x)^2 \over (1 - \cos^2 x)}$
$\displaystyle = {1 - \cos x \over \sin x}.$

Thus, the pair of half-angle formulas for the tangent are:

$\displaystyle \tan\left(\frac{x}{2}\right) = \frac{\sin(x)}{1 + \cos(x)} = \frac{1-\cos(x)}{\sin(x)}.$

If we set

$\displaystyle t = \tan\left(\frac{x}{2}\right),$

then

 $\displaystyle \sin(x) = \frac{2t}{1 + t^2}$ and $\displaystyle \cos(x) = \frac{1 - t^2}{1 + t^2}$ and $\displaystyle e^{i x} = \frac{1 + i t}{1 - i t}.$

This substitution of t for tan(x/2), with the consequent replacement of sin(x) by 2t/(1 + t2) and cos(x) by (1 − t2)/(1 + t2) is useful in calculus for converting rational functions in sin(x) and cos(x) to functions of t in order to find their antiderivatives. For more information see tangent half-angle formula.

## Product-to-sum identities

These can be proven by expanding their right-hand sides using the angle addition theorems.

$\displaystyle \cos\left (x\right ) \cos\left (y\right ) = {\cos\left (x + y\right ) + \cos\left (x - y\right ) \over 2} \;$
$\displaystyle \sin\left (x\right ) \sin\left (y\right ) = {\cos\left (x - y\right ) - \cos\left (x + y\right ) \over 2} \;$
$\displaystyle \sin\left (x\right ) \cos\left (y\right ) = {\sin\left (x - y\right ) + \sin\left (x + y\right ) \over 2} \;$

## Sum-to-product identities

Replace x by (x + y) / 2 and y by (xy) / 2 in the product-to-sum formulas.

$\displaystyle \cos(x) + \cos(y) = 2 \cos\left( \frac{x + y}{2} \right) \cos\left( \frac{x - y}{2} \right) \;$
$\displaystyle \sin(x) + \sin(y) = 2 \sin\left( \frac{x + y}{2} \right) \cos\left( \frac{x - y}{2} \right) \;$
$\displaystyle \cos(x) - \cos(y) = -2 \sin\left( {x + y \over 2}\right) \sin\left({x - y \over 2}\right) \;$
$\displaystyle \sin(x) - \sin(y) = 2 \cos\left({x + y\over 2}\right) \sin\left({x - y\over 2}\right) \;$

## Inverse trigonometric functions

$\displaystyle \arcsin(x)+\arccos(x)=\pi/2\;$
$\displaystyle \arctan(x)+\arccot(x)=\pi/2.\;$
$\displaystyle \arctan(x)+\arctan(1/x)=\left\{\begin{matrix} \pi/2, & \mbox{if }x > 0 \\ -\pi/2, & \mbox{if }x < 0 \end{matrix}\right..$
$\displaystyle \arctan(x)+\arctan(y)=\arctan\left(\frac{x+y}{1-xy}\right) \;$
$\displaystyle \arctan(x)-\arctan(y)=\arctan\left(\frac{x-y}{1+xy}\right) \;$
$\displaystyle \sin(\arccos(x))=\sqrt{1-x^2} \,$
$\displaystyle \cos(\arcsin(x))=\sqrt{1-x^2} \,$
$\displaystyle \sin(\arctan(x))=\frac{x}{\sqrt{1+x^2}}$
$\displaystyle \cos(\arctan(x))=\frac{1}{\sqrt{1+x^2}}$
$\displaystyle \tan(\arcsin (x))=\frac{x}{\sqrt{1 - x^2}}$
$\displaystyle \tan(\arccos (x))=\frac{\sqrt{1 - x^2}}{x}$

Every trigonometric function can be related directly to every other trigonometric function. Such relations can be expressed by means of inverse trigonometric functions as follows: let φ and ψ represent a pair of trigonometric functions, and let arcψ be the inverse of ψ, such that ψ(arcψ(x))=x. Then φ(arcψ(x)) can be expressed as an algebraic formula in terms of x. Such formulas are shown in the table below: φ can be made equal to the head of one of the rows, and ψ can be equated to the head of a column:

 sin cos tan csc sec cot φ / ψ sin cos tan csc sec cot $\displaystyle x\$ $\displaystyle \sqrt{1 - x^2}$ $\displaystyle {x \over \sqrt{1 + x^2}}$ $\displaystyle {1 \over x}$ $\displaystyle {\sqrt{x^2 - 1} \over x}$ $\displaystyle {1 \over \sqrt{1 + x^2}}$ $\displaystyle \sqrt{1 - x^2}$ $\displaystyle x\$ $\displaystyle {1 \over \sqrt{1 + x^2}}$ $\displaystyle {\sqrt{x^2 - 1} \over x}$ $\displaystyle {1 \over x}$ $\displaystyle {x \over \sqrt{1 + x^2}}$ $\displaystyle {x \over \sqrt{1 - x^2}}$ $\displaystyle {\sqrt{1 - x^2} \over x}$ $\displaystyle x\$ $\displaystyle {1 \over \sqrt{x^2 - 1}}$ $\displaystyle \sqrt{x^2 - 1}$ $\displaystyle {1 \over x}$ $\displaystyle {1 \over x}$ $\displaystyle {1 \over \sqrt{1 - x^2}}$ $\displaystyle {\sqrt{1 + x^2} \over x}$ $\displaystyle x\$ $\displaystyle {x \over \sqrt{x^2 - 1}}$ $\displaystyle \sqrt{1 + x^2}$ $\displaystyle {1 \over \sqrt{1 - x^2}}$ $\displaystyle {1 \over x}$ $\displaystyle \sqrt{1 + x^2}$ $\displaystyle {x \over \sqrt{x^2 - 1}}$ $\displaystyle x\$ $\displaystyle {\sqrt{1 + x^2} \over x}$ $\displaystyle {\sqrt{1 - x^2} \over x}$ $\displaystyle {x \over \sqrt{1 - x^2}}$ $\displaystyle {1 \over x}$ $\displaystyle \sqrt{x^2 - 1}$ $\displaystyle {1 \over \sqrt{x^2 - 1}}$ $\displaystyle x\$

One procedure that can be used to obtain the elements of this table is as follows:
Given trigonometric functions φ and ψ, what is φ(arcψ(x)) equal to?

1. Find an equation that relates φ(u) and ψ(u) to each other:
$\displaystyle f(\varphi(u), \psi(u)) = 0 \$
2. Let u = arc ψ(x), so that:
$\displaystyle f(\varphi({\rm arc}\psi(x)),\psi({\rm arc}\psi(x)) = 0 \$
$\displaystyle f(\varphi({\rm arc}\psi(x)),x) = 0 \$
3. Solve the last equation for φ(arcψ(x)).

Example. What is cot(arccsc(x)) equal to? First, find an equation which relations the functions cot and csc to each other, such as

$\displaystyle \cot^2 u + 1 = \csc^2 u \$ .

Second, let u = arccsc(x):

$\displaystyle \cot^2(\arccsc(x)) + 1 = \csc^2(\arccsc(x)) \$ ,
$\displaystyle \cot^2(\arccsc(x)) + 1 = x^2 \$ .

Third, solve this equation for cot(arccsc(x)):

$\displaystyle \cot^2(\arccsc(x)) = x^2 - 1, \$
$\displaystyle \cot(\arccsc(x)) = \pm\sqrt{x^2 - 1},$

and this is the formula which shows up in the sixth row and fourth column of the table.

## Exponential forms

$\displaystyle \cos(x) = \frac{e^{ix} + e^{-ix}}{2} \;$
$\displaystyle \sin(x) = \frac{e^{ix} - e^{-ix}}{2i} \;$

where $\displaystyle i^{2}=-1.\,$

## Infinite product formulas

For applications to special functions, the following infinite product formulas for trigonometric functions are useful:

$\displaystyle \sin x = x \prod_{n = 1}^\infty\left(1 - \frac{x^2}{\pi^2 n^2}\right)$
$\displaystyle \sinh x = x \prod_{n = 1}^\infty\left(1 + \frac{x^2}{\pi^2 n^2}\right)$
$\displaystyle \cos x = \prod_{n = 1}^\infty\left(1 - \frac{x^2}{\pi^2(n - \frac{1}{2})^2}\right)$
$\displaystyle \cosh x = \prod_{n = 1}^\infty\left(1 + \frac{x^2}{\pi^2(n - \frac{1}{2})^2}\right)$
$\displaystyle \frac{\sin x}{x} = \prod_{n = 1}^\infty\cos\left(\frac{x}{2^n}\right)$

## The Gudermannian function

The Gudermannian function relates the circular and hyperbolic trigonometric functions without resorting to complex numbers; see that article for details.

## Identities without variables

Richard Feynman is reputed to have learned as a boy, and always remembered, the following curious identity:

$\displaystyle \cos 20^\circ\cdot\cos 40^\circ\cdot\cos 80^\circ=\frac{1}{8}.$

However, this is a special case of an identity that contains one variable:

$\displaystyle \prod_{j=0}^{k-1}\cos(2^j x)=\frac{\sin(2^k x)}{2^k\sin(x)}.$

The following is perhaps not as readily generalized to an identity containing variables:

$\displaystyle \cos 24^\circ+\cos 48^\circ+\cos 96^\circ+\cos 168^\circ=\frac{1}{2}$ .

Degree measure ceases to be more felicitous than radian measure when we consider this identity with 21 in the denominators:

$\displaystyle \cos\left( \frac{2\pi}{21}\right) \,+\, \cos\left(2\cdot\frac{2\pi}{21}\right) \,+\, \cos\left(4\cdot\frac{2\pi}{21}\right)$
$\displaystyle \,+\, \cos\left( 5\cdot\frac{2\pi}{21}\right) \,+\, \cos\left( 8\cdot\frac{2\pi}{21}\right) \,+\, \cos\left(10\cdot\frac{2\pi}{21}\right)=\frac{1}{2}.$

The factors 1, 2, 4, 5, 8, 10 may start to make the pattern clear: they are those integers less than 21/2 that have no prime factors in common with 21. The last several examples are corollaries of a basic fact about the irreducible cyclotomic polynomials: the cosines are the real parts of the zeroes of those polynomials; the sum of the zeroes is the Möbius function evaluated at (in the very last case above) 21; only half of the zeroes are present above. The two identities preceding this last one arise in the same fashion with 21 replaced by 10 and 15, respectively.

An efficient way to compute π is based on the following identity without variables, due to Machin:

$\displaystyle \frac{\pi}{4} = 4 \arctan\frac{1}{5} - \arctan\frac{1}{239}$

or, alternatively, by using Euler's formula:

$\displaystyle \frac{\pi}{4} = 5 \arctan\frac{1}{7} + 2 \arctan\frac{3}{79}.$

Under this heading, there are also "special values" of trigonometric functions, including the ones that every student of trigonometry learns:

$\displaystyle \begin{matrix} \sin 0 & = & \sin 0^\circ & = & 0 & = & \cos 90^\circ & = & \cos \left( \frac {\pi} {2} \right) \\ \\ \sin \left( \frac {\pi} {6} \right) & = & \sin 30^\circ & = & 1/2 & = & \cos 60^\circ & = & \cos \left( \frac {\pi} {3} \right) \\ \\ \sin \left( \frac {\pi} {4} \right) & = & \sin 45^\circ & = & \sqrt{2}/2 & = & \cos 45^\circ & = & \cos \left( \frac {\pi} {4} \right) \\ \\ \sin \left( \frac {\pi} {3} \right) & = & \sin 60^\circ & = & \sqrt{3}/2 & = & \cos 30^\circ & = & \cos \left( \frac {\pi} {6} \right) \\ \\ \sin \left( \frac {\pi} {2} \right) & = & \sin 90^\circ & = & 1 & = & \cos 0^\circ & = & \cos 0 \end{matrix}$
$\displaystyle \sin{\frac{\pi}{7}}=\frac{\sqrt{7}}{6}- \frac{\sqrt{7}}{189} \sum_{j=0}^{\infty} \frac{(3j+1)!}{189^j j!\,(2j+2)!} \!$
$\displaystyle \sin{\frac{\pi}{18}}= \frac{1}{6} \sum_{j=0}^{\infty} \frac{(3j)!}{27^j j!\,(2j+1)!} \!$

With the golden ratio φ:

$\displaystyle \cos \left( \frac {\pi} {5} \right) = \cos 36^\circ={\sqrt{5}+1 \over 4} = \phi /2$
$\displaystyle \sin \left( \frac {\pi} {10} \right) = \sin 18^\circ = {\sqrt{5}-1 \over 4} = {\varphi - 1 \over 2} = {1 \over 2\varphi}$

## Calculus

In calculus the relations stated below require angles to be measured in radians; the relations would become more complicated if angles were measured in another unit such as degrees. If the trigonometric functions are defined in terms of geometry, then their derivatives can be found by verifying two limits. The first is:

$\displaystyle \lim_{x\rightarrow 0}\frac{\sin(x)}{x}=1,$

verified using the unit circle and squeeze theorem. It may be tempting to propose to use L'Hôpital's rule to establish this limit. However, if one uses this limit in order to prove that the derivative of the sine is the cosine, and then uses the fact that the derivative of the sine is the cosine in applying L'Hôpital's rule, one is reasoning circularly—a logical fallacy. The second limit is:

$\displaystyle \lim_{x\rightarrow 0}\frac{1-\cos(x)}{x}=0,$

verified using the identity tan(x/2) = (1 − cos(x))/sin(x). Having established these two limits, one can use the limit definition of the derivative and the addition theorems to show that sin′(x) = cos(x) and cos′(x) = −sin(x). If the sine and cosine functions are defined by their Taylor series, then the derivatives can be found by differentiating the power series term-by-term.

$\displaystyle {d \over dx}\sin(x) = \cos(x)$

The rest of the trigonometric functions can be differentiated using the above identities and the rules of differentiation. We have:

$\displaystyle {d \over dx}\cos(x) = -\sin(x)$
$\displaystyle {d \over dx}\tan(x) = \sec^2(x)$
$\displaystyle {d \over dx}\cot(x) = -\csc^2(x)$
$\displaystyle {d \over dx}\sec(x) = \sec(x) \tan(x)$
$\displaystyle {d \over dx}\csc(x) = - \csc(x)\cot(x)$
$\displaystyle {d \over dx}\arcsin(x)=\frac{1}{\sqrt{1-x^2}}$
$\displaystyle {d \over dx}\arctan(x)=\frac{1}{1+x^2}$

The integral identities can be found in Wikipedia's table of integrals.

## Geometric proofs

### sin(x + y) = sin(x) cos(y) + cos(x) sin(y)

File:Sinesum.gif

In the figure the angle x is part of right angled triangle ABC, and the angle y part of right angled triangle ACD. Then construct DG perpendicular to AB and construct CE parallel to AB.

Angle x = Angle BAC = Angle ACE = Angle CDE.

EG = BC.

$\displaystyle \sin(x + y) \,$
$\displaystyle = \frac {DG} {AD} \,$
$\displaystyle = \frac {(EG + DE)} {AD} \,$
$\displaystyle = \frac {(BC + DE)} {AD} \,$
$\displaystyle = \frac {BC} {AD} + \frac {DE} {AD} \,$
$\displaystyle = \frac{BC}{AD} \cdot \frac{AC}{AC} + \frac{DE}{AD} \cdot \frac{CD}{CD} \,$
$\displaystyle = \frac{BC}{AC} \cdot \frac{AC}{AD} + \frac{DE}{CD} \cdot \frac{CD}{AD} \,$
$\displaystyle = \sin( x ) \cos( y ) + \cos( x ) \sin( y ). \,$

### cos(x + y) = cos(x) cos(y) − sin(x) sin(y)

Using the above figure:

$\displaystyle \cos(x + y) \,$
$\displaystyle = \frac {AG} {AD} \,$
$\displaystyle = \frac {(AB - GB)} {AD} \,$
$\displaystyle = \frac {(AB - EC)} {AD} \,$
$\displaystyle = \frac {AB} {AD} - \frac {EC} {AD} \,$
$\displaystyle = \frac{AB}{AD} \cdot \frac{AC}{AC} - \frac{EC}{AD} \cdot \frac{CD}{CD} \,$
$\displaystyle = \frac{AB}{AC} \cdot \frac{AC}{AD} - \frac{EC}{CD} \cdot \frac{CD}{AD} \,$
$\displaystyle = \cos( x ) \cos( y ) - \sin( x ) \sin( y ) \,$ .