If the random variable $X$ has pdf
$$ f(x) = \frac{x-1}{2}, 1<x<3 $$
find a monotone function $g(x)$ such that the random variable $Y=g(X)$ has a uniform(0,1) distribution.
I know $Y = g(X) \iff P(Y<y) = P(X < g(x))$. So (supposing without loss of generality that g is increasing) we have $F_Y(y) = F_X(g^{-1}(X))$. $F_Y(y) = y$, and $F_X(g^{-1}(x)) = \int_1^{g^{-1}(x)} f_X(t)dt$.
But then I take the integral and get $y=$ an expression with $(g^{-1}(x))^2$ in it and I don't know what to do.
I'm not sure if I'm messing up the integral or something more fundamental's going wrong. Is this a path to the solution? If so, how to finish? Is there a better path?
Hint: If $X$ has the CDF $F(x)$, then $F(X)\sim \text{Uniform}(0,1)$. Also, $F$ is increasing.
This is used in simulation to generate a random variable from a standard uniform random variable (rand).
Proof: Obviously $0<F(X)<1$ and $P(F(X)\le t)=P(X\le F^{-1}(t))=F(F^{-1}(t))=t$, for $0<t<1$
In your case:
$$F(x)=\int_1^x f(x)dx=\frac{(x-1)^2}{4}$$
And the good thing with this method that it works for a general distribution.