<s>[INST] Finding the expected value of $\dfrac{X}{Y}$ Below is a problem I did. I believe I did it correctly and I am hoping that somebody here can either confirm that I did it right or tell me where I went wrong.
Problem:
Let $X$ be a random variable that is uniformly distributed on the interval $[1,2]$. Let $Y$ be a random variable that is uniformly distributed on the interval $[1,2]$. Assuming that $X$ and $Y$ are independent, what is
$E\left( \dfrac{X}{Y}\right) $?
Answer:
The density function of $X$ and $Y$ is the same. It is:
$$ f(x) = \begin{cases}
 1 & \text{for } 1 \leq x \leq 2 \\
 0 & \text{otherwise}
\end{cases} $$
\begin{align*}
E\left(  \dfrac{X}{Y} \right)  &= \int_1^2 \int_1^2 \dfrac{x}{y} \,\, dy \, dx \\
E\left(  \dfrac{X}{Y} \right)  &= \int_1^2 x \ln (y) \Big|_1^2 \,\, dy \, dx \\
E\left(  \dfrac{X}{Y} \right)  &= \int_1^2 x \ln (2) - x \ln (1) \, dx \\
E\left(  \dfrac{X}{Y} \right)  &= \int_1^2 \ln (2) \, x \, dx \\
E\left(  \dfrac{X}{Y} \right)  &= \dfrac{ \ln (2) \, x^2}{2} \Big|_1^2 \\
E\left(  \dfrac{X}{Y} \right)  &= \dfrac{ 4 \ln (2) }{2} - \dfrac{ \ln (2) }{2} \\
E\left(  \dfrac{X}{Y} \right)  &= \dfrac{ 3 \ln (2) }{2} \\
E\left(  \dfrac{X}{Y} \right)  &\doteq 1.0397208 \\
\end{align*}
 [/INST] Your answer looks perfect to me! I did a quick numerical simulation and it agrees with you.
>> b = 1 + rand(1000000,1);
>> a = 1 + rand(1000000,1);
>> mean(a./b)

ans =

    1.0396

</s>