# Trigonometric functions/R/Series/Introduction/Section
## Definition

For $x\in \mathbb {R}$, the series
    $\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n}}{(2n)!}}$
is called the cosine series, and the series
    $\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n+1}}{(2n+1)!}}$
$x$
By comparing with the exponential series we see that these series converge absolutely for every $x$. The corresponding functions
    $\cos x:=\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n}}{(2n)!}}{\text{ and }}\sin x:=\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n+1}}{(2n+1)!}}$
are called sine and cosine. Both functions are related to the exponential function, but we need the complex numbers to see this relation. The point is that one can also plug in complex numbers into power series (the convergence is then not on a real interval but on a disk). For the exponential series and $z={\mathrm {i} }x$ (where $x$ might be real or complex) we get
    ${\begin{aligned}\exp {\left({\mathrm {i} }x\right)}&=\sum _{k=0}^{\infty }{\frac {({\mathrm {i} }x)^{k}}{k!}}\\&=\sum _{k=0,\,k{\text{ even}}}^{\infty }{\frac {({\mathrm {i} }x)^{k}}{k!}}+\sum _{k=0,\,k{\text{ odd}}}^{\infty }{\frac {({\mathrm {i} }x)^{k}}{k!}}\\&=\sum _{n=0}^{\infty }{\frac {({\mathrm {i} }x)^{2n}}{(2n)!}}+\sum _{n=0}^{\infty }{\frac {({\mathrm {i} }x)^{2n+1}}{(2n+1)!}}\\&=\sum _{n=0}^{\infty }(-1)^{n}{\frac {x^{2n}}{(2n)!}}+{\mathrm {i} }(-1)^{n}\sum _{n=0}^{\infty }{\frac {(x)^{2n+1}}{(2n+1)!}}\\&=\cos x+{\mathrm {i} }\sin x.\end{aligned}}$
With this relation between the complex exponential function and the trigonometric functions (which is called Euler's formula), one can prove many properties quite easily. Special cases of this formula are
    $e^{\pi {\mathrm {i} }}=-1\,$
and
    $e^{2\pi {\mathrm {i} }}=1\,.$
Sine and cosine are continuous functions, due to fact. Further important properties are given in the following theorem.

## Theorem

The functions
    $\mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto \cos x,$
and
    $\mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto \sin x,$
have the following properties for
$x,y\in \mathbb {R}$
* We have $\cos 0=1$ and $\sin 0=0$.
* We have $\cos {\left(-x\right)}=\cos x$ and $\sin {\left(-x\right)}=-\sin x$.
* The addition theorems and hold.
    $\cos(x+y)=\cos x\cdot \cos y-\sin x\cdot \sin y\,$
    $\sin(x+y)=\sin x\cdot \cos y+\cos x\cdot \sin y\,$
* We have
    $(\cos x)^{2}+(\sin x)^{2}=1\,.$

### Proof

(1) and (2) follow directly from the definitions of the series. (3). The $2n$-th summand (the term which refers to the power with exponent $2n$) in the cosine series (the coefficients referring to $x^{i}$, $i$ odd, are $0$) of $x+y$ is
    ${\begin{aligned}{\frac {(-1)^{n}(x+y)^{2n}}{(2n)!}}&={\frac {(-1)^{n}}{(2n)!}}\sum _{i=0}^{2n}{\binom {2n}{i}}x^{i}y^{2n-i}\\&=(-1)^{n}\sum _{i=0}^{2n}{\frac {1}{i!(2n-i)!}}x^{i}y^{2n-i}\\&=(-1)^{n}\sum _{j=0}^{n}{\frac {x^{2j}y^{2n-2j}}{(2j)!(2n-2j)!}}+(-1)^{n}\sum _{j=0}^{n-1}{\frac {x^{2j+1}y^{2n-2j-1}}{(2j+1)!(2n-2j-1)!}},\end{aligned}}$
where in the last step we have split up the index set into even and odd numbers.
The $2n$-th summand in the Cauchy product of $\cos x$ and $\cos y$ is
    ${\begin{aligned}\sum _{j=0}^{n}{\frac {(-1)^{j}(-1)^{n-j}}{(2j)!(2(n-j))!}}x^{2j}y^{2(n-j)}&=(-1)^{n}\sum _{j=0}^{n}{\frac {x^{2j}y^{2(n-j)}}{(2j)!(2(n-j))!}}\\\end{aligned}}$
and the $2n$-th summand in the Cauchy product of $\sin x$ and $\sin y$ is
    ${\begin{aligned}\sum _{j=0}^{n-1}{\frac {(-1)^{j}(-1)^{n-1-j}}{(2j+1)!(2(n-1-j)+1)!}}x^{2j+1}y^{2(n-j)+1}&=(-1)^{n-1}\sum _{j=0}^{n-1}{\frac {x^{2j+1}y^{2(n-1-j)+1}}{(2j+1)!(2(n-1-j)+1)!}}\\\end{aligned}}$
Hence, both sides of the addition theorem coincide in the even case. For an odd index the left-hand side is $0$. Since in the cosine series only even exponents occur, it follows that in the Cauchy product of the two cosine series only exponents of the form $x^{i}y^{j}$ with $i,j$ even occur. Since in the sine series only odd exponents occur, it follows that in the Cauchy product of the two sine series only exponents of the form $x^{i}y^{j}$ with $i+j$ even occur. Therefore terms of the form $x^{i}y^{j}$ with $i+j$ odd occur neither on the left nor on the right-hand side. The addition theorem for sine is proved in a similar way. (4). From the addition theorem for cosine, applied to $y:=-x$, and because of (2), we get
    ${\begin{aligned}1&=\cos 0\\&=\cos {\left(x-x\right)}\\&=\cos x\cdot \cos {\left(-x\right)}-\sin x\cdot \sin {\left(-x\right)}\\&=\cos x\cdot \cos x+\sin x\cdot \sin x.\end{aligned}}$
$\Box$
The last statement in this theorem means that the pair $(\cos x,\sin x)$ is a point on the unit circle ${\left\{(u,v)\mid u^{2}+v^{2}=1\right\}}$. We will see later that every point of the unit circle might be written as $(\cos x,\sin x)$, where $x$ is an angle. Here, $2\pi$ encounters as a period length, where indeed we define $\pi$ via the trigonometric functions.