symbolic functions and expressions

asked 2022-05-24 19:26:51 +0100

cav_rt gravatar image

Suppose I have a huge expression involving symbolic variables and symbolic functions. Is there a way to get the symbolic functions involved in my expression? Something like .variables().

For example:

f(x) = function('f')(x)
h(x) = function('h')(x)
Y(l,m,x,y) = spherical_harmonic(l,m,x,y)
A = f(x)*x^2 + x^diff(h(x),x) + h(x)*Y(l,m,x,y)

A.desired_function() should return (f(x), h(x), diff(h(x),x), Y(l,m,x,y)). Or, at least (f(x), h(x), diff(h(x),x)). I was not able to find such function nor figure out a way build up one.

edit retag flag offensive close merge delete