We have random variable X with density function: $f(x) = 1/2$ if $0<x\le1$ and $f(x) = 1/(2x^2)$ if x>1 (0 otherwise). We want to find the PDF of $Y=1/X$. Call it $f_Y$
If $y<0$, then $f_Y(y) = 0$. If y between 0 and 1, then 1/y is greater than 0, and so we must look at both parts of the pdf of X. For the first part, we simply get 1/2. For the second part (when x>1), we can use the fact thT 1/x is differentiable and its derivative is always negative for x>1 to get $$f_Y(y) = f_X(g^{-1}(y))|dg^{-1}(y)/dy| = 1/2$$
Thus putting this together we get $f_Y = 1/2+1/2 =1 $ if $0<y\leq1$. and 0 otherwise however, this is not a proper CDF. What am I missing?
$f_Y(y)=1$ for $0<y<1$ and $0$ for $y>1$ is surely a proper density function because it is non-negative and integrates to $1$.