# Finding the inverse of a function

I am to solve for $$r(\rho)$$ given the function,

 \[Rho]Asymp[r_,b_,q_] := 1/(1 - q) Gamma[1/(1 - q)]/Gamma[(q - 2)/(q - 1)] r Sqrt[1 - (b/r)^(1 - q)]


This can be solved in a straightforward way by converting this into a quadratic equation and use Solve to find for the root corresponding to $$r(\rho)$$ for every value of $$q$$. But I have difficulty implementing the InverseFunction to this problem. Can someone help me with this? Also i want to scan $$r(\rho)$$ for all values of $$q<1$$, how can I implement this by using a Module? Thank you

• Recommend that you change your definition to \[Rho]Asymp[r_, b_, q_] := 1/(1 - q) Gamma[1/(1 - q)]/Gamma[(q - 2)/(q - 1)] r Sqrt[ 1 - (b/r)^(1 - q)] // FullSimplify // Evaluate which will be simplified to Sqrt[1 - (b/r)^(1 - q)]*r – Bob Hanlon Jan 15 '19 at 15:55
• I did not see that. Thank you for pointing out. Is there an efficient way of getting $r(\rho)$? for all allowed values of $q$? – user583893 Jan 16 '19 at 2:35
• Have you tried using FullSimplify on your function? The gamma functions all disappear and I get ρ = r*Sqrt[1-(b/r)^(1-q)]. Doesn't solve your problem though. – Roman Jun 14 '19 at 9:13

Looking at the examples in the documentaion you could do the following:

g = InverseFunction[Function[{r,b,q},\[Rho]Asymp[r,b,q]],1,3]


which gives the inverse of \[Rho]Asymp[r,b,q], a function of 3 arguments, with respect to it's first argument r. Evaluation is then

g[1,2,3]
(*out:*) Sqrt


The function g may now be used as a usual function.

• What about symbolically? If i only specify, $b$ and $q$ – user583893 Jan 15 '19 at 7:43
• @user583893 sadly that doesn't work for this particular function and my suggested solution. – gothicVI Jan 15 '19 at 8:12