I'm solving an expression like so:

Solve[u[x] == u[a] + u[b], x]

Mathematica returns


If I now specify the function u more precisely, via

% /. {u[x_] -> x}

what I get is


i.e. Mathematica replaces the function but not its inverse. Is there any way of replacing the inverse appropriately as well?


1 Answer 1


You need to replace function u with your definition, not only the u[x] symbol. Defining u as a function solves the problem

Solve[u[x] == u[a] + u[b], x] /. {u -> Function[x, x]}
(* ==>  {{x -> a + b}} *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.