Skip to main content
GameDev.net gamedev.net
🔒 Locked

How to find sin, cos, and tan without a calculator. Does this answer exist???

Started by Chrono1081 May 16, 2010 at 1:30 PM 13 replies 51k views
Original Post
Chrono1081
Chrono1081
Hi guys. After a long time of searching, asking, googling, etc, I still cannot find out this answer. How on earth does one find sine, cosine, and tangent without a calculator? Every site I go to does the typical "its complicated so just use your calculator" crap and sadly so does different mathbooks I've purchased. The closest answer I got was that I need a protractor and a slide rule, and that was from a guy who used to have to do it manually but he forgets exactly how it worked. Can anyone please tell me how to do this without a calculator?
Ignifex
Ignifex
You can use a Taylor series to approximate the answer. All you'd have to remember is the one for sine. Cosine should be simple from there, and tangent is just sine divided by cosine.
Computing a Taylor series without a calculator is still troublesome of course, but after about 3 factors, you're usually quite close.
Another way to go about it, is to draw a unit circle, mark out the angle from the center and find the coordinates of the intersection with the unit circle. The X coordinate would be the cosine of the angle, and the Y coordinate would be the sine.

EDIT:
Formula for sine:
Sin(x) =~ x - x^3 / 3! + x^5 / 5! - x^7/ 7! ... etc...
rip-off
rip-off
There are iterative solutions, such as Newton-Raphson, which start with an approximation of the answer and refine it. Some quick Googling also lead me to the Taylor series, which I vaguely remember being useful for this kind of thing.

When I was in school we had "log tables", which included a table to look up the sin/cos/tan to certain precisions.
nullsquared
nullsquared
The simple way:

Take out a big piece of paper, a big ruler, a protractor, and something to help you draw a nice big circle. Use your protractor to measure the angle you want to use, and then draw a long line from the center of the circle to the circle's surface. For cos(a), measure the horizontal distance from the origin (not diagonal, just horizontal), and for sin(a), measure the vertical distance from the origin (again, just vertical, not diagonal). Then divide by the circle's radius, and you have your answer [wink]

@ rip-off: I don't see how Newton's method can help here, especially considering you need the derivative the of the function anyway
rip-off
rip-off
My apologies, my weak defense is that I'm trying to recall long-forgotten maths. I remember newton raphson being useful for calculating the values of functions, but didn't think about the details.
summaky
summaky
Quote:
Original post by Chrono1081
After a long time of searching, asking, googling, etc, I still cannot find out this answer.


Then you'll have to learn to search better :-)

Just by looking at wikipedia we can find the trigonometric functions page that says:

Quote:
Prior to computers, people typically evaluated trigonometric functions by interpolating from a detailed table of their values, calculated to many significant figures. Such tables have been available for as long as trigonometric functions have been described (see History below), and were typically generated by repeated application of the half-angle and angle-addition identities starting from a known value (such as sin(π/2) = 1).


Then, following a "see also" link to the Generating trigonometric tables pages we can find the method used to create the tables that rip-off used in high school as well as some faster approximations.

I assume that Wolfram's MathWorld also explains all this, but I didn't bother to look there.
LessBread
LessBread
If you're looking for a way of obtaining sine/cosine values that's faster than using the math lib functions, consider using a lookup table.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Chrono1081
Chrono1081
Thank you guys sooo much! You have no idea how bad this has been frustrating me :)

I remember asking this question in high school and at three different universities and the closest I got was "Well, before calculators we had look up tables in books". Um..thats nice but how do you get the values in the books!?

I even tried asking friends of mine who are *gasp!* high school math teachers! The reason I gasp is because they both started telling me soh cah toa and didn't understand that I needed to find this without a calculator (or else they simply didn't know and tip-toed around the question).

Anyway I'm off to try this. Hopefully I can scrounge up a protractor from the engineering department. (I work in a remote area so running to walmart is out of the question :P)
Dragonsoulj
Dragonsoulj
Correct me if I am wrong but wouldn't Soh Cah Toa help you? Especially if you are programming it. Just have the computer calculate each one you need instead of a the functions themselves. It should be less math than the Taylor Series, too. nullsquared's method would work just as well. Either way it is just division.
Washu
Washu
Well, the power series for e, sin and cos has been known since at least Newton's time... given just the power series for e though you can derive the other two (and hence tan) using complex numbers:




Minor elements missing of course (for instance Euler originally published the formula as in 1748 (in his book Introductio in Analysis Infinitorum).
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
alvaro
alvaro
Quote:
Original post by Washu
Minor elements missing of course (for instance Euler originally published the formula as in 1748 (in his book Introductio in Analysis Infinitorum).


Hmmm... That doesn't seem to add anything to the formula, except complexity. If you plug in a negative x in the usual formula, you'll get the correct result. It could be that in Euler's time there was a stylistic reason to prefer a formula that incorporates exp(ix) and exp(-ix).

Zipster
Zipster
Quote:
Original post by alvaro
Hmmm... That doesn't seem to add anything to the formula, except complexity. If you plug in a negative x in the usual formula, you'll get the correct result. It could be that in Euler's time there was a stylistic reason to prefer a formula that incorporates exp(ix) and exp(-ix).

Even if you get the same result in the end, perhaps it's to clarify that the sign of 'x' only influences the terms involved with calculating 'sin' and not 'cos'.
Eric_Brown
Eric_Brown
Quote:
Original post by Zipster
Quote:
Original post by alvaro
Hmmm... That doesn't seem to add anything to the formula, except complexity. If you plug in a negative x in the usual formula, you'll get the correct result. It could be that in Euler's time there was a stylistic reason to prefer a formula that incorporates exp(ix) and exp(-ix).

Even if you get the same result in the end, perhaps it's to clarify that the sign of 'x' only influences the terms involved with calculating 'sin' and not 'cos'.


Or to hint at the effect of complex conjugation.
LessBread
LessBread
I side with complex conjugation.

exp(ix) "is a complex number, so, by definition, it must be of the form x + iy." [1]

exp(ix) = cos(x) + i sin(x)
exp(-ix) = cos(x) - i sin(x) [complex conjugate of exp(ix)]

On a slightly related note, if you've ever wondered "what is the formula for raising a complex number to the power of a complex number", the wikipedia entry for exponentiation contains it (Exponentiation#Computing_complex_powers).
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Palidine
Palidine
The wikipedia article has good explanations of this. Basically the "unit circle" is probably the original mechanism for the generation of the tables of values. Taylor series are a product of calculus which wasn't invented until Issac Newton invented it to describe physics. Usage of trigonometry certainly goes back at least to the ancient greeks (Euclidean Geometry) which is waaaaay before calculus and taylor series:

http://en.wikipedia.org/wiki/Trigonometric_functions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.