Ask Your Question
0

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

asked 2012-11-28 00:34:06 +0100

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()?

taylor(maxima.airy_ai(x),x,0,4)

-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)

taylor(sage.functions.special.airy_ai(x),x,0,4)

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
1

answered 2012-11-28 08:17:08 +0100

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

Comments

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 11:12:31 +0100 )edit
1

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 13:13:36 +0100 )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

Stats

Asked: 2012-11-28 00:34:06 +0100

Seen: 269 times

Last updated: Nov 28 '12