Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

FWIW :

sage: th = var('th')
sage: f = function('f')(th)
sage: omega = function('omega')(th)
sage: eq = 2*pi*cos(th)*sin(th)*diff(omega,th,th)
sage: w0 = SR.wild(0)
sage: eq.subs([w0*sin(th)*cos(th)==w0*f])
2*pi*f(th)*diff(omega(th), th, th)

The use of a wildcard allows for partial substitution...

As for Maxima :

sage: f.maxima_methods().ratsubst(cos(th)*sin(th),eq)
2*pi*f(th)*diff(omega(th), th, th)

Also :

sage: maxima_calculus.lratsubst([cos(th)*sin(th)==f],eq)._sage_()
2*pi*f(th)*diff(omega(th), th, th)

HTH,