Question: I have the following question:
If $X$ is a continuous random variable that is uniformly distributed on the interval $(1,2)$ what is the distribution function of $Y=X+\frac{2}{X}?$\
I have tried to calculate the inverse of the function $f(x)=x+\frac{2}{x}$ but didn't manage to complete the calculation. Any ideas?

Answer: 
For all real $k$ we obtain:
$$x^4+x^3-10x^2+x+1=\left(x^2+\frac{1}{2}x+k\right)^2-\frac{1}{4}x^2-k^2-kx-2kx^2-10x^2+x+1=$$
$$=\left(x^2+\frac{1}{2}x+k\right)^2-\left(\left(2k+\frac{41}{4}\right)x^2+(k-1)x+k^2-1\right).$$
Thus, for $k=1$ we obtain:
$$x^4+x^3-10x^2+x+1=\left(x^2+\frac{1}{2}x+1\right)^2-\frac{49}{4}x^2=$$
$$=(x^2-3x+1)(x^2+4x+1).$$
Now, solve two quadratic equations.
The idea here is to find some change of variable which makes the equation easier to solve. We might have guesses as to what to change, but we know we were right only if it ends up working out.

Here, you might guess to substitute $t = x + \frac{1}{x}$ because there are four different powers of $x$ in the equation -- $x^2$, $x$, $x^{-1}$, and $x^{-2}$ -- and this substitution lets us combine $x$ and $x^{-1}$ into $t$, and hopefully $x^2$ and $x^{-2}$ into $t^2$, so that we'll only end up with two different powers of $t$, which is much easier to solve.

So let's try it and see how it works out.

From $t = x + \frac{1}{x}$ we compute $t^2 = (x + x^{-1})^2 = x^2 + x^{-2} +2$. So $x^2 + x^{-2} = t^2 - 2$. This is good because $x^2 + x^{-2}$ appears in our equation.

Our main equation is (rewritten to show where we will substitute):
$$ (x^2 + x^{-2}) + (x + x^{-1}) - 10 = 0 $$
(The $10$ is still there, we just won't substitute for it.) We now place our substitutions:
$$ (t^2 - 2) + (t) - 10 = 0$$
$$ t^2 + t - 12 = 0$$
And now we can proceed to solve for $t$.