Closed
Description
We're missing some conversions from Maxima. Like exponential integrals of various kinds.
sage: f(x) = e^(-x) * log(x+1)
sage: uu = integral(f,x,0,oo)
sage: uu
x |--> e*expintegral_e(1, 1)
See this ask.sagemath post for some details.
Current symbol conversion table
From sage.symbolic.pynac.symbol_table['maxima']
as of Sage-4.7
Maxima ---> Sage
%gamma ---> euler_gamma
%pi ---> pi
(1+sqrt(5))/2 ---> golden_ratio
acos ---> arccos
acosh ---> arccosh
acot ---> arccot
acoth ---> arccoth
acsc ---> arccsc
acsch ---> arccsch
asec ---> arcsec
asech ---> arcsech
asin ---> arcsin
asinh ---> arcsinh
atan ---> arctan
atan2 ---> arctan2
atanh ---> arctanh
binomial ---> binomial
brun ---> brun
catalan ---> catalan
ceiling ---> ceil
cos ---> cos
delta ---> dirac_delta
elliptic_e ---> elliptic_e
elliptic_ec ---> elliptic_ec
elliptic_eu ---> elliptic_eu
elliptic_f ---> elliptic_f
elliptic_kc ---> elliptic_kc
elliptic_pi ---> elliptic_pi
exp ---> exp
expintegral_e ---> En
factorial ---> factorial
gamma_incomplete ---> gamma
glaisher ---> glaisher
imagpart ---> imag_part
inf ---> +Infinity
infinity ---> Infinity
khinchin ---> khinchin
kron_delta ---> kronecker_delta
li[2] ---> dilog
log ---> log
log(2) ---> log2
mertens ---> mertens
minf ---> -Infinity
psi[0] ---> psi
realpart ---> real_part
signum ---> sgn
sin ---> sin
twinprime ---> twinprime
Summary of missing conversions
Special functions defined in Maxima
(http://maxima.sourceforge.net/docs/manual/en/maxima_16.html#SEC56)
bessel_j (index, expr) Bessel function, 1st kind
bessel_y (index, expr) Bessel function, 2nd kind
bessel_i (index, expr) Modified Bessel function, 1st kind
bessel_k (index, expr) Modified Bessel function, 2nd kind
- Notes: bessel_I, bessel_J, etc. are functions in Sage for numerical evaluation. There is also the
Bessel
class, but no conversions from Maxima's bessel_i etc. to Sage.
hankel_1 (v,z) Hankel function of the 1st kind
hankel_2 (v,z) Hankel function of the 2nd kind
struve_h (v,z) Struve H function
struve_l (v,z) Struve L function
- Notes: None of these functions are currently exposed at the top level in Sage. Evaluation is possible using mpmath.
assoc_legendre_p[v,u] (z) Legendre function of degree v and order u
assoc_legendre_q[v,u] (z) Legendre function, 2nd kind
- Notes: In Sage we have
legendre_P(n, x)
andlegendre_Q(n, x)
both described as Legendre functions. It's not clear to me how there are related to Maxima's versions since the number of arguments differs.
%f[p,q] ([], [], expr) Generalized Hypergeometric function
hypergeometric(l1, l2, z) Hypergeometric function
slommel
%m[u,k] (z) Whittaker function, 1st kind
%w[u,k] (z) Whittaker function, 2nd kind
- Notes:
hypergeometric(l1, l2, z)
needs a conversion to Sage'shypergeometric_U
. The others can be evaluated using mpmath.slommel
is presumably mpmath'slommels1()
orlommels2()
(or both?). This isn't well documented in Maxima.
expintegral_e (v,z) Exponential integral E
expintegral_e1 (z) Exponential integral E1
expintegral_ei (z) Exponential integral Ei
expintegral_li (z) Logarithmic integral Li
expintegral_si (z) Exponential integral Si
expintegral_ci (z) Exponential integral Ci
expintegral_shi (z) Exponential integral Shi
expintegral_chi (z) Exponential integral Chi
erfc (z) Complement of the erf function
- Notes: The exponential integral functions
expintegral_e1
andexpintegral_ei (z)
are calledexponential_integral_1
andEi
resp. in Sage. They both need conversions. The rest needBuiltinFunction
classes defined for them with evaluation handled by mpmath and the symbol table conversion added. Also,erfc
is callederror_fcn
, so also needs a conversion.
kelliptic (z) Complete elliptic integral of the first
kind (K)
parabolic_cylinder_d (v,z) Parabolic cylinder D function
- Notes:
kelliptic(z)
needs a conversion toelliptic_kc
in Sage andparabolic_cylinder_d (v,z)
does not seem to be exposed at top level. It can be evaluated by mpmath.
Apply to the Sage library:
- attachment: trac_11143-v2.5-rebased.4.patch
- attachment: trac-11143-ref.2.patch
- attachment: trac_11143-pynac-serials.patch
Depends on #13109
Component: symbolics
Keywords: ei Ei special function maxima sd32 sd40.5
Author: Benjamin Jones, Volker Braun
Reviewer: Burcin Erocal, Karl-Dieter Crisman, William Stein
Merged: sage-5.3.beta2
Issue created by migration from https://trac.sagemath.org/ticket/11143