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: 
Because the coefficients are palindromic (read the same backwards as forwards), whenever $x=a$ is a solution of the equation, so is $x=\frac 1a$.

Thus the roots will be $x=\pm 1$ (which are easily identified and factored out) or come in pairs which will give factors of the form $$(x-a)(x-\frac 1a)=x^2-(a+\frac 1a)x+1$$If we set this equal to $0$ and rearrange we get $x+\frac 1x=a+\frac 1a$, from which we see that if we substitute $y=x+\frac 1x$ these two factors become a linear factor in $y$. Once you have the value of $y$ it is a simple matter of solving a quadratic to find the roots of the original equation.

"The substitution works" is one justification, but I hope this gives an idea as to why it works.
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.