Newton's approximation of inverse trig

In summary, the conversation discusses deriving the inverse sin/cos/tan equations for a unit-hypotenuse triangle and using them to program a high-precision fixed-fraction model of the sun and Earth. The equations are derived using the relationships in the unit circle and inverse functions, without the need for differentiation or integration. The conversation also touches on a method for finding arc length on a unit circle by using successive points along the perimeter, but it is noted that this method may not be exact and there are other methods available.
  • #1
Invutil
24
0
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.
 
Physics news on Phys.org
  • #2
Invutil said:
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.
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.
 
  • #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).
 
  • #4
Invutil said:
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 don't understand what you're saying here.
Invutil said:
I needed the exact methods to do this so I could derive my own trig functions (complicated c++ reason).
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)##.
 
  • #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:
  • #6
Invutil said:
I really appreciate your help. Here is what I was looking for:

Find: asin(o) = Φ

Given: o
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.)
Invutil said:
o = yf
?
What's the purpose of bringing in another variable?
Invutil said:
xf = √(1 - yf2)
0≤Φ≤π/2
x0 = 1
y0 = 0
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.
Invutil said:
Then:

lim n→∞ ( Σi=1n ( √( (xi - xi-1)2 + (yi - yi-1)2 ) ) )
= what?
And what are you trying to do?
Invutil said:
y(i) = y0 + yfi/n

x(i) = √( 1 - y(i)2 )
View attachment 113685
 
  • #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).
 
  • #8
Invutil said:
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 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.
Invutil said:
I needed the exact method instead of the floating point implementation, which doesn't have enough precision.
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.
Invutil said:
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).

http://people.sc.fsu.edu/~jburkardt/c_src/cordic/cordic.c
 

Related to Newton's approximation of inverse trig

1. What is Newton's approximation of inverse trig?

Newton's approximation of inverse trig refers to a method developed by Sir Isaac Newton to approximate the inverse trigonometric functions (such as sine, cosine, and tangent). It involves using a series of iterations to solve for the inverse value of a trigonometric function.

2. Why is Newton's approximation of inverse trig important?

This method is important because it allows for the calculation of inverse trigonometric functions, which are used in many scientific and mathematical applications. It also provides a more efficient and accurate way of finding these values compared to other methods.

3. How does Newton's approximation of inverse trig work?

The method involves using an initial guess for the inverse value and then using a series of iterations to refine the guess until the desired accuracy is achieved. This is done by using the derivative of the trigonometric function to calculate the next approximation.

4. What is the accuracy of Newton's approximation of inverse trig?

The accuracy of this method depends on the number of iterations used and the initial guess for the inverse value. With a sufficient number of iterations and a good initial guess, this method can provide very accurate values for the inverse trigonometric functions.

5. Are there any limitations to Newton's approximation of inverse trig?

While this method is generally accurate, it may not work for all values of the inverse trigonometric functions. In certain cases, it may converge to a different value or not converge at all. It is important to choose an appropriate initial guess and number of iterations to ensure accurate results.

Similar threads

  • Calculus
Replies
8
Views
378
  • Calculus
Replies
5
Views
4K
Replies
13
Views
1K
  • General Math
Replies
17
Views
5K
Replies
15
Views
3K
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • General Math
Replies
5
Views
2K
Replies
3
Views
2K
Back
Top