Deriving a multivariate inverse function

In my math assignment I have to find the inverse of

$$f(x_1, x_2) = \left(\ln \left(\frac{x_2}{x_1}\right), x_1^2 + x_2^2\right)$$

Now I already have looked into this, and came up with the following:

I split f into $$f_1(x_1,x_2) = \ln \left(\frac{x_2}{x_1} \right)\\ \text{and} \\ f_2(x_1,x_2) = x_1^2+x_2^2$$

solving $$f_1$$ for $$x_2$$ resulted in $$e^{f_1} \cdot x_1 = x_2$$

and after using this $$x_2$$ in $$f_2$$ $$x_1 = \sqrt{\frac{f_2}{1+e^{2f_1}}}$$

which I then used in $$x_2$$ again and led to:

$$x_2 = e^{f_1} \cdot \sqrt{\frac {f_2}{1+e^{2f_1}}}$$

So according to what I have done the inverse should be:

$$f^{-1}(f_1, f_2) = \left( \sqrt{\frac{f_2}{1+e^{2f_1}}} \ ,\ e^{f_1} \cdot \sqrt{\frac {f_2}{1+e^{2f_1}}} \right)$$

But after looking at another example on this site, it appears to be wrong. So I'd like to ask whether this is wrong or not, and if it is where I made the mistakes.

• Should be $e^{2f_1}$, not $e^{2}f_1$, in the last occurrence near the bottom. Don't know if this was the mistake tho.. – Dzoooks May 14 at 22:32
• @Dzoooks You're right I'd missed a bracket. thank you – DoingItSideways May 14 at 22:34
• Looks fine to me, as long as you don't run into problems with the signs for the arguments of square root or logarithms – Andrei May 14 at 23:17

$$f^{-1}(f_1, f_2) = \left( \sqrt{\frac{f_2}{1+e^{2f_1}}} \ ,\ e^{f_1} \cdot \sqrt{\frac {f_2}{1+e^{2f_1}}} \right)$$