Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6029 > unrolled thread

Simple question about inverse of a function

Started byMikael <mikaen.anderson.1969@gmail.com>
First post2011-10-30 09:28 +0000
Last post2011-11-01 05:00 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Simple question about inverse of a function Mikael <mikaen.anderson.1969@gmail.com> - 2011-10-30 09:28 +0000
    Re: Simple question about inverse of a function Simon <simonjtyler@gmail.com> - 2011-10-31 12:00 +0000
    Re: Simple question about inverse of a function A Retey <awnl@gmx-topmail.de> - 2011-11-01 05:00 +0000

#6029 — Simple question about inverse of a function

FromMikael <mikaen.anderson.1969@gmail.com>
Date2011-10-30 09:28 +0000
SubjectSimple question about inverse of a function
Message-ID<j8j5ci$f6v$1@smc.vnet.net>
I have a simple question on how to calculate the inverse of a a function. This is the function I define:

f[t_] := (1 - t)^theta

To calculate the inverse I write:

Assuming[t >= 0 && t <= 1 && theta >= 1 && theta < Infinity, { InverseFunction[f[t]]}]

but the answer I get is

{InverseFunction[(1 - t)^theta]}.

Now I know I can do this:

In[11]:= Solve[f[g[x]]==x,g[x]]
Out[11]= {{g[x]->1-x^(1/theta)}}

but I wonder what is the correct way of specifying assumptions on t and theta to make the InverseFunction work. Thanks.

[toc] | [next] | [standalone]


#6071

FromSimon <simonjtyler@gmail.com>
Date2011-10-31 12:00 +0000
Message-ID<j8m2kq$s0b$1@smc.vnet.net>
In reply to#6029
Inverse functions works on functions, not on the function evaluated at some point. So you want

f[t_] := (1 - t)^theta
finv = InverseFunction[f]
(* Returns: 1 - #1^(1/theta) & *)

InverseFunction does not check the possible branch structure of the function, so for non-built-in it gives the warning "Inverse functions are being used. Values may be lost for multivalued inverses."

You can check that things are ok using Reduce, or in your case

FullSimplify[f[finv[t]] == t, theta >= 1]
(* Returns: True *)

[toc] | [prev] | [next] | [standalone]


#6086

FromA Retey <awnl@gmx-topmail.de>
Date2011-11-01 05:00 +0000
Message-ID<j8nue8$ea8$1@smc.vnet.net>
In reply to#6029
Hi,

> I have a simple question on how to calculate the inverse of a a function. This is the function I define:
>
> f[t_] := (1 - t)^theta
>
> To calculate the inverse I write:
>
> Assuming[t>= 0&&  t<= 1&&  theta>= 1&&  theta<  Infinity, { InverseFunction[f[t]]}]
>
> but the answer I get is
>
> {InverseFunction[(1 - t)^theta]}.
>
> Now I know I can do this:
>
> In[11]:= Solve[f[g[x]]==x,g[x]]
> Out[11]= {{g[x]->1-x^(1/theta)}}
>
> but I wonder what is the correct way of specifying assumptions on t and theta to make the InverseFunction work. Thanks.
>
It has nothing to do with the assumptions, you just should not specify 
the argument. This will do what you want:

finv = InverseFunction[f]

it will warn about multivalued inverses, and I don't think you can avoid 
that warning with appropriate assumptions for theta in that case. Of 
course you can use Quiet to suppress it, but then you should be sure 
that everything is alright for your use cases...

hth,

albert

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web