# InverseFunction of x^3 warning::ifun: Inverse functions are being used...

**URL:** <https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [January 23, 2022, 9:28am UTC](https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486 "2022-01-23T09:28:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gennaroarguzzi](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gennaroarguzzi](https://community.wolfram.com/u/gennaroarguzzi)\
**Post date:** [January 23, 2022, 9:28am UTC](https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486/1 "2022-01-23T09:28:31Z")

</div>

I’m trying to get the inverse function of x^3 by using InverseFunction. Can anyone explain the result please?  
I really didn’t get the meaning of the symbols # and & in this context.

I got the error: InverseFunction::ifun: Inverse functions are being used. Values may be lost for multivalued inverses.

```
f[x_] := x^3
InverseFunction[f]

```

 ![aaa.jpg](https://global.discourse-cdn.com/wolfram/original/2X/f/f9c950a0fdba02bdec38fc56cb5f310a1db38b19.jpeg)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [January 23, 2022, 4:00pm UTC](https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486/2 "2022-01-23T16:00:31Z")

</div>

It is not an error, but rather a warning that you are trying to inverte a function that is not invertible in the complex plane. If you wanted the inverse of `x^3` on the real line, the answer given by InverseFunction is wrong for negative inputs:

```
In[176]:= InverseFunction[Function[#^3]][-1.]

Out[176]= 0.5 + 0.866025 I

```

What you need is either `Solve[x^3 == y, x, Reals]` or `Surd[y, 3]`, but I don’t know a way to get those with `InverseFunction`, which is not sophisticated in this respect:

```
Solve[x^3 == y, x, Reals]
Plot[Root[-y + #1^3 &, 1], {y, -2, 2}]
Plot[Surd[y, 3], {y, -2, 2}]

```

---

<div class="post-metadata">

**Author:** ![gennaroarguzzi](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gennaroarguzzi](https://community.wolfram.com/u/gennaroarguzzi)\
**Post date:** [January 23, 2022, 5:32pm UTC](https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486/3 "2022-01-23T17:32:38Z")

</div>

Thank you very much [@Gianluca Gorni](https://community.wolfram.com/web/gianlucagorni) for your useful explanantion.

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [January 23, 2022, 8:07pm UTC](https://community.wolfram.com/t/inversefunction-of-x-3-warning-inverse-functions-are-being-used/19486/4 "2022-01-23T20:07:17Z")

</div>

Hi Gennaro,

Plotting the real and imaginary parts of the solutions is a nice way to visualize the problem.

```
SolveValues[x^3 == y, x] //
  Map[ReImPlot[#, {y, -2, 2},
       Frame -> True,
       PlotLabel -> Style[#, Black],
       PlotLabels -> "Expressions",
       ReImStyle -> {Automatic, Directive[Red, Dashing[{0.02, 0.01}]]},
       ImageSize -> Large] &] //
  Partition[#, UpTo@2] & //
  Grid[#,
   Frame -> All,
   Alignment -> Top,
   Spacings -> {1, 1}] &

```

 ![3414plot.png](https://global.discourse-cdn.com/wolfram/original/3X/b/9/b9b0c207fb7cdbbfa431930877b62ae45c7b01f3.png)
