Distribution of $X+\frac{2}{X}$ when $X\sim\mathcal U(1,2)$ 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?
 A: First note that $2\sqrt 2<Y<3$
$$\Pr(Y=X+{2\over X}<y)=\Pr(X^2-Xy+2<0)=\Pr({{y-\sqrt {y^2-8}}\over{2}}<X<{{y+\sqrt {y^2-8}}\over{2}})$$
Take $F_X(x)$ as CDF of X then:
$$F_Y(y)=F_X({{y+\sqrt {y^2-8}}\over{2}})-F_x({{y-\sqrt {y^2-8}}\over{2}})$$
where $F_X(x)=x$ for $1\le x\le2$ and zero elsewhere. Also for $2\sqrt 2<Y<3$ we have:
$$\sqrt 2\le{{y+\sqrt {y^2-8}}\over{2}}\le 2$$ and $$1\le{{y-\sqrt {y^2-8}}\over{2}}\le \sqrt 2$$
therefore
$$F_Y(y)=F_X({{y+\sqrt {y^2-8}}\over{2}})-F_x({{y-\sqrt {y^2-8}}\over{2}})={{y+\sqrt {y^2-8}}\over{2}}-{{y-\sqrt {y^2-8}}\over{2}}=\sqrt {y^2-8},\qquad2\sqrt 2<Y<3$$
and probability density function can easily be calculated as below:
$$f_Y(y)={{y}\over{\sqrt {y^2-8}}}\qquad 2\sqrt 2<Y<3$$
A: The function $x\mapsto x + \frac 2 x$ has a minimum point at $x=\sqrt 2,$ which is within the interval $(1,2),$ so it doesn't have an inverse on that interval. That makes things a bit more complicated. One thing that will make things simpler is that when $x={}$either $1$ or $2$ then $x+ \frac 2 x=3,$ i.e. it's the same at both endpoints.
Let $y = x+ \frac 2 x.$ Then $xy = x^2 + 2,$ or $x^2 - yx + 2 = 0,$ and that is a quadratic equation that can be solved for $x{:}$
$$
x = \frac {y \pm \sqrt{y^2 - 8}} 2.
$$
Since $x\mapsto x+ \frac 2 x$ is a curve that opens upward, you have $y\le{}$some specified number if $x$ is between two numbers.
Thus $Y\le y$ precisely if $\dfrac {y - \sqrt{y^2-8}} 2\le X\le\dfrac{y+\sqrt{y^2-8}} 2.$
The probability assoicated with that interval is the difference -- the larger one minus the smaller one. Thus the probability is $\sqrt{y^2-8}.$
This works for $2\sqrt 2 \le y\le 3,$ since those are the smallest and biggest values of $y$ when $1<x<2.$
