next up previous contents
Next: Examples Up: Solving trigonometric equation Previous: Mathematical background   Contents

Implementation

The purpose of this procedure is to determine the roots of a trigonometric equation within a given angle interval.
 
int Solve_Trigo_Interval(int n,VECTOR &A,INTEGER_VECTOR &SSin,
            INTEGER_VECTOR &CCos,double epsilon,double epsilonf,
      int M,int Stop,INTERVAL_VECTOR &Solution,int Nb,REAL Inf,REAL Sup);
with: Note that the returned Solution will always be a range [a,b] included in [0,2$\pi$] and in [Inf,Sup], this interval angle being reduced to an angle interval in the range [0,2$\pi$]. The procedure will return: If you are looking for all the roots of the trigonometric equation you may either specify [Inf,Sup] as [0,2$\pi$] or use the procedure:
 
int Solve_Trigo_Interval(int n,VECTOR &A,INTEGER_VECTOR &SSin,
            INTEGER_VECTOR &CCos,double epsilon,double epsilonf,
            int M,int Stop,INTERVAL_VECTOR &Solution,int Nb);
This procedure first analyze the trigonometric equation to find bounds on the roots using the algorithm described in section 4.3, then use the previous procedure to determine the roots within the bound. In some case this procedure may be faster than the general purpose algorithm.


next up previous contents
Next: Examples Up: Solving trigonometric equation Previous: Mathematical background   Contents
Jean-Pierre Merlet 2012-12-20