How to make use of angle sum and difference identities to find the value of sine and cosine? 
Calculate: $\cos\left({5\pi\over12}\right)$ and $\cos\left({\pi\over12}\right)$

What is the easiest way to find $\cos\left({5\pi\over12}\right)$ and $\cos\left({\pi\over12}\right)$ (without a calculator)? If I know that $\frac{5\pi }{12}=\frac{\pi }{4}+\frac{\pi }{6}$ and $\frac{\pi }{12}=\frac{\pi }{3}-\frac{\pi }{4}$, then I can apply angle sum and difference identities. But how do I know $\frac{5\pi }{12}= \frac{\pi }{4}+\frac{\pi }{6}$ and $\frac{\pi }{12}= \frac{\pi }{3}-\frac{\pi }{4}$ in the first place. I know $ \frac{\pi }{4}+\frac{\pi }{6} = \frac{5\pi }{12}$ and $ \frac{\pi }{3}-\frac{\pi }{4}=\frac{\pi }{12}$ but I can't go the other way round.
I gave $\frac{5\pi}{12}$ and $\frac{\pi}{12}$ as an example, I want the general solution for any value in pi rational form $\frac{\pi p}{q}$.
 A: 1 equation and 2 unknows is, generally, an overdetermined system.
In this case, pick any solution for $\dfrac{5\pi}{12} = \dfrac{p_1\pi}{q_1} + \dfrac{p_2\pi}{q_2}$, and sum $\pm \dfrac{p_3\pi}{q_3}$ in a smart way
$$\dfrac{5\pi}{12} = \left( \dfrac{p_1\pi}{q_1} +  \dfrac{p_3\pi}{q_3} \right) + \left( \dfrac{p_2\pi}{q_2} -  \dfrac{p_3\pi}{q_3} \right)$$
$$\dfrac{5\pi}{12} = \dfrac{\pi}{6} + \dfrac{\pi}{4} = \dfrac{\pi}{3} + \dfrac{\pi}{12} = \dfrac{3\pi}{10} + \dfrac{7\pi}{60} = \dots $$
A: We want to find the values of $\displaystyle\cos\frac{5\pi}{12}$ and $\displaystyle\cos\frac{\pi}{12}$.
Recall the sum to product formulae below:
$$\begin{align}\cos A+\cos B&=2\cos\frac{A+B}{2}\cos\frac{A-B}{2}\\
\cos A-\cos B&=-2\sin\frac{A+B}{2}\sin\frac{A-B}{2}\\\end{align}.$$
In our case, let $A=5\pi/12$ and $B=\pi/12$. Then we find that
$$\begin{align}\cos\frac{5\pi}{12}+\cos\frac{\pi}{12}&=2\cos\frac{\frac{5\pi}{12}+\frac{\pi}{12}}{2}\cos\frac{\frac{5\pi}{12}-\frac{\pi}{12}}{2}=2\cos\frac{\pi}{4}\cos\frac{\pi}{6}\\
&=\frac{\sqrt6}{2}\tag{1}\\
\cos\frac{5\pi}{12}-\cos\frac{\pi}{12}&=-2\sin\frac{\frac{5\pi}{12}+\frac{\pi}{12}}{2}\sin\frac{\frac{5\pi}{12}-\frac{\pi}{12}}{2}=-2\sin\frac{\pi}{4}\sin\frac{\pi}{6}\\
&=-\frac{\sqrt2}{2}\tag{2}.\end{align}$$
Adding equations $(1)$ and $(2)$ together and dividing by $2$, we find that
$$\cos\frac{5\pi}{12}=\frac{\sqrt6-\sqrt2}{4}$$
and subtracting equation $(2)$ from equation $(1)$ and dividing by $2$ gives
$$\cos\frac{\pi}{12}=\frac{\sqrt6+\sqrt2}{4}.$$

However, this method is not always guaranteed to work, for the simple reason that $\cos x\pi$ does not always have a closed form for  rational $x$.

I hope that helps. If you have any questions please don't hesitate to ask :)
A: We know that
$$\begin{align}
\cos{\pi\over 4}&=\sin{\pi\over 4}={\sqrt{2}\over 2}\\
\cos{\pi\over 6}&=\sin{\pi\over 3}={\sqrt{3}\over 2}\\
\cos{\pi\over 3}&=\sin{\pi\over 6}={1\over 2}\\
\cos(x+y)&=\cos{x}\cos{y}-\sin{x}\sin{y}\\
\cos(x-y)&=\cos{x}\cos{y}+\sin{x}\sin{y}\\
\sin(x+y)&=\sin{x}\cos{y}+\cos{x}\sin{y}\\
\cos(x-y)&=\sin{x}\cos{y}-\cos{x}\sin{y}\\
\end{align}$$
With the above you should be done.
A: After practicing a lot of problems in trigonometry, I realized that I need to know the values of sine and cosine only at $\{ \pi/6, \pi/4, \pi/3\}$, and the double angle, half angle and sum and difference identities. @marwalix et al. answered the same.
By applying the double angle formula (i.e. $\sin \left( 2\theta \right) =2\sin \theta \cos \theta$), I found the value of $\{\pi/5, 2\pi/5\}$:
$$\dfrac{\pi }{5}=2\cdot \dfrac{\pi }{10}$$
$$\dfrac{2\pi }{5}=2\cdot \dfrac{\pi }{5}$$
By applying the half angle formula (i.e. $\sin \dfrac{\theta }{2}=\sqrt{\dfrac{1-\cos \theta }{2}}$, $\cos \dfrac{\theta }{2}=\sqrt{\dfrac{1+\cos \theta }{2}}$), I found the value of $\{ \pi/12, \pi/8\}$:
$$\dfrac{\pi }{12}=\dfrac{1}{2}\cdot \dfrac{\pi }{6}$$
$$\dfrac{\pi }{8}=\dfrac{1}{2}\cdot \dfrac{\pi }{4}$$
And finally, by applying $\sin(\alpha \pm \beta) = \sin \alpha \cos \beta \pm \cos \alpha \sin \beta$, and $\cos(\alpha \pm \beta) = \cos \alpha \cos \beta \mp \sin \alpha \sin \beta$, I found the value of $\{ \pi/12, 3\pi/10, 3\pi/8, 5\pi/12\}$:
$$\dfrac{\pi }{12}=\dfrac{\pi }{3}-\dfrac{\pi }{4}=\dfrac{\pi }{4}-\dfrac{\pi }{6}$$
$$\dfrac{3\pi }{10}= \dfrac{\pi }{10}+\dfrac{\pi }{5}=\dfrac{2\pi }{5}-\dfrac{\pi }{10}$$
$$\dfrac{3\pi }{8}=\dfrac{\pi }{4}+\dfrac{\pi }{8}, \dfrac{5\pi }{12}=\dfrac{\pi }{4}+\dfrac{\pi }{6}$$
The values that I found at $\{0, \pi/12, \pi/10, \pi/6, \pi/5, \pi/4, 3\pi/10, \pi/3, 3\pi/8, 2\pi/5, 5\pi/12, \pi/10\}$ are as follows:

