Subject: How to determine if an integral is unevaluated?
From: Stavros Macrakis
Date: Tue, 4 May 2004 09:14:42 -0400
If you want to check whether Maxima has returned an integral in closed
form, it's not enough to check if the top-level operator is
noun(integrate).
The most trivial example of this is integrate(-f(x),x), which returns
-'integrate(f(x),x). More interesting cases are
integrate(1/(x^7+1),x)
and
integrate(erf(x)/x^2,x)
which return expressions involving noun-form integrals, e.g.
2
/ - x
[ %E
2 I ------ dx
] x
/ ERF(x)
------------- - ------
SQRT(%PI) x
I don't think there's a standard function that will search an expression
for a given operator, so you can either write a little recursive routine
or do something simple but inefficient like
is( expr = subst('foobar,noun('integrate),expr) )
(untested).
-s