Monday, 11 March 2019

Easy maths: Sin and Cosine

Hello there!

Today's blog is about maths, more specifically - the rather interesting side of it and what I have learned. Keep in mind that I am not an expert in the subject, so any kind of criticism is more than welcome. With that being said, let's get into the maths.

Preface

Sin and Cosine are the concepts you may have first heard when you were being taught how to find a certain side/angle of a triangle. The phrase "SOHCAHTOA" often tends to pop up, and a lot of the questions you were given you just had to use this formula to answer them. As well as explaining what this phrase means, I'll also explain why you use this to find sides ,something your maths teacher probably never explained.

Relations with the Axis

Sine = X and Cosine = Y. I've pretty much told you the answer right there. So, next section....
Actually, I jest.
Look at the triangle below:
It has the hypotenuse, adjacent and opposite side labeled for your convenience, so you don't need to crack open your maths book.

If we want to find, for example the adjacent, we will need to use SOH (Sine, Opposite and Hypotenuse). Why?  Because the adjacent is a horizontal line, and Sine is used for working them out (think: the X axis).
Now, we're not going to do a maths question, so don't panic. I'm just telling you a theoretical example. Anyway, Sine is the thing you would use to work out the horizontal parts of the triangle. As you can imagine you would need Cosine for the Vertical axis (or the opposite in this case), therefore you need to use CAH. I'm not going to talk about TOA because I'm not talking about Tangents in this blog, only Sine and Cosine. But hopefully I've made your maths homework a bit easier. Sin for finding out the horizontal side and Cosine for finding the vertical side.

Okay, at this point in time, you may wonder "Right, I know that Sine is used to work out the horizontal and Cosine for the vertical, but why? What is the relationship between these?"
I'll tell you in the next section.

Angles to Vectors

You may have also encountered angles at some point in your maths career, the things you use a protractor to measure or what you have to figure out in a triangle, on the opposite of the right angle, (using Sine and Cosine). I'll tell you why:
As you can see, in Desmos this is what Sine (Red) and Cosine (Blue) looks like in a graph. It produces quite a wavy pattern, which looks quite nice. This wavy pattern is far more than just a beautiful little pattern, it also shows how Sine and Cosine functions, in the graph, Cosine is a little bit more delayed than Sine in terms of reaching its top and bottom, but by how much exactly, and why?
If you look below at the two diagrams, the top point is 1 and the lowest is -1, the more interesting point is the horizontal point, which is half of PI (3.142...). If you multiply this by 57.672 (to convert radians to degrees), you get a number which is ~90. Sounding familiar?


If you quadruple 90 you get 360, which a full circle is 360 degrees (or 2 PI radians). The relation of this to Sine and Cosine is that the distance that they are apart is equivalent to a quarter of a circle. I'll demonstrate what I mean below:
Make sure the setting is in degrees rather than radians.

As shown, B is 90 and the point on the circle is where 90 degrees would be going, and the number '1' is shown again, much like the previous diagrams. The reason that Sine is used for horizontals and Cosine being used for Verticals is shown in the example, due to the aforementioned separation by half a PI. If we swapped Sine for Cosine, then the point would be on the top rather than the right side and that wouldn't look like 90 degrees. Since these two operate in a wavy pattern where the highest value of Sine and Cosine is 1 and the lowest is -1, they can be a useful way of converting angles into a unit Vector. I hope you are starting to see how Cosine and Sin can be used to be turned into vectors.

This is especially handy if you want to simulate rotations via having degrees rather than vectors. 

Conclusion

This is my first time explaining mathematics to you, and I feel a bit nervous doing so, since I don't really have much of a formal background in the subject beyond GCSE. But as I've stated before I welcome any form of criticism.
Sine and Cosine are quite useful things, probably more than you thought - it can be used for things like converting angles into vectors, rotating matrices (which I know the barebones of), items that bob up and down in Minecraft or even chiptune music (stuff you would hear on old game consoles like the Gameboy).

That's all from me!

No comments:

Post a Comment