# Simplify using functional equations

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.

• have you tried using UpValues for g like g/:g[f[x_]]:=x and then simplifying?
– gpap
Feb 25 '14 at 15:45
• that works... Thanks Feb 25 '14 at 16:00
• 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. Feb 25 '14 at 16:50
• A generalized simplification function with assumptions can be found here mathematica.stackexchange.com/questions/42607/…. Feb 25 '14 at 17:00

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

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

x


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

g = InverseFunction[f];
f[g[x]]

x