Sunday 25 January 2015

trigonometry - How to calculate the sine cosine or tangent of an angle(Simply Explained)



I wanted to know how a calculator finds the sine Or any other trig function with only knowing the value of the angle.
I have been looking on the internet for answers because i was really interested in how Archimedes found out what the value of pi is.
Then that led me to calculating the sides of right triangles but i wanted to know since Archimedes didn't have a calculator how did he find the length of the opposite side on the triangle. I searched a lot of pages but they were all so complex(i'm in middle school)to me. So basically can anyone simplify the way you(or Archimedes) can find the length of the opposite side of a right triangle?




Sorry, if this is a broad/vague question in any way or if i have made any mistakes.
This is my first time asking a question online



I thank you in advance for anyone who can help!


Answer



I think there are really two questions here:




  1. How did Archimedes find the length of the side of a right triangle opposite to a specified angle?


  2. How does a calculator evaluate trig functions?



For #1: Honestly, I think he just drew it and measured it. This then leads to the question, "How did they measure length in general?" and maybe that's actually what you were asking. Measurements of length were often based on body parts back in those days. See here for more information, including other techniques/devices.



For #2: A thorough answer is pretty technical and advanced so I'll try to simplify as much as I can.



As stated in another answer, calculators use Taylor series to evaluate trig functions. Basically a Taylor series is a way of expressing a function in terms of the four basic operations of addition, subtraction, multiplication, and division.



Every computer and every (electrically powered) calculator has a central processing unit, called a CPU for short. The CPU is made up of a bunch of tiny wires that carry electric current. When we give the computer or calculator commands (like opening or saving a file, or pressing buttons on the keyboard or calculator), the electricity gets routed through the wires in a way that makes those commands actually happen.




The most basic operations we can do with this electrical routing are addition and subtraction. Multiplication and division must be done with appropriate combinations of addition and subtraction. To put it another way, we can do addition and subtraction with basically one electrical route. But anything more complicated will require more than just one route. For example, when you tell your calculator to do $4 + 5$, it requires just one route to do it. But if you tell your calculator to do $4 \times 5$, the electricity running through the wires is really doing $4 + 4 + 4 + 4 + 4$, which takes four routes (one for each addition, and we have four additions there).



The same thing is true of more complicated operations and functions. They also require more than one electrical route, where each electrical route is basically an addition or subtraction. This is where the Taylor series helps us. The Taylor series tells us how to evaluate these functions using addition, subtraction, multiplication, and division. And remember that multiplication and division are themselves "defined" (in the electrical wiring in the CPU) in terms of addition and subtraction. So when you tell your calculator to evaluate the sine of some number, the electricity gets routed through the wires so that it actually calculates the expression given by the Taylor series.



Note that the Taylor series is an infinite series, which is of course impossible for a CPU to evaluate exactly in general, but calculators and computers have a fixed number of digits they can display anyway. Therefore it's enough to just use the first few terms of the Taylor series.



This sweeps a lot of details under the rug but I hope it clarifies things at least a little bit. If you want more info, Coursera is currently running a really good course on this. It's free. There's also one on EdX but I think it's a bit more advanced. I studied this stuff in school 12 years ago and I'm currently using both of these as refreshers before moving on to more advanced studies. The Coursera course has been really helpful for the basics, so I definitely recommend at least looking at that one.



Good luck and keep the intellectual curiosity going!



No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...