Hi re3579-ga:
There are different methods for finding values of the sine function
without using existing tables (either physical or in
software/calculators) or making physical measurements. The one that I
would recommend for you is the Taylor Series approximation.
The Taylor Series approximation for the sine function states that:
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ... +
(-1)^(n-1)*x^(2n-1)/(2n-1)! + ....
For more information on the derivation of this series (if you're
interested) see:
http://www.efunda.com/math/taylor_series/taylor_series.cfm
All the calculations here require only addition (+), subtraction (-),
exponentiation (^), and the factorial operator (!). These calculations
can be done by hand, on most calculators (without using sine tables)
or using a spreadsheet (like Excel).
When using this approximation, you need to keep in mind that the angle
"x" needs to be in *radians* and must also be between -180 degrees and
+180 degrees (or pi and +pi radians).
**********THE PROCESS*************
STEP 1: If your angle is not between -180 and +180 degrees, just add
or subtract 360 degrees (as appropriate) to the value until it does
fall in that range.
STEP 2: To compute radians from degrees (which you appear to be
working with), simply multiply the degrees value times pi/180. So, if
the angle in degrees is "d", then:
x = d * pi/180
Of course, you are going to have to use an approximation for the value
of pi (which is an irrational number - that is, its decimal
representation goes on forever without repeating). I will provide you
with the first 100 decimals of pi:
pi=3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068
To get 6-digit accuracy, I suggest that you use seven digits for pi.
(It's typically a good idea to use more digits in your calculations
than are in your desired accuracy.) The more digits you use, the more
accurate your answer will be with fewer terms in the series. (However,
the more digits you use, the more complicated your exponentiations
become!)
pi=3.141592 (approximately)
If you use 7-digit accuracy for pi, you need to continue using 7-digit
accuracy for all your other calculations, including for x and sin(x).
STEP 3: Plug in your approximation for x (found in Step 2) and
calculate the Taylor series for the first four terms in the series.
That is:
sin(x) = x - x^3/3! + x^5/5! - x^7/7! (approximately)
sin(x) = x - x^3/6 + x^5/120 - x^7/5040 (approximately)
Step 4: Round off the value you get in Step 3 at the number of
decimals accuracy that you want (in your case, 6 digits).
**************************************
Let's try the process for your sample value of sin(43)....
Step 1: 43 is in the desired range, so no changes are needed.
Step 2: x = 43 * 3.14159/180
= .7504909445
= .7504909 (to seven digits)
Step 3: sin(x) = .7504909 - (.7504909)^3/6 + (.7504909)^5/120 -
(.7504909)^7/5040
= .7504909 - .07045066 + .001984019 - .00002660648
= .6819976525
Step 4: sin(x) = .681998 (to six digits)
For purposes of this demonstration, we can check this value using
Maple, a math software tool with infinite precision. sin(43 degrees)
to 100 digits accuracy is:
sin(43)=.6819983600624985004422257847111255803404338027619434028783078530675368818749557216140022386820037506
As you can see, the value is accurate to six digits.
If you want the value to be accurate to more than six digits, simply
repeat the process from the beginning using more digits of pi and more
digits throughout the calculations. If you go beyond 7-digit accuracy,
then it would be a good idea to add another term to the Taylor Series.
In fact, make the exponent of your last term in the series equal to or
greater than the number of digits accuracy you want and you should be
safe. For example, if you wanted 8 digits of accuracy, then use 9
digits of pi and the series:
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9!
There are many excellent pages on this method on the web, including:
http://www-math.mit.edu/~djk/18_013a/chapter10/section02.html
http://www.marypat.org/stuff/nylife/010206.html
http://faculty.rmwc.edu/tmichalik/sine.htm
I hope this answers your question. If you need clarification of
anything before you rate this answer, please ask - I'm happy to help.
Search Strategy: personal knowledge
On Google, you can try: calculating sine values "by hand"
websearcher-ga |
Request for Answer Clarification by
re3579-ga
on
10 Aug 2002 11:18 PDT
This answer seems to be close. But I can find PI in a table of
constants and magic numbers. No already existing tables of any kind,
please.
|
Clarification of Answer by
websearcher-ga
on
10 Aug 2002 13:35 PDT
Hi re3579-ga:
Hmmmmmmmm......Let's see if we can work this out.....
First a few provisos.....
In the Taylor Series method I outlined above, the value of pi isn't
really used in the formula
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ... +
(-1)^(n-1)*x^(2n-1)/(2n-1)! + ....
which is what is used to approximate the sine. Pi is merely used to
get the angle value in the "proper" unit system - radians.
Calculations of any difficulty in trigonometry are computed in
radians, not degrees.
As well, "tables" of values that you are trying to avoid typically
list values of a function, f, at different values of a variable, x -
giving f(x). Pi is not a function, but a known value, just like 1, 2,
3, 7, etc. I'm pretty sure you are not going to find a formula for
estimating sin(x) that doesn't involve pi (or other known constants)
in one way or another - especially not if you are working from a value
in degrees. The Taylor Series approximation is optimal in that pi is
not used in the calculation itself, but in the setup alone (when you
are working from degrees).
However, if you are still concerned with using the value of pi as
found in the table you cite, then the following page has many formulas
for approximating pi to various numbers of digits accuracy:
http://mathworld.wolfram.com/PiApproximations.html
Some of the ones with fewer "complicated" operations (like square and
cube roots) include:
(355/113) * (1 - 0.0003/3533) (good to 15 digits)
(553/(311+1))^2 (good to 7 digits)
(1700^3+ 82^3-10^3-9^3-6^3-3^3)/69^5 (good to 12 digits)
So, you could, if you wanted, rewrite the Taylor Series approximation
of sin(x) to four terms, *leaving x in degrees*, as:
sin(x) = (x*(355/113)*(1-0.0003/3533))/180 -
((x*(355/113)*(1-0.0003/3533))/180)^3/6 +
((x*(355/113)*(1-0.0003/3533))/180)^5/120 -
((x*(355/113)*(1-0.0003/3533))/180)^7/5040
Making,
sin(43) = (43*(355/113)*(1-0.0003/3533))/180 -
((43*(355/113)*(1-0.0003/3533))/180)^3/6 +
((43*(355/113)*(1-0.0003/3533))/180)^5/120 -
((43*(355/113)*(1-0.0003/3533))/180)^7/5040
This would still give you six digits accuracy.
Does that solve your concerns? :-)
Thanks.
websearcher-ga
|
Request for Answer Clarification by
re3579-ga
on
10 Aug 2002 19:51 PDT
No. You see, I want to be able to do this "from scratch". That means
that I start with no magic numbers.
You are right that some tables are functions, but some tables are just
tables of formulas, or special constants or special numbers, like e.
For example, a table of special constants would have one column for
description, another column for symbol and another column for a value.
There would be several entries. PI, e, golen mean, etc.
After all, if I am given one magic number, why not give me all the
magic numbers that comprise the table of sines? Where do we draw the
line? So starting truely from scratch won't leave me wondering where
some intially supplied magic number came from.
Even though I am not asking for this, such a method would allow me to
find to any accuracy I want. Any "non-table" method that works with 6
places will automatically work with more than 6 places, I think. It
would be well worth it if a method was found starting with no magic
numbers, and yet at the same time it's good to only 6 decimal places,
although I doubt that's possible. In any case, something good to more
than 6 decimal places is also a good answer.
Addition, multiplication, division, subtraction, square roots are all
fine. Methods involving series, successive approximations are also
fine. In short, any method that doesn't require an initial special
number whose accuracy affects the accuracy of the final results is
good. So for exsample, a series that uses some whole number
multiplier would be just fine.
|
Clarification of Answer by
websearcher-ga
on
10 Aug 2002 21:23 PDT
[I accidentally also posted this clarification as a comment....]
Hi re3579-ga:
Well, I think I understand what you're asking for a little bit better
now.
I'm afraid, however, that what you are asking for doesn't already
exist in mathematical parlance - and is beyond the scope of me (and I
believe anyone else) to create from scratch. I have a university
degree in Mathematics and have been writing math texts for about 10
years and have never run across an approximation method for sin(x)
that doesn't require at least one of the following:
* physical measurement
* some sort of "initial special number" whose accuracy affects the
accuracy of the final number
* use of radians instead of degrees.
If you were willing to list your values of x in radians instead of
degrees (which is the "mathematical" way of expressing angles), then
the Taylor Series expansion
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ... +
(-1)^(n-1)*x^(2n-1)/(2n-1)! + ....
would be *exactly* what you're looking for - a series of whole number
multipliers with no measurement, no special numbers, and infinite
precision (as long as your willing to compute more and more terms).
I'm truly sorry that I can't help you more than this.
If you feel that this answer is unsatisfactory, please feel free to
rate it accordingly or ask for a refund.
Thank you.
websearcher-ga
|
Hello re3579,
Perhaps I can provide some insight into a "different way" to first
calculate pi using some more primitive methods and then calculate sine
and cosine using geometry. To give you an idea of why I know this, I
had a freshman computing problem similar to this one to compute Pi in
college. This may be closer to what you were originally requesting.
Consider a circle with radius one centered at the origin of the plane
(area is Pi). Place a unit square with its lower left corner at the
origin of a plane (area is one, covers 1/4 of the circle). Divide the
range of zero to one along the X and Y axis into a number of equally
spaced divisions. For the example, I will go up in powers of two since
you can divide a line in half precisely with geometric methods and
could (with care) continue to do so to arbitrary accuracy. You may
want to draw this out on graph paper to follow along.
The initial square has four sub-squares, one completely enclosed by
the circle and four (wholly or) partially enclosed by the circle. So
the initial estimate of Pi is between one and four. Divide the four
squares into sixteen. The lower bound for Pi is now 4*8/16 (2.0) and
upper bound is now 3.75. With 64 squares, the lower bound is 4*43/64
(2.730158) and the upper bound is now 4*58/64 (3.625). You can
continue in this way to get better and better accuracy.
This doesn't converge very quickly and I forget how many million
squares you need to get 7 digit accuracy. To program the computer to
do this, you can determine if the square is "wholly inside" or
"partially inside" the square by using (x*x + y*y) for the upper right
and lower left vertex of each small square and comparing with one. As
you noticed, I only did the calculations for 1/4 of the circle and
multiplied by four to get the answer. When you do each bisection,
optimize the algorithm by remembering the squares you last found the
answer on each row / column.
Now, we have a value for Pi to the desired accuracy. You "know" the
values of sine and cosine for a few points - zero degrees, 90 degrees,
180 degrees, and 270 degrees from the relationship that sine is the Y
coordinate of the point on the unit circle and cosine is the X
coordinate of the point on the unit circle. In this way, we get ...
Sine Cosine
0 0.0 1.0
90 1.0 0.0
180 0.0 -1.0
270 -1.0 0.0
Divide the zero to 90 degree angle in half to get 45 degrees. We know
that x*x+y*y = 1.0 and x=y, so x = y = sqrt(2)/2 or about .707....
From the squares we generated to compute Pi, we can generate the
square root value if you don't want to use another method for that
purpose. That will likely require more squares however :-) to get your
six digit accuracy. Using symmetry, we now have values for 45, 135,
225, and 315 degrees.
Continue to bisect the angles until you get angles "close enough" to
the requested values for angles and get the required accuracy of the
sine and cosine values. To give you an ideal of the number of angles
needed, two raised to the 10th power is 1024, two to the 20th is
1,048,576.
In this way, you can compute both Pi and the sine and cosine values
without using any of the taylor series approximations and "could" do
the calcuations without anything more complicated than a ruler,
compass, a large flat area, a marker, and a lot of patience.
--Maniac |