3
$\begingroup$

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.

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

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
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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