matlab - Tidy up expression after differentiating -
the equations working in problem contain exponentials. reason, after differentiating appear again pretty unchanged apart additional constants , other factors. wondering if might possible collect exponentials name of expression part of. here example:
given function definition
f:= x -> a*exp(b/x)
after differentiating, 1 get
a*exp(b/x)*(-b/x^2)
and great if somehow convert to
f(x)*(-b/x^2)
is possible mupad or other cas package?
it's easy in maple, use general substitution command algsubs
> f:= x -> a*exp(b/x) > g := diff(f(x), x) > algsubs(a*exp(b/x) = f, g)
for more complex expressions, try collect
Comments
Post a Comment