       Re: Inverse function

• To: mathgroup at smc.vnet.net
• Subject: [mg99338] Re: [mg99301] Inverse function
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sun, 3 May 2009 05:21:22 -0400 (EDT)

```Clear[f];

f[x_] = 5/(2 - x);

Attributes[Function]

{HoldAll,Protected}

f /: InverseFunction[f] =
Function[x, Evaluate[y /. Solve[f[y] == x, y][] // Simplify]];

InverseFunction[f][x]

2 - 5/x

InverseFunction[f][f[x]]

x

f[InverseFunction[f][x]]

x

Inverse is a matrix operation. If you enter the reciprocal it will automatically transform to the desired form

(5/(2 - x))^-1

(2 - x)/5

Bob Hanlon

---- davef <davidfrick2003 at yahoo.com> wrote:

=============
I have two questions:

1. Is it possible to find the inveses function for one-to-one function in Mathematica 7?

For example the inverse of 5/(2-x) is 2-(5/x). I have tried Inverse and InverseFunction but I cannot produce the inverse function.

Can anyone explain how to get Mathematica to produce this result? (See attached output screenshot.)

2. Is it possible to change the format of the output for a recprical?

For example, instead of writing the output of Inverse[5/(2-x)] as (5/(2-x))^-1, can the output be set to produce (2-x)/5?

```

• Prev by Date: Re: Inverse function
• Next by Date: Re: Defining function with indexed variables
• Previous by thread: Re: Inverse function
• Next by thread: Re: Inverse function