The output of the equation
Solve[f[x] - x^2 == 0, f[x]]
is:
{{f[x] -> x^2}}
I would like the output to be
{f -> Function[x, x^2]}
In this way I can evaluate, for example,
f'[x] /. Out[2]
with the desired result,
2x
Can this be done? Of course I have many equations of this form, and far longer... Thanks, Max
Solve[f[x] - x^2 == 0, f[x]][[1]] /. Rule[func_, expr_] :> Rule[Head[func], (Function @@ {List @@ func, expr})]
$\endgroup$DSolve
:DSolve`DSolveToPureFunction[{{f[x] -> x^2}}]
$\endgroup$