probability density function for a random variable For a given probability density function $f(x)$, how do I find out the probability density function for say, 
$Y = x^2$?
$$f(x)=\begin{cases}cx&,0<x<2\\2c&,2<x<5\\0&,\text{otherwise}\end{cases}$$

This particular method for solving the problem is decently intuitive, but it freely abuses some notation of calculus.
In some non-rigorous sense, if we say that random variable $X$ has probability distribution $f(x)$, what we mean is that $Pr(X = x) = f(x) dx$.  If we want to define a new random variable $Y = g(X)$ (for your purposes, $g$ squares $X$), then we can write:
$$Pr(g^{-1}(Y) = x) = f(x)dx$$
$$Pr(Y = g(x)) = f(x) dx$$
Substitute $g^{-1}(g(x))$ for $x$:
$$Pr(Y = g(x)) = f(g^{-1}(g(x))) d(g^{-1}(g(x))$$
Let $a = g(x)$:
$$Pr(Y = a) = (f(g^{-1}(a))) (\frac{dg^{-1}(a)}{da}) da$$
Which means that the PDF for $Y$ (now written as a function of $y$) is the function $$f(g^{-1}(y))
(\frac{dg^{-1}(y)}{dy})$$
If $X$ was defined on $[a, b]$, then $Y$ is defined on $[g(a), g(b)]$.  Note that this works only if $g$ is monotonically increasing on $[a, b]$ (why?)!  Luckily, in your case - where $g$ is the squared function, and $X$ only takes positive values, this is true.
