Blame doc/specfunc-psi.rst

Packit 67cb25
.. index::
Packit 67cb25
   single: psi function
Packit 67cb25
   single: digamma function
Packit 67cb25
   single: polygamma functions
Packit 67cb25
Packit 67cb25
The polygamma functions of order :math:`n` are defined by
Packit 67cb25
Packit 67cb25
.. only:: not texinfo
Packit 67cb25
Packit 67cb25
   .. math:: \psi^{(n)}(x) = \left(d \over dx\right)^n \psi(x) = \left(d \over dx\right)^{n+1} \log(\Gamma(x))
Packit 67cb25
Packit 67cb25
.. only:: texinfo
Packit 67cb25
Packit 67cb25
   ::
Packit 67cb25
Packit 67cb25
      \psi^{(n)}(x) = (d/dx)^n \psi(x) = (d/dx)^{n+1} \log(\Gamma(x))
Packit 67cb25
Packit 67cb25
where :math:`\psi(x) = \Gamma'(x)/\Gamma(x)` is known as the digamma function.
Packit 67cb25
These functions are declared in the header file :file:`gsl_sf_psi.h`.
Packit 67cb25
Packit 67cb25
Digamma Function
Packit 67cb25
----------------
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi_int (int n)
Packit 67cb25
              int gsl_sf_psi_int_e (int n, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the digamma function :math:`\psi(n)` for positive
Packit 67cb25
   integer :data:`n`.  The digamma function is also called the Psi function.
Packit 67cb25
.. Domain: n integer, n > 0
Packit 67cb25
.. Exceptional Return Values: GSL_EDOM
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi (double x)
Packit 67cb25
              int gsl_sf_psi_e (double x, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the digamma function :math:`\psi(x)` for general
Packit 67cb25
   :data:`x`, :math:`x \ne 0`.
Packit 67cb25
.. Domain: x != 0.0, -1.0, -2.0, ...
Packit 67cb25
.. Exceptional Return Values: GSL_EDOM, GSL_ELOSS
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi_1piy (double y)
Packit 67cb25
              int gsl_sf_psi_1piy_e (double y, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the real part of the digamma function on the line
Packit 67cb25
   :math:`1 + i y`, :math:`\Re[\psi(1 + i y)]`.
Packit 67cb25
.. exceptions: none
Packit 67cb25
.. Exceptional Return Values: none
Packit 67cb25
Packit 67cb25
Trigamma Function
Packit 67cb25
-----------------
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi_1_int (int n)
Packit 67cb25
              int gsl_sf_psi_1_int_e (int n, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the Trigamma function :math:`\psi'(n)` for
Packit 67cb25
   positive integer :math:`n`.
Packit 67cb25
.. Domain: n integer, n > 0 
Packit 67cb25
.. Exceptional Return Values: GSL_EDOM
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi_1 (double x)
Packit 67cb25
              int gsl_sf_psi_1_e (double x, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the Trigamma function :math:`\psi'(x)` for
Packit 67cb25
   general :data:`x`.
Packit 67cb25
.. Domain: x != 0.0, -1.0, -2.0, ...
Packit 67cb25
.. Exceptional Return Values: GSL_EDOM, GSL_ELOSS
Packit 67cb25
Packit 67cb25
Polygamma Function
Packit 67cb25
------------------
Packit 67cb25
Packit 67cb25
.. function:: double gsl_sf_psi_n (int n, double x)
Packit 67cb25
              int gsl_sf_psi_n_e (int n, double x, gsl_sf_result * result)
Packit 67cb25
Packit 67cb25
   These routines compute the polygamma function :math:`\psi^{(n)}(x)` for
Packit 67cb25
   :math:`n \ge 0`, :math:`x > 0`.
Packit 67cb25
.. Domain: n >= 0, x > 0.0
Packit 67cb25
.. Exceptional Return Values: GSL_EDOM