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.
Another technique worth considering is that on the real field you can theoretically factor polynomials into polynomials of degree at most $2$.

[Can all real polynomials be factored into quadratic and linear factors?](https://math.stackexchange.com/questions/1041908/can-all-real-polynomials-be-factored-into-quadratic-and-linear-factors)

When the coefficients are favourable, like in the present case the coefficients of $x^4$ and $x^0$ are both $1$, we can restrict our search for $$\begin{align}x^4+x^3-10x^2+x+1&=(x^2+ax+1)(x^2+bx+1)\\&=x^4+(a+b)x^3+(ab+2)x^2+(a+b)x+1\end{align}$$

Identifying the coefficients gives $\begin{cases}a+b=1\\ab+2=-10\end{cases}\iff a,b=-3,4$

And we are left with two quadratics we are able to solve.

---

*Now we will see how this method relates to the suggested substitution $t=x+\frac 1x$*

$f(x)=x^4+x^3−10x^2+x+1$

We can notice that $f(\frac 1x)=\frac 1{x^4}+\frac 1{x^3}-\frac{10}{x^2}+\frac 1x+1=\dfrac{f(x)}{x^4}$ 

So since $f(0)\neq 0$, if $r$ is root of $f(x)=0$ then $\frac 1r$ is a root as well.

It means we can factor 

$\begin{align}f(x) 
&=(x-a)(x-\frac 1a)(x-b)(x-\frac 1b)\\
&=\left(x^2-(a+\frac 1a)x+1\right)\left(x^2-(b+\frac 1b)x+1\right)\\
&=(x^2-t\_ax+1)(x^2-t\_bx+1)
\end{align}$

With the substitution $t\_a=a+\frac 1a$ and $t\_b=b+\frac 1b$, this is exactly what we solved in the first method.