Question: In an example I had to prove that $\sin^2(x)+\cos^2(x)=1$ which is fairly easy using the unit circle. My teacher then asked me to show the same thing using the following power series:$$\sin(x)=\sum\_{k=0}^\infty\frac{(-1)^kx^{2k+1}}{(2k+1)!}$$ and $$\cos(x)=\sum\_{k=0}^\infty\frac{(-1)^kx^{2k}}{(2k)!}$$
However, if I now take the squares of these values I get a really messy result that I can't simplify to 1. 

Could anyone give me a hint on how to deal with this question?

Answer: 
There is an easy solution using complex numbers (but not the complex exponential):
$$
\begin{align}
\sin^2 x + \cos^2 x & = \left(\cos x + i \sin x\right)\left(\cos x - i \sin x\right) \\
&=\left(\sum\_{j=0}^{\infty} (-1)^j \frac{x^{2j}}{(2j)!} + i \sum\_{j=0}^{\infty} (-1)^j \frac{x^{2j+1}}{(2j+1)!}\right)\left(\sum\_{j=0}^{\infty} (-1)^j \frac{x^{2j}}{(2j)!} - i \sum\_{j=0}^{\infty} (-1)^j \frac{x^{2j+1}}{(2j+1)!}\right)\\
&=\left(\sum\_{k=0}^{\infty} i^k \frac{x^{k}}{k!}\right) \cdot \left(\sum\_{k=0}^{\infty} (-i)^k \frac{x^{k}}{k!}\right). \\
\end{align}
$$
(Of course these last two factors are equal to $e^{ix}$ and $e^{-ix}$, but we do not need this fact: we are just manipulating power series here.) We need to show that the above product is $1$, so that the coefficient of $x^\ell$ in the above product is $1$ if $\ell=0$ and $0$ otherwise.

Expanding the product, we get that the coefficient of $x^\ell$ equals
$$
\sum\_{k\_1+k\_2=\ell} \frac{i^{k\_1}}{k\_1!} \cdot \frac{(-i)^{k\_2}}{k\_2!}=\sum\_{k\_1+k\_2=\ell} (-1)^{k\_2} \frac{i^{\ell}}{k\_1!k\_2!} = \sum\_{k\_1=0}^\ell (-1)^{\ell-k\_1}\frac{i^{\ell}}{\ell!} \binom{\ell}{k\_1}.
$$
In view of the well-known binomial coefficient identity $\sum\_{k=0}^{\ell} (-1)^k \binom{\ell}{k}=0$ for any integer $\ell>0$, which may be obtained by expanding the identity $(1-1)^{\ell}=0$, the above sum vanishes when $\ell>0$, and when $\ell=0$ it equals $1$, as can be computed directly. Which is precisely what we had to show.
Define $f: \mathbb{R} \rightarrow \mathbb{R}$ by
$$
f(x) = \text{sin}^2(x) + \text{cos}^2(x).
$$
From the chain rule it follows that
$$
f'(x) = 2\cdot \text{sin}(x) \cdot \text{sin'}(x) + 2\cdot \text{cos}(x) \cdot \text{cos'}(x) = 2\cdot \text{sin}(x) \cdot \text{cos}(x) + 2\cdot \text{cos}(x) \cdot (-\text{sin}(x)) = 0, 
$$
as we know that $\text{sin'}(x) = \text{cos}(x)$ and $\text{cos'}(x) = -\text{sin}(x)$.
We will now show that if the derivative equals zero, the function is constant, using the Mean-value theorem.
Let $a,b\in \mathbb{R}$, with $a<b$. As $f$ is differentiable, and hence also continuous, on $\mathbb{R}$, we know there exists a $c\in (a,b)$ satisfying
$$
f'(c) = \frac{f(b)-f(a)}{b-a}.
$$
As we know that $f'(c) = 0$ for all $c \in \mathbb{R}$, multiplying both sides of the equation by $b-a$ yields $f(b)-f(a)=0$. Equivalently, $f(b) = f(a)$ for all $a,b\in \mathbb{R}$, where $a<b$. Hence $f$ is constant on $(a,b)$.
Note that
$$f(0)= \text{sin}^2(0) + \text{cos}^2(0) = 
( \sum\_{k=0}^\infty (-1)^k \cdot \frac{1}{(2k+1)!} 0^{2k+1} )^2 +
( \sum\_{k=0}^\infty (-1)^k \cdot \frac{1}{(2k)!} 0^{2k} )^2 = 0 + 1 = 1,
$$
as only the first term of the cosine power series yields a nonzero value, namely 1 ($(-1)^0 \cdot \frac{1}{(0)!}0^0=1$, since $(-1)^0=1$, $0!=1$ and $0^0=1$).

In conclusion, for all $x \in \mathbb{R}$, $f(x)=1$, so that
$$
\sin ^{2}(x)+\cos ^{2}(x)=1.
$$