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

I Newton's approximation of inverse trig

  1. Feb 23, 2017 #1
    Given a unit-hypotenuse triangle, how do we get the inverse sin/cos/tan equations? I'm trying to program a high-precision fixed-fraction model of the sun and earth and I've forgotten how the equations are derived. I know there's differentiation and integration. And I'm stuck on how to express the relation between opp/adj as angle.
     
  2. jcsd
  3. Feb 24, 2017 #2

    Mark44

    Staff: Mentor

    Trig.png
    ##\cos(\theta) = x##, ##\sin(\theta) = y##, and ##\tan(\theta) = \frac y x##
    So ##\theta = \cos^{-1}(x)## and ##\theta = \sin^{-1}(x)## and ##\theta = \tan^{-1}(\frac y x)##
    That seems to be what you're looking for. No differentiation or integration involved, just the relationships in the unit circle and inverse functions.
     
  4. Feb 24, 2017 #3
    I think I remembered, to state asin/acos/atan as an approach to the arc (part of circumference) length formed by the triangle, so all that's needed is to set up those triangles touching the perimeter and approaching the arc length exactly as the measuring intervals become smaller and approach zero. I needed the exact methods to do this so I could derive my own trig functions (complicated c++ reason).
     
  5. Feb 24, 2017 #4

    Mark44

    Staff: Mentor

    I don't understand what you're saying here.
    Possibly you were referrring to formulas such as this one:
    ##\tan^{-1}(x) = \int \frac{dx}{x^2 + 1}##. There's a related formula for ##\sin^{-1}(x)##.
     
  6. Feb 24, 2017 #5
    I really appreciate your help. Here is what I was looking for:

    Find: asin(o) = Φ

    Given: o
    o = yf
    xf = √(1 - yf2)
    0≤Φ≤π/2
    x0 = 1
    y0 = 0

    Then:

    lim n→∞ ( Σi=1n ( √( (xi - xi-1)2 + (yi - yi-1)2 ) ) )

    y(i) = y0 + yfi/n

    x(i) = √( 1 - y(i)2 )
    trigasin.jpg
     
    Last edited by a moderator: Feb 24, 2017
  7. Feb 24, 2017 #6

    Mark44

    Staff: Mentor

    I have no idea what you're trying to do here, and the picture doesn't help any.
    From the two lines above, you are apparently trying to find ##\Phi## and are given o. (BTW, it's a bad idea to use a variable named o or O, because both look like the number 0.)
    ???
    What's the purpose of bringing in another variable?
    As I said, the picture doesn't help much. For example, what is TA? It looks like it's the center of the circle, which should be at the origin. From your earlier comment, this is the unit circle, so the hypotenuses of both of your right triangles are 1 unit in length. Neither of the two right triangles has its angle at the origin identified, which makes things much more complicated than they need to be.
    For the triangle with the solid lines, with the one vertex at ##(x_2, y_2)##, if its angle at the left vertex is ##\alpha##, then ##x_2 = \cos(\alpha)## and ##y_2 = \sin(\alpha)##. For the triangle with dotted lines, assuming its angle at the left vertex is ##\beta##, then ##x_0 = \cos(\beta)## and ##y_0 = \sin(\beta)##, NOT 1 and 0, respectively, that you show above.
    = what?
    And what are you trying to do?
     
  8. Feb 24, 2017 #7
    I was trying to find arc length given an x or y of a unit length circle (full arc happens to be 2π so arc length corresponds to angle in radians). This is how asin etc work "under the hood" in calculators and computers. I needed the exact method instead of the floating point implementation, which doesn't have enough precision. The attached illustration isn't correct as I was trying to do it from memory but it would have overlapping triangles and all we really care about is the distances between successive points along the perimeter. Using this method I can plug in n=100+ to get as much precision as needed. It only works within the given quadrant because otherwise you can't interpolate the y coordinate between 0 and 1. For other quadrants, adjust the equation accordingly. "o" is opposite (over hypotenuse, which is 1).
     
  9. Feb 24, 2017 #8

    Mark44

    Staff: Mentor

    I don't believe that's true. My understanding is that calculators, especially, use an algorithm called CORDIC, which uses a combination of look up tables and shifts in the angles to do the calculations. Here's a link to one implementation in C: http://people.sc.fsu.edu/~jburkardt/c_src/cordic/cordic.c
    If you scroll down you'll find an implementation of the arcsin function.
    Any summation you do, as in the limit you showed, will necessarily be inexact. If the floating point implementation isn't precise enough, look for a library that uses a larger representation for floating point numbers. In generatl, you're not going to get an exact value when a computer is doing the calculations.
    http://people.sc.fsu.edu/~jburkardt/c_src/cordic/cordic.c
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Newton's approximation of inverse trig
  1. Inverse trig fuction (Replies: 1)

  2. Inverse trig? (Replies: 2)

Loading...