How to evaluate $\cos{\frac{\pi}{8}}$? I have to evaluate
$\cos{\frac{\pi}{8}}$
and I'm supposed to do so evaluating first 
$\cos^2{\frac{\pi}{8}}$
(since it's an exercise to practice half-angle formulas). Solving this second formula I get to
$\cos^2{\frac{\pi}{8}} = \frac{1}{2} + \frac{1}{2\sqrt[]{2}}$
where I'm stuck. I'm not sure it is an useful evaluation and, worst of all, I don't think that could help me solving 
$\cos{\frac{\pi}{8}}$.
I don't know how to get to 
$\frac{\sqrt[]{2 + \sqrt[]{2}}}{2}$, which is given as the proper answer. Could anyone explain it to me?
Thank you very much in advance.

$$\cos2\theta = 2\cos^2\theta -1$$
Put $\theta = \frac{\pi}{4}$,
$$\frac{1}{\sqrt{2}} = 2\cos^2\frac{\pi}{8} - 1$$
$$\cos^2\frac{\pi}{8} = \frac{\sqrt{2}+1}{2\sqrt{2}} = \frac{2 + \sqrt{2}}{4}$$
$$\implies \cos\frac{\pi}{8} = \frac{\sqrt{2 + \sqrt{2}}}{2}$$
