[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Transcendental Functions

Subsections

Exponential, Logarithmic and Polylogarithmic Functions

In this section the exponential and logarithmic functions to the natural base e are described, as well as the conversion to the logarithm with respect to any base.

The power series expansions are e^z= the sum from n=0 to infinity of (z^n/n!) and ln(1 + z)= the sum from n=1 to infinity of ( - 1)^(n - 1)(z^n/n). Further information on the Dilog and Polylog functions can be found in Lewin [Lew81].

Exp(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the exponential power series of f.
Exp(s) : FldPrElt -> FldPrElt
Exp(c) : FldComElt -> FldComElt
Exp(r) : FldReElt -> FldReElt
Given an arbitrary real or complex number c, return the exponential e^c of c. Here c is allowed to be free or of fixed precision, and the result is in the same field as c.
Log(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the logarithm of f. The valuation of f must be zero.
Log(s) : FldPrElt -> FldPrElt
Log(r) : FldReElt -> FldReElt
Log(c) : FldComElt -> FldComElt
Given a non-zero free real or complex number c, return the logarithm of c (to the natural base e). The principal value with imaginary part in ( - pi, pi] is chosen. The result will be a free complex number, unless the argument is real and positive, in which case a free real number is returned.

The argument is also allowed to be a real or complex number of fixed precision. A fixed precision real argument must be positive, and the result will be real of the same precision. A fixed precision complex argument must be non-zero, and yields a complex value of the same precision.

Log(b, s) : FldPrElt -> FldReElt
Log(b, r) : FldReElt -> FldReElt
Given non-negative real numbers b and r, return the logarithm log_b(r) of a to the base b. Here both r and b may be of fixed precision or free. Automatic coercion is applied if necessary.
Dilog(s) : FldPrElt -> FldPrElt
For given complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the dilogarithm Li_2(s), which can be defined by Li_2(s)=the negative of the integral from 0 to s of (log(1 - s)/s)ds, and forms the analytic continuation of the power series sum from n=1 to infinity of (s^n/n^2), (which is convergent for | s| <= 1). For large values of the argument a functional equation like Li_2((-1/s)) + Li_2( - s)=2Li_2( - 1) - (1/2)log^2(s) should be used.
Polylog(m, f) : RngIntElt, RngSerElt -> RngSerElt
For an integer m >= 2 and power series f defined over the free real or complex field, return the m-th polylogarithm of the series f. The valuation of f must be positive for m>1.
Polylog(m, s) : FldPrElt -> FldPrElt
For given integer m >= 2 and complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the polylogarithm Li_m(s), defined for m >= 3 by Li_m(s)= the integral from 0 to s given by (Li_(m - 1)(s)/s)ds (and for m=2 as the dilogarithm Li_2). Then Li_m is the analytic continuation of the sum from n=1 to infinity of (s^n/n^m), (which is convergent for | s| <= 1). For large values of the argument a functional equation like ( - 1)^m Li_m((-1/s)) + Li_m( - s)= - (1/m!)log^m(s) + 2sum_(r=1)^( Floor(m/2))(log^(m - 2r)(s)/(m - 2r)!)Li_(2r)( - 1) should be used.
PolylogD(m, s) : FldPrElt -> FldPrElt
PolylogDold(m, s) : FldPrElt -> FldPrElt
PolylogP(m, s) : FldPrElt -> FldPrElt
Given integer m >= 2 and complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the modified versions tilde D_m, D_m and P_m of the polylogarithm Li_m(s); all of these satisfy functional equations of the form f_m(1/s)=( - 1)^mf_m(s). For their definition and main properties, see Zagier [Zag91].

Trigonometric Functions

The trigonometric functions may be computed for real and complex arguments or for power series defined over the real or complex field. The basic power series expansions are sin(z)=the sum from n=0 to infinity of (( - 1)^(n + 1)z^(2n + 1)/(2n + 1)!), and cos(z)=the sum from n=0 to infinity of (( - 1)^nz^(2n)/(2n)!). Euler's formulas relate these with the exponential functions via sin(z)=(e^(i z) - e^(-i z)/2i), cos(z)=(e^(i z) + e^(-i z)/2).

Sin(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the power series sin(f).
Sin(c) : FldComElt -> FldComElt
Sin(s) : FldPrElt -> FldPrElt
Sin(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value sin(c).
Cos(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the power series cos(f).
Cos(c) : FldComElt -> FldComElt
Cos(s) : FldPrElt -> FldPrElt
Cos(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value cos(c).
Sincos(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the two power series sin(f) and cos(f).
Sincos(s) : FldPrElt -> FldPrElt, FldPrElt
Given a free real or complex number s, return the two values sin(s) and cos(s). This function is not implemented for fixed precision reals or complexes.
Tan(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the power series tan(f).
Tan(c) : FldComElt -> FldComElt
Tan(s) : FldPrElt -> FldPrElt
Tan(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value tan(c)=(sin(c)/cos(c)). Note that c should not be too close to one of the zeroes (pi/2 + n .pi) of cos(z).
Cot(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field having valuation zero, return the power series cot(f).
Cot(c) : FldComElt -> FldComElt
Cot(s) : FldPrElt -> FldPrElt
Cot(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value cot(c)=(cos(c)/sin(c)). Note that c should not be too close to one of the zeroes n .pi of sin(z).
Sec(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the power series sec(f).
Sec(c) : FldComElt -> FldComElt
Sec(s) : FldPrElt -> FldPrElt
Sec(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value sec(c)=1/cos(c). Note that c should not be too close to one of the zeroes (pi/2 + n .pi) of cos(z).
Cosec(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field having valuation zero, return the power series cosec(f).
Cosec(c) : FldComElt -> FldComElt
Cosec(s) : FldPrElt -> FldPrElt
Cosec(r) : FldReElt -> FldReElt
Given a real or complex number c, return the value cosec(c)=1/sin(c). Note that c should not be too close to one of the zeroes n .pi of sin(z).

Inverse Trigonometric Functions

The inverse trigonometric functions are all available for arbitrary free (real or complex) argument, as well as for restricted real arguments of fixed precision. The principal values are chosen as indicated.

We mention the power series expansions for the inverse of the sine and tangent functions (for | z| <= 1): eqalign( arcsin(z)&=sum_(n=0)^Infinity bigl(prod_(k=1)^(2n) k^(( - 1)^(k - 1))bigr)(z^(2n + 1)/2n + 1), cr arctan(z)&=sum_(n=1)^Infinity( - 1)^n(z^(2n + 1)/2n + 1).cr) The important relations with the logarithmic function include eqalign( arcsin(z)&=(1/i)log(i z + Sqrt(1 - z^2)), cr arccos(z)&=(1/i)log(z + Sqrt(z^2 - 1)), cr arctan(z)&=(1/2i)log((1 + i z/1 - i z)).cr)

Arcsin(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field. return the inverse sine of the power series f.
Arcsin(s) : FldPrElt -> FldPrElt
Arcsin(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that sin(t)=s. The principal value with real part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless s is real and -1 <= s <= 1, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number satisfying -1 <= s <= 1; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2].

Arccos(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field. return the inverse cosine of the power series f.
Arccos(s) : FldPrElt -> FldPrElt
Arccos(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that cos(t)=s. The principal value with real part in [0, pi] is chosen. The return value is a free complex number, unless s is real and -1 <= s <= 1, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number satisfying -1 <= s <= 1; the fixed precision real value returned will again be in the interval [0, pi].

Arctan(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the inverse tangent of the power series f.
Arctan(s) : FldPrElt -> FldPrElt
Arctan(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that tan(t)=s. The principal value with real part in ( - pi/2, pi/2) is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2).

Arctan(a, b) : FldPrElt, FldPrElt -> FldPrElt
Arctan2(a, b) : FldPrElt, FldPrElt -> FldPrElt
Arctan(a, b) : FldReElt, FldReElt -> FldReElt
Arctan2(a, b) : FldReElt, FldReElt -> FldReElt
Given the real numbers a and b, return the value v of arctan(a/b) determined by the choice of signs for a and b. That is, the value v is chosen in ( - pi, pi) in such a way that the signs of a and sin(v) coincide, as well as the signs of b and cos(v). An error occurs if a and b are both zero; if b is zero and a non-zero, the value returned is sign(a) .pi/2.

The arguments are allowed to be in any real field (automatic coercion is used whenever necessary).

Arccot(s) : FldPrElt -> FldPrElt
Arccot(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that cot(t)=s. The principal value with real part in ( - pi/2, pi/2) is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2).

Arcsec(s) : FldPrElt -> FldPrElt
Arcsec(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that sec(t)=s. The principal value with real part in [0, pi/2)union(pi/2, pi] is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be between 0 and pi.

Arccosec(s) : FldPrElt -> FldPrElt
Arccosec(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return a value t such that cosec(t)=s. The principal value with real part in [ - pi/2, 0)union(0, pi/2] is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.

The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be between -pi/2 and pi/2.

Hyperbolic Functions

The hyperbolic functions are available for arbitrary free (real and complex) arguments, and certain fixed precision real arguments, as specified below.

The hyperbolic functions are defined using eqalign( sinh(z)&=(e^z - e^(-z)/2), cr cosh(z)&=(e^z + e^(-z)/2).cr)

Sinh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the hyperbolic sine of the power series f.
Sinh(s) : FldPrElt -> FldPrElt
Sinh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return sinh(s). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Cosh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the hyperbolic cosine of the power series f.
Cosh(s) : FldPrElt -> FldPrElt
Cosh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return cosh(s). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Tanh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the hyperbolic tangent of the power series f.
Tanh(s) : FldPrElt -> FldPrElt
Tanh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return tanh(s)=(sinh(s) /cosh(s)). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Coth(s) : FldPrElt -> FldPrElt
Coth(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return coth(s)=(cosh(s) /sinh(s)). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Sech(s) : FldPrElt -> FldPrElt
Sech(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return sech(s)=1/cosh(s). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Cosech(s) : FldPrElt -> FldPrElt
Cosech(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return cosech(s)=1/sinh(s). The result will be a free real or complex value, in accordance with the argument.

The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.

Inverse Hyperbolic Functions

The inverse hyperbolic functions are available for arbitrary free (real or complex) argument, as well as for restricted real arguments of fixed precision. The principal values are chosen as indicated.

Argsinh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the inverse hyperbolic sine of the power series f.
Argsinh(s) : FldPrElt -> FldPrElt
Argsinh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that sinh(t)=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real, in which case a free real number is returned.

The argument s is also allowed to be a real number of fixed precision; a real number of the same precision will be returned.

Argcosh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the inverse hyperbolic cosine of the power series f.
Argcosh(s) : FldPrElt -> FldPrElt
Argcosh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that cosh(t))=s; the principal value with imaginary part in [0, pi] is chosen. The return value is a free complex number, unless the argument is real and s >= 1, in which case a free real number is returned.

The argument s is also allowed to be a real number of fixed precision greater than or equal to 1; a real number of the same precision will be returned.

Argtanh(f) : RngSerElt -> RngSerElt
Given a power series f defined over the real or complex field, return the inverse hyperbolic tangent of the power series f.
Argtanh(s) : FldPrElt -> FldPrElt
Argtanh(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that tanh(t)=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real and -1<s<1, in which case a free real number is returned.

The argument s is also allowed to be a real number of fixed precision with -1< s< 1; a real number of the same precision will be returned.

Argsech(s) : FldPrElt -> FldPrElt
Argsech(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that sech(t))=s; the principal value with imaginary part in [0, pi] is chosen. The return value is a free complex number, unless the argument is real and | s| >= 1, in which case a free real number i s returned.

The argument s is also allowed to be a real number of fixed precision with | s| >= 1; a real number of the same precision will be returned.

Argcosech(s) : FldPrElt -> FldPrElt
Argcosech(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that cosech(t))=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real, in which case a free real number is returned.

The argument s is also allowed to be a real number of fixed precision; a real number of the same precision will be returned.

Argcoth(s) : FldPrElt -> FldPrElt
Argcoth(r) : FldReElt -> FldReElt
Given an arbitrary free real or complex number s, return t such that coth(t))=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real and 0<s <= 1, in which case a free real number is returned.

The argument s is also allowed to be a real number of fixed precision with 0<s <= 1; a real number of the same precision will be returned.


 [Next][Prev] [Right] [Left] [Up] [Index] [Root]