Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

InverseFunction returning working function or just a symbol

7 views
Skip to first unread message

László Sándor

unread,
May 18, 2012, 5:23:48 AM5/18/12
to
Hi all,
I am puzzled by the following behavior (focus on the end, the rest is only to provide context):

In[88]:= u[c_,l_]:=Log[c]-Log[1+l^(1+k)/(1+k)]
In[14]:= T[z_]:=(1-0.84/1.3) * z
In[103]:= umaxType[n_]:=MaxValue[{u[n l-T[n l],l],l>=0},l]
In[101]:= lType[n_]:=ArgMax[{u[n l-T[n l],l],l>=0},l]
In[105]:= zType[n_] := n lType[n]
In[111]:= Type := InverseFunction[zType]
In[134]:= Type[5345]
Out[134]= 5030.99
In[136]:= Type[2]
Out[136]= (zType^(-1))[2]
In[137]:= Type[4324424]
Out[137]= (zType^(-1))[4324424]

I understand that there could be many justified reasons why the inversion might not work for a specific argument. Still, I am deeply puzzled that sometimes I receive back a symbol that nothing else is able to do anything about (why not an error message, then?), sometimes a number. How could this be improved?

Thanks!

László Sándor

unread,
May 19, 2012, 5:49:39 AM5/19/12
to
Hi,
Sorry about this, I learnt this, but after I posted here already. I
posted the question on mathematica.SE too, with no confusing tags:
http://mathematica.stackexchange.com/questions/5691/inverse-function-not-working-but-providing-values-for-some-arguments-a-symbo

Thanks,

Laszlo

On Fri, May 18, 2012 at 9:47 AM, Murray Eisenberg <mur...@math.umass.edu> wrote:
> Please don't include all the In[...] and Out[...] labels, because they make
> it hard to copy and paste executable code into Mathematica.
> --
> Murray Eisenberg =C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =
=C2 =C2 mur...@math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower =C2 =C2 =C2 phone 413 549-1020 (H=
)
> University of Massachusetts =C2 =C2 =C2 =C2 =C2 =C2 =C2=
=C2 413 545-2859 (W)
> 710 North Pleasant Street =C2 =C2 =C2 =C2 =C2 =C2 fax =
=C2 413 545-1801
> Amherst, MA 01003-9305
>

Murray Eisenberg

unread,
May 19, 2012, 5:53:44 AM5/19/12
to
Please don't include all the In[...] and Out[...] labels, because they
make it hard to copy and paste executable code into Mathematica.

On 5/18/12 5:23 AM, L=E1szl=F3 S=E1ndor wrote:
> Hi all,
> I am puzzled by the following behavior (focus on the end, the rest is only to provide context):
>
> In[88]:== u[c_,l_]:==Log[c]-Log[1+l^(1+k)/(1+k)]
> In[14]:== T[z_]:==(1-0.84/1.3) * z
> In[103]:== umaxType[n_]:==MaxValue[{u[n l-T[n l],l],l>==0},l]
> In[101]:== lType[n_]:==ArgMax[{u[n l-T[n l],l],l>==0},l]
> In[105]:== zType[n_] :== n lType[n]
> In[111]:== Type :== InverseFunction[zType]
> In[134]:== Type[5345]
> Out[134]== 5030.99
> In[136]:== Type[2]
> Out[136]== (zType^(-1))[2]
> In[137]:== Type[4324424]
> Out[137]== (zType^(-1))[4324424]
>
> I understand that there could be many justified reasons why the inversion might not work for a specific argument. Still, I am deeply puzzled that so metimes I receive back a symbol that nothing else is able to do anything about (why not an error message, then?), sometimes a number. How could this be improved?
>
> Thanks!
>

--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

0 new messages