MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: arcsin

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1576] Re: [mg1550] arcsin
  • From: Richard Mercer <richard at seuss.math.wright.edu>
  • Date: Sat, 1 Jul 1995 02:58:06 -0400

>  Is there a recurrence relation that one can use to compute
>  an arcsin??? How can one numerically compute the value
>  of arcsin with a recurrence relation (restated for
>  clarity)?  Can someone direct me to some resource or
>  formula for numerical solutions of this function...
>  

You don't say whether you want the BEST answer or just AN answer.
Here is a simple 2-minute answer. A numerical analyst could certainly do  
better.

Finding arcsin(a) can be seen as solving the equation a = sin(x), 

or sin(x) - a = 0, with the proviso that the solution should lie within
the interval [-pi/2,+pi/2].

This can be done iteratively using Newton's Method with f(x) = sin(x) - a:
(i)  Select x(0) = 0.
(ii) iterate the equation x(n+1) = x(n) - f(x(n))/f'(x(n)), or
     x(n+1) = x(n) - (sin(x(n)) - a)/cos(x(n))

If you choose a in [-1,1] (a good idea!) this will converge to a root, which  
may not lie with [-pi/2,pi/2].
By adding a multiple of 2pi, you can easily move the root into [-pi,pi].
Then using the identity sin(pi - x) = sin(x) you can find a root within   
[-pi/2,pi/2].

This method will have performance problems when a is close to -1 or +1. A more  
sophisticated method would overcome that.

Richard Mercer



  • Prev by Date: Re: OS2 Version, Use of Virtual Memory?
  • Next by Date: Mathematica Assignments
  • Previous by thread: Mathematica Training
  • Next by thread: Re: ArcSin