# 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?

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.

• "The algorithm here essentially breaks down all the periodicity, symmetry, and reflection-type changes [...]" Indeed. The "algorithm" is a bit of a crutch. Over time, as one becomes more familiar with the angle changes, the algorithm aspect gives way to a proper instinctive understanding of the trig functions. Incidentally, the question "How to remember a particular class of trig identities", and perhaps in particular my answer, may help with gaining familiarity.
– Blue
May 15, 2020 at 21:44
• Agreed - pedagogically this is quite inappropriate to be presented as a be-all/end-all. Focus should be on why each of these trig relations exist and what they do. On the flip side, if you're closer to CS and am looking to implement some sort of computer program to calculate these values, a spelled-out algorithm is the only thing that works. May 16, 2020 at 4:19
• The formulae I'm referring to are like : $\sin (\pi + x) = -\sin x$, cos $(\pi + x) = -\cos x$, $\sin (\pi - x) = \sin x$, $\cos (\pi - x) = -\cos x$, etc. May 16, 2020 at 7:16
• @RajdeepSindhu: "I'll get natural with it with time and practice, right?" That's the hope. ;) Eventually, you should be able to see $x+\pi$ and think "On the unit circle, that angle is obviously directly opposite the angle $x$, so its sine and cosine are obviously the respective opposites (ie, the negatives) of $\sin x$ and $\cos x$." For quarter-turns, the sines and cosines change places, and the signs get a little fiddly. (I personally still consult a mental image of my "windmill" figure to keep this stuff straight. :)
– Blue
May 16, 2020 at 7:46
• Surprisingly, I already construct the windmill figure and it felt great to know that a lot of other people do that too. Visualizations are important. Thanks, again! May 16, 2020 at 9:02