3

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
    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 – Sune Jakobsen 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. – Yi Wang Feb 25 '14 at 16:50
  • A generalized simplification function with assumptions can be found here http://mathematica.stackexchange.com/questions/42607/simplify-equations-with-pattern-assumptions/42608#42608. – Yi Wang Feb 25 '14 at 17:00

1 Answers1

2

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
Kuba
  • 136,707
  • 13
  • 279
  • 740