Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Function of sin(x)?

  1. Mar 29, 2006 #1
    I searched my textbook and Wikipedia-D but I couln't find the function of sine composed with operations and values.


    I typed it in my graphing calculator but I can't really figure out the formula by only looking at the outputs. What operations does the calculator execute with my input x to spit out the output?

    Thanks in advance!
  2. jcsd
  3. Mar 29, 2006 #2
    Is this what you are looking for?
    [tex]sin(x)= \sum_{n=0}^{ \infty} \frac{(-1)^{2n}}{(2n+1)!} x^{2n+1} [/tex]

    Otherwise you have to go back to Trigonometry and define the sine function in terms of a right triangle. There is no "closed-form" (aka "nice looking") function for the sine function.

    Last edited: Mar 29, 2006
  4. Mar 29, 2006 #3


    User Avatar
    Staff Emeritus
    Science Advisor

    In other words, sin(x) is not an "algebraic" function.
  5. Mar 29, 2006 #4
    I know there are tons of ways to approximate a sine function, the most obvious being taylor series and numerical solutions of y''+y=0, but does anyone know how the "average" scientific calculator does it? The "best" way I think is to first map the argument onto (0,2pi) and then take advantage of symmetry to make your interval (0,pi/2). Taking pi/2 as a worst case value, and using the macluauren series I needed to go up to x^19 to get a value "equal" to 1 within double floating point accuracy. Is this what a calculator does? My best guess is that calculates on a smaller interval than (0,pi/2) where the series converges faster and then uses various identities to go back up.
    Of course I don't think taylor series are your only option. There are things like accelerated series. I believe brent and soloman have done work in quadratically convergent methods for elementary functions (exp,sin,cos,log). (R. P. Brent, Fast multiple-precision evaluation of elementary functions, J. ACM 23 (1976) 242-251)
  6. Mar 30, 2006 #5
    I recall reading an article in College Math Journal, a publication of the MAA, that showed a very fast way to get sin x, most likely the method used by calculators. After a little bit of searching, I found the article was in the November 2001 issue: College Math Journal: Volume 32, Number 5, Pages: 330-333.

    I have misplaced all my CMJ's, so that's about all I can dig up on it atm, besides the official CMJ website: http://www.maa.org/pubs/cmj.html
  7. Mar 30, 2006 #6
    After looking on the internet a little bit I found the so called cordic method. It's been around for 40 years or so and was used on the first hand calculators. Check out the website: www.emesystems.com/BS2mathC.htm
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?