Package sage :: Package calculus :: Module calculus :: Class Function_polylog
[hide private]
[frames] | no frames]

Class Function_polylog

source code

                      object --+                        
                               |                        
structure.sage_object.SageObject --+                    
                                   |                    
           structure.element.Element --+                
                                       |                
         structure.element.ModuleElement --+            
                                           |            
               structure.element.RingElement --+        
                                               |        
                              SymbolicExpression --+    
                                                   |    
                                   PrimitiveFunction --+
                                                       |
                                                      Function_polylog


The polylog function $\text{Li}_n(z) = \sum_{k=1}^{\infty} z^k / k^n$.

INPUT:
    n -- object
    z -- object

EXAMPLES:
    sage: f = polylog(1,x)._operands[0]; f
    polylog(1)
    sage: type(f)
    <class 'sage.calculus.calculus.Function_polylog'>



Instance Methods [hide private]
 
__init__(self, n)
...
source code
 
_repr_(self, simplify=True)
File: sage/structure/element.pyx (starting at line 291)
source code
 
_repr_evaled_(self, args) source code
 
_maxima_init_(self)
Return string representation of this polylog function in Maxima.
source code
 
_maxima_init_evaled_(self, args) source code
 
index(self)
Return the index of this polylogarithm, i.e., if this is $\text{Li}_n(z)$, then this function returns $n$.
source code
 
_latex_(self)
Return Latex representation of this polylogarithm.
source code
 
_approx_(self, x)
Return real numerical approximation for this polylogarithm evaluated at $x$.
source code
 
_complex_approx_(self, x)
Return real numerical approximation for this polylogarithm evaluated at $x$.
source code

Inherited from PrimitiveFunction: __call__, number_of_arguments, plot, tex_needs_braces

Inherited from SymbolicExpression: __abs__, __cmp__, __eq__, __ge__, __gt__, __hash__, __int__, __le__, __long__, __lt__, __ne__, __nonzero__, __pow__, __str__, _add_, _axiom_init_, _complex_double_, _complex_mpfr_field_, _div_, _fast_float_, _gap_init_, _gp_init_, _integer_, _kash_init_, _macaulay2_init_, _magma_init_, _maple_init_, _mathematica_init_, _maxima_, _mpfr_, _mul_, _neg_, _octave_init_, _pari_init_, _polynomial_, _rational_, _real_double_, _real_rqdf_, _richcmp_, _singular_init_, _sub_, _sys_init_, arguments, coeff, coefficient, coefficients, coeffs, combine, conjugate, default_variable, denominator, derivative, diff, differentiate, display2d, exp_simplify, expand, expand_rational, expand_trig, factor, factor_list, find_maximum_on_interval, find_minimum_on_interval, find_root, full_simplify, function, gradient, hessian, imag, integral, integrate, inverse_laplace, laplace, limit, log_simplify, minpoly, n, nintegral, nintegrate, norm, numerator, numerical_approx, partial_fraction, poly, polynomial, power_series, radical_simplify, rational_expand, rational_simplify, real, roots, show, simplify, simplify_exp, simplify_full, simplify_log, simplify_radical, simplify_rational, simplify_trig, solve, subs, subs_expr, substitute, substitute_over_ring, taylor, trig_expand, trig_simplify, variables

Inherited from structure.element.RingElement: __div__, __idiv__, __imul__, __invert__, __mul__, __new__, __pos__, __rdiv__, __rmul__, __rpow__, __rtruediv__, __truediv__, _idiv_, _imul_, abs, additive_order, is_nilpotent, is_one, is_unit, multiplicative_order, order

Inherited from structure.element.ModuleElement: __add__, __iadd__, __isub__, __neg__, __radd__, __rsub__, __sub__, _iadd_, _ilmul_, _isub_, _lmul_, _rmul_

Inherited from structure.element.Element: __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring, category, is_zero, parent

Inherited from structure.sage_object.SageObject: __repr__, _axiom_, _gap_, _gp_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _macaulay2_, _magma_, _maple_, _mathematica_, _octave_, _pari_, _r_init_, _sage_, _singular_, db, dump, dumps, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, n)
(Constructor)

source code 

        
        

Overrides: PrimitiveFunction.__init__

_repr_(self, simplify=True)

source code 
File: sage/structure/element.pyx (starting at line 291)

Overrides: structure.element.Element._repr_
(inherited documentation)

_maxima_init_(self)

source code 

Return string representation of this polylog function in Maxima.

EXAMPLES:
    sage: polylog(1,x)._operands[0]._maxima_init_()
    'li[1]'
    sage: polylog(2,x)._operands[0]._maxima_init_()
    'li[2]'
    sage: polylog(3,x)._operands[0]._maxima_init_()
    'li[3]'
    sage: polylog(4,x)._operands[0]._maxima_init_()   
    'polylog(4)'

Overrides: SymbolicExpression._maxima_init_

index(self)

source code 

Return the index of this polylogarithm, i.e., if this is $\text{Li}_n(z)$, then
this function returns $n$.

EXAMPLES:
    sage: a = polylog(5,x); a
    polylog(5, x)
    sage: a._operands
    [polylog(5), x]
    sage: a._operands[0].index()
    5

_latex_(self)

source code 

Return Latex representation of this polylogarithm.

EXAMPLES:
    sage: polylog(5,x)._operands[0]._latex_()
    '\text{Li}_{5}'

_approx_(self, x)

source code 

Return real numerical approximation for this polylogarithm evaluated
at $x$.

EXAMPLES:
    sage: f = polylog(4,x)._operands[0]; f
    polylog(4)
    sage: f._approx_(1)
    1.0823232337111381
    sage: type(f._approx_(1))
    <type 'float'>

Overrides: PrimitiveFunction._approx_

_complex_approx_(self, x)

source code 

Return real numerical approximation for this polylogarithm
evaluated at $x$.

EXAMPLES:
    sage: a = pari('1+I')
    sage: CDF(a)
    1.0 + 1.0*I
    sage: complex(polylog(4,2))
    (2.4278628067547032-0.17437130002545306j)
    sage: polylog(4,x)._operands[0]._complex_approx_(2)
    (2.4278628067547032-0.17437130002545306j)

Overrides: PrimitiveFunction._complex_approx_