Input:
f[x_] := Sqrt[x^2 + y^2]
f'[x]
Output:
x / Sqrt[x^2 + y^2]
How do I get Mathematica to replace the denominator by f[x] itself? (Note: this is a simple example of a more complicated differentiation problem, in which the function itself is complicated but shows up a lot in the derivative.)
That is, desired Output is:
x / f[x]
I tried
Simplify[f'[x], TransformationFunctions -> {f}]
but to no avail. Any help is appreciated!
f, it will not be possible to have it in the output as it would immediately auto-evaluate. If you typex / f[x]and press shift-enter, it'll also give youx / Sqrt[x^2 + y^2]- Szabolcs