Nestedsums library
ratio_of_tgamma Class Reference

The class ratio_of_tgamma contains the ratio of two Gamma functions. More...

#include <polygamma.h>

Inheritance diagram for ratio_of_tgamma:

Public Member Functions

 ratio_of_tgamma (const GiNaC::ex &a1, const GiNaC::ex &b1, const GiNaC::ex &a2, const GiNaC::ex &b2)
 
 ratio_of_tgamma (const GiNaC::ex &a1, const GiNaC::ex &b1, const GiNaC::ex &a2, const GiNaC::ex &b2, const GiNaC::ex &i, const GiNaC::ex &eps, int o, int f)
 
void archive (GiNaC::archive_node &node) const override
 
void read_archive (const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override
 
unsigned return_type (void) const override
 
void print (const GiNaC::print_context &c, unsigned level=0) const override
 
unsigned precedence (void) const override
 
GiNaC::ex eval () const override
 
GiNaC::ex subs (const GiNaC::exmap &m, unsigned options=0) const override
 
virtual GiNaC::ex eval_explicit () const
 
GiNaC::ex set_expansion (void) const
 
GiNaC::ex set_index (const GiNaC::ex &new_index) const
 
GiNaC::ex set_expansion_parameter (const GiNaC::ex &new_eps) const
 
GiNaC::ex set_order (int new_order) const
 
GiNaC::ex set_flag (int new_flag) const
 
GiNaC::ex set_values (const GiNaC::ex &new_index, const GiNaC::ex &new_eps, int new_order, int new_flag) const
 
GiNaC::ex get_index (void) const
 
GiNaC::ex shift_plus_one (void) const
 
GiNaC::ex shift_minus_one (void) const
 
GiNaC::ex index_eq_one (void) const
 
GiNaC::ex shift_index (const GiNaC::ex &new_index) const
 
int pole_alert (void) const
 
int expansion_alert (void) const
 

Protected Member Functions

GiNaC::ex eval_ncmul (const GiNaC::exvector &v) const override
 
GiNaC::ex derivative (const GiNaC::symbol &s) const override
 
unsigned calchash (void) const override
 
GiNaC::ex increase_numerator (int shift_order=0) const
 
GiNaC::ex decrease_numerator (int shift_order=0) const
 
GiNaC::ex increase_denominator (int shift_order=0) const
 
GiNaC::ex decrease_denominator (int shift_order=0) const
 
GiNaC::ex prefactor_increase_numerator (void) const
 
GiNaC::ex prefactor_decrease_numerator (void) const
 
GiNaC::ex prefactor_increase_denominator (void) const
 
GiNaC::ex prefactor_decrease_denominator (void) const
 

Protected Attributes

GiNaC::ex a1
 
GiNaC::ex b1
 
GiNaC::ex a2
 
GiNaC::ex b2
 
GiNaC::ex index
 
GiNaC::ex expansion_parameter
 
int order
 
int flag_expand_status
 

Friends

class list_of_tgamma
 

Detailed Description

The class ratio_of_tgamma contains the ratio of two Gamma functions.

The definition is

\[
    \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
    \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
 \]

Here $ a_1 $, $ b_1 $, $ a_2 $ and $ b_2 $ are passed to the constructor. The index $i$ and the expansion parameter $\varepsilon$ can be set via the set_index(const ex &) and set_expansion_parameter(const ex &) methods, respectively.

Additionally, this class contains an internal variable "order", which indicates to which order this object should be expanded. The "order" variable can be set via the method set_order(int). The expansion is performed by calling the method set_expansion(void).

This class assumes that $i+a_1 > 0$ for all $i$, e.g. it does not handle possible poles in the Gamma function.

Member Function Documentation

◆ decrease_denominator()

ex decrease_denominator ( int shift_order = 0) const
protected

Returns

\[
    \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
    \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2-1+b_2\varepsilon)}
 \]

The order variable is adjusted according to order = order + shift_order.

◆ decrease_numerator()

ex decrease_numerator ( int shift_order = 0) const
protected

Returns

\[
    \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
    \frac{\Gamma(i+a_1-1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
 \]

The order variable is adjusted according to order = order + shift_order.

◆ eval()

ex eval ( ) const
override

If the flag flag_expand_status is set, the object is expanded in $\varepsilon$.

If $a_1$ and $a_2$ are zero, we have

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+b_1\varepsilon)}{\Gamma(i+b_2\varepsilon)}
  = \frac{ 1 + b_1 \varepsilon Z_1(i-1) + ...}{1 + b_2 \varepsilon Z_1(i-1) + ...}
\]

Here the formula

\[
\left( 1 + \varepsilon Z_1(i-1) + \varepsilon^2 Z_{11}(i-1) + ... \right)^{-1}
= 1 - \varepsilon S_1(i-1) + \varepsilon^2 S_{11}(i-1) - ...
\]

is useful.

If $a_1 > 0$ we have

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
   = \left( i + a_1 -1 + b_1 \varepsilon \right)
       \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
       \frac{\Gamma(i+a_1-1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
\]

$i$ is interpreted as unit_letter(-1,index). The order parameter of ratio_of_tgamma of the $b_1 \varepsilon$ term is decreased by one due to the explicit presence of $\varepsilon$.

If $a_1 < 0$ we have

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
   = \sum\limits_{j=0}^\infty \frac{1}{(i+a_1)^{j+1}} \left(-b_1\right)^j \varepsilon^j
       \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
       \frac{\Gamma(i+a_1+1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
\]

The order parameter is adjusted according to the prefactors of $\varepsilon$. Note that this formula might give rise to poles for $i+a_1=0$. These possible poles have to be dealt with at a higher level.

If $a_2 > 0$ we have

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
   = \sum\limits_{j=0}^\infty \frac{1}{(i+a_2-1)^{j+1}} \left(-b_2\right)^j \varepsilon^j
       \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
       \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2-1+b_2\varepsilon)}
\]

The order parameter is adjusted according to the prefactors of $\varepsilon$.

If $a_2 < 0$ we have

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
   = \left( i + a_2 + b_2 \varepsilon \right)
       \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
       \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+1+b_2\varepsilon)}
\]

The order parameter is adjusted according to the prefactors of $\varepsilon$.

The return type is either Zsum or basic_letter * Zsum. If $a_1 \ge 0 $ we do not get any poles.

If the index is an integer and the status flag not equal to no_eval_to_scalar, the object is evaluated explicitly.

◆ eval_explicit()

ex eval_explicit ( ) const
virtual

Explicit evaluation with the help of nestedsums_helper_expand_tgamma_fct.

◆ eval_ncmul()

ex eval_ncmul ( const GiNaC::exvector & v) const
overrideprotected

No automatic simplifications

◆ expansion_alert()

int expansion_alert ( void ) const

Returns 1 if $a_1$ or $a_2$ are not integers, and 0 otherwise.

◆ get_index()

ex get_index ( void ) const

Returns the index.

◆ increase_denominator()

ex increase_denominator ( int shift_order = 0) const
protected

Returns

\[
    \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
    \frac{\Gamma(i+a_1+b_1\varepsilon)}{\Gamma(i+a_2+1+b_2\varepsilon)}
 \]

The order variable is adjusted according to order = order + shift_order.

◆ increase_numerator()

ex increase_numerator ( int shift_order = 0) const
protected

Returns

\[
    \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
    \frac{\Gamma(i+a_1+1+b_1\varepsilon)}{\Gamma(i+a_2+b_2\varepsilon)}
 \]

The order variable is adjusted according to order = order + shift_order.

◆ index_eq_one()

ex index_eq_one ( void ) const

Returns the expansions of

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(a_1+1+b_1 \varepsilon)}{\Gamma(a_2+1+b_2 \varepsilon)}
\]

up to order + shift_order.

◆ pole_alert()

int pole_alert ( void ) const

Returns 1 if $a_1 < 0 $, and 0 otherwise.

◆ prefactor_decrease_denominator()

ex prefactor_decrease_denominator ( void ) const
protected

Returns

\[
   \sum\limits_{j=0}^\infty \frac{1}{(i+a_2-1)^{j+1}} \left(-b_2\right)^j \varepsilon^j
\]

◆ prefactor_decrease_numerator()

ex prefactor_decrease_numerator ( void ) const
protected

Returns

\[
    \left(i + a_1-1 \right) +b_1 \varepsilon  i^0
\]

◆ prefactor_increase_denominator()

ex prefactor_increase_denominator ( void ) const
protected

Returns

\[
   i + a_2 i^0 + b_2 \varepsilon i^0
\]

◆ prefactor_increase_numerator()

ex prefactor_increase_numerator ( void ) const
protected

Returns

\[
   \sum\limits_{j=0}^\infty \frac{1}{(i+a_1)^{j+1}} \left(-b_1\right)^j \varepsilon^j
\]

◆ set_expansion()

ex set_expansion ( void ) const

Sets the flag expansion_required. The object is then automatically expanded up to the order specified in the member variable order.

◆ set_expansion_parameter()

ex set_expansion_parameter ( const GiNaC::ex & new_eps) const

Sets the member variable expansion_parameter to new_eps.

◆ set_flag()

ex set_flag ( int new_flag) const

Sets the member variable flag_expand_status to new_flag

◆ set_index()

ex set_index ( const GiNaC::ex & new_index) const

Sets the member variable index to new_index.

◆ set_order()

ex set_order ( int new_order) const

Sets the member variable order to new_order.

◆ set_values()

ex set_values ( const GiNaC::ex & new_index,
const GiNaC::ex & new_eps,
int new_order,
int new_flag ) const

Sets the member variables index, expansion_parameter and order to new values.

◆ shift_index()

ex shift_index ( const GiNaC::ex & new_index) const

Returns a ratio_of_tgamma with

\[
   \Gamma(i + a + o + b \varepsilon )
\]

with $ o = j-i$, where $i$ is the new index and $j$ is the old index.

◆ shift_minus_one()

ex shift_minus_one ( void ) const

Returns

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1-1+b_1 \varepsilon)}{\Gamma(i+a_2-1+b_2 \varepsilon)}
\]

The order parameter is not changed.

◆ shift_plus_one()

ex shift_plus_one ( void ) const

Returns

\[
   \frac{\Gamma(1+b_2\varepsilon)}{\Gamma(1+b_1\varepsilon)}
   \frac{\Gamma(i+a_1+1+b_1 \varepsilon)}{\Gamma(i+a_2+1+b_2 \varepsilon)}
\]

The order parameter is not changed.


The documentation for this class was generated from the following files: