Is it possible to simplify assuming a functional equation, for examlpe to use that one function, g, is the invers of another, f.

Simplify[g[f[x]], g[f[x_]] == x]

just returns g[f[x]], and similar for FullSimplify.

  • 3
    $\begingroup$ have you tried using UpValues for g like g/:g[f[x_]]:=x and then simplifying? $\endgroup$
    – gpap
    Feb 25, 2014 at 15:45
  • $\begingroup$ that works... Thanks $\endgroup$ Feb 25, 2014 at 16:00
  • $\begingroup$ One additional comment: why Simplify[g[f[x]], g[f[x_]] == x] doesn't work is because Assumptions does not in general support patterns, and also there is an ordering issue of variable names. If you do Simplify[g[f[x]], g[f[x]] == x[]], the replacement works. $\endgroup$
    – Yi Wang
    Feb 25, 2014 at 16:50
  • $\begingroup$ A generalized simplification function with assumptions can be found here mathematica.stackexchange.com/questions/42607/…. $\endgroup$
    – Yi Wang
    Feb 25, 2014 at 17:00

1 Answer 1


As it was pointed out in the comments, Assumptions does not work with Patterns, but ReplaceAll works:

g[f[x]] /. g[f[_]] -> x

On the other hand you can use InverseFunction because it can handle symbolic operations:

g = InverseFunction[f];

Your Answer

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

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