Let's say I have a random variable $U \sim \operatorname{Uniform}[0,1]$ and I have another random variable $X = \dfrac{4}{1+U^2}$. I want to find the variance of $X$.
So far, I have tried to find the density function of $X$. I found $$f_X(x) = \dfrac{2}{x^2\sqrt{\frac{4}{x}-1}}$$ but then I don't know how to find the variance. I know the formula is $\operatorname{var}(X) = E[X^2] - E[X]^2$ but the integral to find $E[X^2]$ looks somewhat hard so I was wondering if there is an easier way.
For $2\le x\le 4,$ $$ \frac d {dx} \Pr(X\le x) = \frac d {dx} \Pr\left(U \ge \sqrt{\frac 4 x - 1\,} \,\, \right) = \frac d {dx} \left( 1 - \sqrt{\frac 4 x - 1\,\,} \,\, \right) = \frac{2}{x^2 \sqrt{\frac 4 x - 1}}. $$ So we agree about the density. But you don't need it: $$ \operatorname{E}(g(X)) = \int\limits_\text{domain} g(u) f_X(u) \,du. $$ So $$ \operatorname{E}\left( \frac 4 {1+U^2} \right) = \int_0^1 \frac 4 {1+u^2} \cdot 1 \,du = 4\arctan 1 - 4\arctan 0 = \pi. $$ \begin{align} \text{And } & \operatorname{E}\left( \left( \frac 4 {1+U^2} \right)^2 \right) \\[10pt] = {} & \int_0^1 \left( \frac 4 {1+u^2} \right)^2 \cdot 1\,du \\[10pt] = {} & \int_0^{\pi/4} (4\cos^2\theta)^2 \big( \sec^2\theta\,d\theta\big) \quad \text{where } u = \tan \theta \\[10pt] = {} & 16 \int_0^{\pi/4} \cos^2\theta\,d\theta = \cdots \end{align}