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


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

Re: finding inverses of functions

From "djmpark" <djmpark@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: finding inverses of functions
Date 2012-05-10 09:03 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jog09i$g4d$1@smc.vnet.net> (permalink)
References <4767427.124602.1336550815297.JavaMail.root@m06>

Show all headers | View raw


An interesting problem. I'm going to take your "e" to be Exp. Let's define
the y function:

Clear[x, y];
y[x_] := 3 x^3 + 2 E^(2 x); 

The function looks to be monotonically increasing. 

Plot[y[x], {x, -2, 2}] 

And we can verify it. 

ForAll[x, D[y[x], x] > 0]
Resolve[%, Reals] 
...
True

We will solve a differential equation and need an initial condition:

y[0]
2

Write the inverse slope in terms of x[y] and solve the differential
equation.

Clear[x]
x'[y] == 1/(D[y[x], x] /. x -> x[y]);
xsol = DSolve[%, x, y][[1, 1]] 

x -> Function[{y}, InverseFunction[2 E^(2 #1) + 3 #1^3 &][y + C[1]]]

Solve the initial condition for C[1].

x[2] == 0 /. xsol;
Solve[%, C[1]][[1, 1]] 
C[1] -> 0 

We can now define the x function. It is in terms of an InverseFunction but
easily evaluable.

x[y_] = x[y] /. (xsol /. C[1] -> 0)
InverseFunction[2 E^(2 #1) + 3 #1^3 &][y] 

We can check numerically that the function is inverse, at least for small or
exact values of x.

x[y[x]] == x;
% /. x -> 10
True

(I wish I knew a method to show this symbolically.)

We can plot the y function, inverse x function and their composition to
check, at least numerically, the proper relation.

Show[
 {Plot[y[x], {x, -2, 2}, PlotStyle -> Black],
  Plot[x[y], {y, -20, 20}, PlotStyle -> Blue],
  Plot[y[x[z]], {z, -10, 10}, PlotStyle -> Red]},
 AspectRatio -> Automatic,
 PlotRange -> 10,
 Axes -> False,
 Frame -> True] 


David Park
djmpark@comcast.net 
http://home.comcast.net/~djmpark/index.html 


From: John Accardi [mailto:accardi@accardi.com] 

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.

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


Thread

Re: finding inverses of functions "djmpark" <djmpark@comcast.net> - 2012-05-10 09:03 +0000

csiph-web