Hi all,
I am taking the derivative with respect to a variable, let's call it x, of a complicated expression, let's call it y. A lot of y' can be rewritten in terms of y. In a very simple case, y = exp(x) => y' = exp(x) = y
When I take diff(y,x), obviously I get exp(x)
Is there a way for me to automatically re-write my answer in terms of y? Something along the lines of expr.rewrite(func) ? It's trivial to do it manually in this case, but for more complicated expressions it would be really neat to be able to automate this