3

How can I write the functional inverse of a function in maple to be used in calculations?

e.g.,

diff(f^(-1)(x),x) = 1/f'(f^(-1)(x))

when I use f^-1(x) or f^(-1)(x) I get the multiplicative inverse rather than the compositional inverse.

I would like the general form for arbitrary or specified functions. If f is not defined above it should return the general form. I'd like to be able to compute symbolic deratives for functions containing inverses without having to specify a specific function.

3 Answers3

3

You can get (some) support for this using the @@ operator, also known at the "repeated function composition operator". See its help page, eg on-line here.

restart;

expr:=f(x);
                    expr := f(x)

(f@@(-1))(f(x));
                         x

finv:=f@@(-1);
                              (-1)
                     finv := f

finv(f(x));
                          x

f(finv(x));
                         (-1)
                     f((f    )(x))

simplify(f(finv(x)));
                           x

It turns out that the diff and D commands know a bit of how to deal with it.

diff( finv(x), x );
                           1
                    ----------------
                           (-1)
                    D(f)((f    )(x))

D(finv)(x);
                            1
                     ----------------
                            (-1)
                     D(f)((f    )(x))

convert(%,diff);
                            1
                ---------------------------
                / d       \|
                |--- f(t1)||
                \dt1      /|       (-1)
                           |t1 = (f    )(x)

You may find the lprint command useful, to see the underlying 1D plaintext code structure of a result which pretty-prints in Maple's so-called 2D Math or 2D Output.

lprint( convert(D(finv)(x),diff) );

   1/eval(diff(f(t1),t1),{t1 = `@@`(f,-1)(x)})
acer
  • 5,293
2

As quoted from their site using $f(x)=\frac{x-2}{x-7}$ as an example (scroll to part C): https://www.maplesoft.com/applications/view.aspx?SID=4088&view=html

$$f := x -> (x-2)/(x-7);$$ $$\text{solve}( x = f(y), y );$$ $$g := \text{unapply }(\%, x);$$

2

There is no general, universal solution to compute the inverse function of a procedure in Maple. A couple of the other answers cover what you are able to do in some cases.

JP May
  • 270