# Finding the symbolic inverse of a function

Is there a way of inverting this function to obtain $$r(\rho)$$?

rho[r_, b0_, q_] :=
r (1 + (Sqrt[π]Gamma[1/(q - 1)])/((1 - q) Gamma[1/2 ((q + 1)/(q - 1))]) b0 /r + (1 + q)/(2 q) (b0/r)^(1 - q))


Note that $$q<0$$ and $$b0$$ is some positive constant.

The typical way to do this, is to use Solve or Reduce get r to one side of the equality. It seems like Mathematica cannot solve the equation, unfortunately:

Reduce[
{
rho == r (1 + (Sqrt[\[Pi]] Gamma[1/(q - 1)])/((1 - q) Gamma[1/2 ((q + 1)/(q - 1))]) b0/r + (1 + q)/(2 q) (b0/r)^(1 - q)),
q < 0,
b0 > 0
},
r
]


During evaluation of In[2]:= Reduce::nsmet: This system cannot be solved with the methods available to Reduce.

Out[2]= Reduce[{rho == r (1 + ((1 + q) (b0/r)^(1 - q))/(2 q) + ( b0 Sqrt[[Pi]] Gamma[1/(-1 + q)])/((1 - q) r Gamma[(1 + q)/(2 (-1 + q))])), q < 0, b0 > 0}, r]

• What if I specify the value for $q$ and $b0$? I tried it for $q=-2$ and $b0=1$ but I don't understand what Mathematica spit out. Feb 6, 2019 at 14:56
• It spits out Root objects, which are symbolic representations of the exact roots of polynomials. In this case, it gives roots of 3rd-degree polynomials, so you can use the option Cubics -> True in Reduce to expand them. Feb 6, 2019 at 15:38
• Both Solve and Reduce should give answers in terms of Root for integer values of q. Typically, there are no solutions otherwise. Feb 6, 2019 at 18:38