# no Plot showed for an Inverse function

The short code is below, but no plot is produced. Are there any errors in my code? Thanks!

f[x_] = x + 2^(1/3)*x^(4/3);

g[x_] := InverseFunction[Composition[f, f]][x]

k[x_] := x^(1/3)*g'[x]/g[1]

Plot[Evaluate@k[x], {x, 0, 1}, WorkingPrecision -> 15]

• k[x] is complex. Use Plot[Evaluate@ReIm@k[x], {x, 0, 1}, WorkingPrecision -> 15] instead. – Carl Woll Jan 17 '18 at 18:59

Your problem is that InverseFunction is choosing the "wrong" branch for the inverse. To account for this, you can use ConditionalExpression to pick the branch used by InverseFunction. For your example:

f[x_] := x + 2^(1/3) x^(4/3)
if = InverseFunction[ConditionalExpression[f[#], #>0]&]


Rather than finding the inverse of Composition[f, f], it will be easier for Mathematica to use Composition[if, if]. So:

g = Composition[if, if];


Now, unfortunately, there is an issue when using Derivative on the above Composition object, so I will use the following workaround to obtain g':

gp = (Composition[h, h]') /. h -> if;


Let's do a couple quick numerical checks:

(* inverse check *)
Composition[f, f][g[1.]]


1.

(* derivative check *)
gp[1.]
10^6 (g[1. + 10^-6] - g[1.])


0.20484

0.20484

Looks good. Now, we can define k:

k[x_] := x^(1/3) gp[x]/g[1]


Finally, a plot:

Plot[k[x], {x, 0, 1}, PlotRange->All]


• Thanks a lot, Carl! But I have one question about 'gp = (Composition[h, h]') /. h -> if; ' what is 'h'? how it comes from? sorry I am a beginner. – yewfeng so Jan 17 '18 at 23:39
• @yewfengso Mathematica chokes on Composition[if, if]', so as a workaround, I introduce the dummy variable h, and do Composition[h, h]' (which is shorthand for Derivative[1][Composition[h, h]]), and then substitute if for h. – Carl Woll Jan 18 '18 at 0:09
• Thanks for your great help! Carl! – yewfeng so Jan 18 '18 at 3:47
• I am still confused about the code, since I change it slightly, removing $x^{1/3}$ from k(x), but got a wired result, see below. can you take a look? Thanks! – yewfeng so Jan 18 '18 at 14:43

if I change the code slightly, like below in the pic, k(1)=0, but it is not actually, since the $k(x)=\frac{(f^{-1}\circ f^{-1})'(x)}{f^{-1}\circ f^{-1}(1)}>0, x\in[0,1]$.

f[x_] := x + 2^(1/3) x^(4/3)

if = InverseFunction[ConditionalExpression[f[#], # > 0] &]

g = Composition[if, if];

gp = (Composition[h, h]') /. h -> if;

k[x_] := gp[x]/g1

Plot[k[x], {x, 0, 1}, PlotRange -> All]