Additionally, you might like to try the function gatherargs. This function is in an optional package opsubst.
To load opsubst, the name must be in quotes (Mea culpa)
(%i36) load("opsubst")$
Examples:
(%i37) gatherargs('diff(f,x) + x * diff(f(x,t),x,1,t,1),'diff);
(%o37) [[f,x,1],[f(x,t),t,1,x,1]]
(%i38) gatherargs(integrate(g(s),s,0,1) + '(integrate(f,x)) /(1 + integrate(f(x^2),x)), 'integrate);
(%o38) [[g(s),s,0,1],[f,x],[f(x^2),x]]
--Barton
________________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of J?rome Laurens [jerome.laurens at u-bourgogne.fr]
Sent: Tuesday, June 19, 2012 01:15
To: maxima at math.utexas.edu
Subject: Arguments of operatorp
Hi list,
operatorp documentation is very short even on the web.
It seems that the second argument or operatorp is a string aka the name of the operator
for example operatorp(a+b,"+") returns true
but I don't know how to recognize diff or integrate operators
for example operatorp(integrate(...),"integrate"), operatorp(diff(...),"diff'), operatorp(diff(...),"derivative") both return false.
Maybe this is intended behaviour but in that case, how would I walk an expression to find the integrate and diff operators ?
TIA
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima