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


Groups > comp.soft-sys.math.mathematica > #10018

Re: finding inverses of functions

From Szabolcs Horvát <szhorvat@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: finding inverses of functions
Date 2012-05-10 09:02 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jog06m$g3f$1@smc.vnet.net> (permalink)
References <jod7lu$5f8$1@smc.vnet.net>

Show all headers | View raw


On 2012.05.09. 9:51, John Accardi wrote:
> Hello,  I am trying to get Mathematica to find the inverse of:
>
> y = 3x^3 + 2e^(2x)  (which I know is invertible)
>
> InverseFunction only seems to give inverses of built-ins, like Sine.
>
> I tried:
>
> Solve[ y == 3x^3 + 2e^(2x), x ] but get a message that Solve does not have methods suitable.  (Solve works for simpler functions, however.)
>
> Any ideas?  Thanks.
>

While it's easy to see that this function has an inverse on the set of 
reals, the inverse function might not be expressible using elementary 
functions.

This doesn't prevent Mathematica from being able to compute the inverse 
function to arbitrary precision at any point.

Let's write it as a pure function:

   f = Function[x, 3 x^3 + 2 E^(2 x)]

Note that Exp[1] is written as E, and not as e.

The inverse of this function is represented in Mathematica with

   if = InverseFunction[f]

Since you know that the inverse exists, you can use this confidently. 
You can evaluate it for machine numbers like this:

In[63]:= if[1.]
Out[63]= -0.305526

Or for exact numbers like this:

In[64]:= if[1]
Out[64]= Root[{-1 + 2 E^(2 #1) + 3 #1^3 &, 
-0.305526037783858835745318654576}]

Note that this is an exact result that can be evaluated to arbitrary 
precision:

In[65]:= N[%, 100]
Out[65]= 
-0.3055260377838588357453186545759642671712616849155334618731589419894350889720642702908817009965973507

I recommend reading this blog post:

http://blog.wolfram.com/2008/12/18/mathematica-7-johannes-kepler-and-transcendental-roots/

-- 
Szabolcs Horvát
Visit Mathematica.SE:  http://mathematica.stackexchange.com/

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

finding inverses of functions John Accardi <accardi@accardi.com> - 2012-05-09 07:51 +0000
  Re: finding inverses of functions Szabolcs Horvát <szhorvat@gmail.com> - 2012-05-10 09:02 +0000
  Re: finding inverses of functions Peter Breitfeld <phbrf@t-online.de> - 2012-05-10 08:56 +0000
  Re: finding inverses of functions A Retey <awnl@gmx-topmail.de> - 2012-05-10 08:56 +0000

csiph-web