<s>[INST] Find the PDF of Y given Y=X(2-X) and X's PDF Suppose that the continuous random variable $X$ has probability density function
$f_X(x)=\begin{cases}\frac{1}{2}x & \text{if } 0<x<2\\0&\text{otherwise}\end{cases}$
Let $Y=X(2-X)$. Calculate $P(Y>y)$ and hence find the probability density function of $Y$.
So far I have tried expressing $P(Y>y)$ as $P(X(2-X)>y)$ but the quadratic inside has me stuck. Sorry - I am revising for an exam and it has been a long time since I have answered questions like this.
 [/INST] We complete the square. Note that $X(2-X)=2X-X^2=1-(X-1)^2$. Suppose that $0\le y\le 1$. Then
$$\Pr(X(2-X)\gt y)=\Pr(1-(X-1)^2\gt y)=\Pr((X-1)^2\lt 1-y)=\Pr\left(1-\sqrt{1-y}\le X\le 1+\sqrt{1-y}\right).$$
But between $0$ and $2$, the random variable $X$ has cdf $\frac{1}{4}x^2$. So
$$\Pr(X(2-X)\gt y)=\frac{1}{4}\left( (1+\sqrt{1-y})^2-(1-\sqrt{1-y})^2                    \right).$$
This simplifies to $\sqrt{1-y}$. The cdf of $Y$ is therefore $1-\sqrt{1-y}$ for $y$ between $0$ and $1$. (It is $0$ for $y\lt 0$, and $1$ for $y\gt 1$.)
Remark: Completing the square was not necessary, and may not be the best way, though I go to it by reflex.
The inequality $X(2-X)\gt y$ becomes with some manipulation $X^2-2X+y\lt 0$. That means that $X$ falls between the two roots of the quadratic equation $x^2-2x+y=0$. These two roots are $1-\sqrt{1-y}$ and $1+\sqrt{1-y}$.
</s>