Inverse trigonometric function: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Dmitrii Kouznetsov
m (misprint)
imported>Dmitrii Kouznetsov
Line 18: Line 18:
==Implementation of the inverse trigonometric functions==
==Implementation of the inverse trigonometric functions==


Some compiled do not recognize the inverse trigonometric functions of the compelx argument. In this case, the representations through function [[Logatirhm]] can be used.
Some compiled do not recognize the inverse trigonometric functions of the compelx argument. In this case, the representations through function [[Logarithm]] can be used.
For example, [[ArcCos]] can be implemented in in [[C++]] in the following way:
For example, [[ArcCos]] can be implemented in in [[C++]] in the following way:
  z_type acos(z_type z){
  z_type acos(z_type z){
Line 31: Line 31:


This implementation is used to plot the [[Complex map]] of function [[ArcCos]] in the figure at right.
This implementation is used to plot the [[Complex map]] of function [[ArcCos]] in the figure at right.
==Cut lines==
==Cut lines==
The inverse trigonometric functions are [[holomorphic functions|holomorphic]] in the whole complex plane except unavoidable cut lines; the choice of these cut lines is important for the unambiguity of the result of the application.
The inverse trigonometric functions are [[holomorphic functions|holomorphic]] in the whole complex plane except unavoidable cut lines; the choice of these cut lines is important for the unambiguity of the result of the application.

Revision as of 03:31, 31 March 2012

Compex map of ArcCos function,

Inverse trigonometric functions are ArcSin, ArcCos, ArcTan and ArcCot.

They are inverse functions of Sin, Cos, Tan and Cot

Notations

The name of the inverse function is created adding the prefix Arc to the name of the function. Such a rule is valid for the Mathematica software.

In Latex the prefix is "arc".

In some programming languages, it is sufficient to add the one prefix "a" to get name of the inverse trigonometric function.

In such a way they are implemented in C++, the functions are called asin, acos, atan.

Implementation of the inverse trigonometric functions

Some compiled do not recognize the inverse trigonometric functions of the compelx argument. In this case, the representations through function Logarithm can be used. For example, ArcCos can be implemented in in C++ in the following way:

z_type acos(z_type z){
if(Im(z)<0){if(Re(z)>=0){return I*log( z + sqrt(z*z-1.) );} 
                   else{return I*log( z - sqrt(z*z-1.) );}}
           if(Re(z)>=0){return -I*log( z + sqrt(z*z-1.) );} 
                  else {return -I*log( z - sqrt(z*z-1.) );} }

, where "z_type" means "complex" or "complex double", "Re" means Real part, and "Im" means Imaginary part.

This implementation is used to plot the Complex map of function ArcCos in the figure at right.

Cut lines

The inverse trigonometric functions are holomorphic in the whole complex plane except unavoidable cut lines; the choice of these cut lines is important for the unambiguity of the result of the application.