<s>[INST] Why do we use this complicated algorithm for finding values of trigonometric functions? My Mathematics Textbook covers the topic of Values of Trigonometric Functions at Allied Angles using some general formulae first and then goes on to the topic of finding the values of trigonometric functions at allied angles using an algorithm.

The cases discussed in finding the values using some general formulae are :

* At $(-x)$

* At $\Big (\dfrac{\pi}{2} \pm x \Big )$

* At $(\pi \pm x)$

* At $\Big ( \dfrac {3\pi}{2} \pm x \Big )$

* At $(2\pi \pm x)$ which can also be written as $(\pm $ $x)$

The algorithm is as follows :

* Let the angle be $x$

* If $x<0$ and $x = (-a)$, continue with the further steps as $a$ in place of $x$ and when the final result arrives : if $f$ is an even function, then $f(x) = f(-x)$, so $f(x) = f(a)$ and if $f$ is an odd function, $f(-x) = -f(x)$, so $f(x) = -f(-x) = -f(a)$

* Express $x$ (or $a$) in the form of $\dfrac {n\pi}{2} \pm \alpha$, where $0<\alpha<\dfrac{\pi}{2}$ or $\alpha \in \Big (0, \dfrac {\pi}{2} \Big )$

* If $n$ is odd, then $\sin x = \pm \cos \alpha$, $\cos x = \pm \sin \alpha$, $\tan x = \pm \cot \alpha$, $\cot x = \pm \tan \alpha$, $\sec x = \pm \csc \alpha$ and $\csc x = \pm \sec \alpha$

* If $n$ is even, then $\sin x = \pm \sin \alpha$, $\cos x = \pm \cos \alpha$, $\tan x = \pm \tan \alpha$, $\cot x = \pm \cot \alpha$, $\sec x = \pm \sec \alpha$ and $\csc x = \pm \csc \alpha$

* Determine the quadrant that $x$ lies in and then decide the sign of the value

Let's take an example : Find the value of $\sin \dfrac{7\pi}{4}$.

One method to do this will be using the first method.

$\sin \dfrac{7\pi}{4} = \sin \Big (2\pi - \dfrac{\pi}{4} \Big )$

We know that $\sin (2\pi-x)=(-\sin x)$. So, $\sin \Big (2\pi - \dfrac{\pi}{4} \Big ) = \Big ( -\sin \dfrac {\pi}{4} \Big ) = -\dfrac {1}{\sqrt{2}}$

Another method would be to use the algorithm

$\dfrac{7\pi}{4}=\dfrac{3\pi}{2}+\dfrac{\pi}{4}$, so $\dfrac {3\pi}{2} < \dfrac{7\pi}{4} < 2\pi$ and $\dfrac{7\pi}{4}$ lies in the $IV$ quadrant, which means that $\sin \dfrac{7\pi}{4} < 0$
Now, $\dfrac{7\pi}{4} = \dfrac {3.\pi}{2} + \dfrac{\pi}{4}$. $3$ is odd, so $\sin \dfrac{7\pi}{4} = -\sin \dfrac {\pi}{4} = -\dfrac{1}{\sqrt{2}}$

Now, this algorithm seems like something extremely complex for solving simple questions like these. So, why do we use this algorithm when we can just use the simple formulae that help us find the values of trigonometric functions at allied angles? Are there some advantageous applications of this algorithm?
I feel like it's just a generalization for all the cases that appear in the case of allied angles, just like the lens formula is a generalization of all the cases of image formation through lenses.
Thanks!

EDIT : Also, when should I use which method?
 [/INST] What, precisely, are these "simple formulae" that you are referring to?
The algorithm here essentially breaks down all the periodicity, symmetry, and reflection-type changes you can do to the angle (some change the value in simple ways).
The point is to normalize the angle you're working with, ultimately, to the first octant $0\leq\theta\leq\frac{\pi}{2}$, so that you can use one table of special values.
</s>