Ask Your Question

how to tell if a function is admissible as a 'symbolic' function

asked 2012-11-27 17:34:06 -0500

marco gravatar image

Sorry for the wording of the question. Functions in sage.functions.special, such as airy_ai, seem not to be true functions, e.g. you can't apply taylor() to them. On the other hand, maxima.airy_ai seems to be OK. How can I tell what "status" a function has, or whether I can pass it to operations such as taylor()?


-1/363^(2/3)x^4/gamma(1/3) + 1/183^(1/3)x^3/gamma(2/3) - 1/33^(2/3)x/gamma(1/3) + 1/3*3^(1/3)/gamma(2/3)


Traceback (click to the left of this block for traceback) ... TypeError: Cannot evaluate symbolic expression to a numeric value.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-11-28 01:17:08 -0500

kcrisman gravatar image
sage: type(airy_ai)
<type 'function'>
sage: type(gamma)
<type 'function'>
sage: type(sin)
<class 'sage.functions.trig.Function_sin'>
sage: type(log_gamma)
<class 'sage.functions.other.Function_log_gamma'>

Actually, this is somewhat misleading, since gamma uses

sage: type(sage.functions.other.gamma1)
<class 'sage.functions.other.Function_gamma'>

under the hood, but I hope you get the point.

See also Trac 12455 for this very issue - maybe you can help?

edit flag offensive delete link more


This helps but actually gives an even better example of my problem: sage: type(airy_ai); type(gamma) type 'function' type 'function' sage: taylor(gamma(x),x,1) -(x - 1)*euler_gamma + 1 sage: taylor(airy_ai(x),x,2) TypeError: Cannot evaluate symbolic expression to a numeric value.

marco gravatar imagemarco ( 2012-11-28 04:12:31 -0500 )edit

Right, that's because gamma is a special case, as I point out. But in general you shouldn't expect something of type `function` to have Taylor series.

kcrisman gravatar imagekcrisman ( 2012-11-28 06:13:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-11-27 17:34:06 -0500

Seen: 98 times

Last updated: Nov 28 '12