[math-fun] I nominate this for (Mathematica) Bug of the Year!
In[95]:= $Version Out[95]= "12.0.0 for Mac OS X x86 (64-bit) (February 25, 2019)" In[76]:= InverseFunction@InverseFunction // FunctionExpand Out[76]= InverseFunction[InverseFunction] Shouldn't this just be Identity? E.g., In[81]:= InverseFunction@InverseFunction@Tan Out[81]= Tan But In[82]:= (InverseFunction@InverseFunction)@Tan Out[82]= InverseFunction[InverseFunction][Tan] (Hang onto your hat:) In[83]:= %[\[Pi]/4] Out[83]= -2 (24 \[Pi] + ArcTan[4/\[Pi] + Sqrt[16 + \[Pi]^2]/\[Pi]]) !!! AKA (ries) Out[90]= -49 \[Pi] + ArcCos[4/Sqrt[16 + \[Pi]^2]] In[91]:= FullSimplify[% - %83] Out[91]= -(\[Pi]/2) - ArcTan[4/\[Pi]] + 2 ArcTan[(4 + Sqrt[16 + \[Pi]^2])/\[Pi]] Another bug! In[92]:= Sign@% During evaluation of In[92]:= N::meprec: Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating -(\[Pi]/2)-ArcTan[4/\[Pi]]+2 ArcTan[(4+Sqrt[16+Power[<<2>>]])/\[Pi]]. Out[92]= Sign[-(\[Pi]/2) - ArcTan[4/\[Pi]] + 2 ArcTan[(4 + Sqrt[16 + \[Pi]^2])/\[Pi]]] —Bill
On Mon, Jul 15, 2019 at 4:26 PM Bill Gosper <billgosper@gmail.com> wrote:
In[95]:= $Version
Out[95]= "12.0.0 for Mac OS X x86 (64-bit) (February 25, 2019)"
In[76]:= InverseFunction@InverseFunction // FunctionExpand
Out[76]= InverseFunction[InverseFunction]
Shouldn't this just be Identity? E.g.,
In[81]:= InverseFunction@InverseFunction@Tan
Out[81]= Tan
But In[82]:= (InverseFunction@InverseFunction)@Tan
Out[82]= InverseFunction[InverseFunction][Tan]
(Hang onto your hat:) In[83]:= %[\[Pi]/4]
Out[83]= -2 (24 \[Pi] + ArcTan[4/\[Pi] + Sqrt[16 + \[Pi]^2]/\[Pi]])
!!!
After consulting the American Psychiatric Association's *Diagnostic and Statistical Manual of Mental Disorders* (*DSM–5*), Julian says: This isn't a bug. InverseFunction[InverseFunction] shouldn't be Identity; it's the inverse of the operator which inverts a function, i.e. it takes f^-1 to f, i.e. it's InverseFunction—except not, because it has to handle non-uniqueness somewhat differently. Thus In[165]:= FullSimplify[Tan[InverseFunction[InverseFunction][Tan][π/4]]] Out[165]= π/4 What it chooses to do is weird, and I don't know why Plot[InverseFunction[InverseFunction][Tan][x] - ArcTan[x], {x, -10, 10}] looks how it does, but it's not strictly wrong. ------ Try this! It might be a portal to another reality! —rwg AKA (ries)
Out[90]= -49 \[Pi] + ArcCos[4/Sqrt[16 + \[Pi]^2]]
In[91]:= FullSimplify[% - %83]
Out[91]= -(\[Pi]/2) - ArcTan[4/\[Pi]] + 2 ArcTan[(4 + Sqrt[16 + \[Pi]^2])/\[Pi]]
Another bug!
In[92]:= Sign@%
During evaluation of In[92]:= N::meprec: Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating -(\[Pi]/2)-ArcTan[4/\[Pi]]+2 ArcTan[(4+Sqrt[16+Power[<<2>>]])/\[Pi]].
Out[92]= Sign[-(\[Pi]/2) - ArcTan[4/\[Pi]] + 2 ArcTan[(4 + Sqrt[16 + \[Pi]^2])/\[Pi]]] —Bill
participants (1)
-
Bill Gosper