I have a question.
\begin{equation} f_X(x) = \begin{cases} 1-x, &{0 \leq x \leq 1}\\ 1+x, &{-1 \leq x < 0}\\ 0 , &\text{otherwise}\\ \end{cases} \end{equation}
This is the given pdf and $Y=X^2$ given also. I need to find $\rho(x,y)$ (correlation coefficient) and also check if $X$ and $Y$ are independent or not. I can do these parts but I don't know how to find $f_Y(y)$ from given pdf.
Thanks.
You can derive $f_Y(y)$ by a simple transformation:
$$f_Y(y)=\left[\frac{1}{\sqrt{y}}-1 \right]\cdot\mathbb{1}_{(0;1]}(y)$$
...but this is not needed to solve your problem.
Obviously $(X;X^2)$ are not independent because one variable is expressed in function of the other one.
To calculate their correlation coefficient just use the definition
$$\mathbb{E}[XY]-\mathbb{E}[X]\cdot\mathbb{E}[Y]$$
$$\rho_{XY}=\frac{\mathbb{Cov}[XY]}{\sigma_X\cdot \sigma_Y}$$
any needed quantity can be calculated starting from $f_X(x)$ without deriving expressly $f_Y(y)$
This because any quantity can be expressed in
$$\mathbb{E}[X^n]=\int x^n f_X(x)dx$$
After easy calculations you will see that $\mathbb{Cov}[X;X^2]=0$ thus you have to show that, anyway, they are not independent.
To show that these rv's are not independent consider that an alternative definition of independence is, $\forall x,y$
$$f(y|x)=f(y)$$
now consider that, $X \in[-1;1]$ and $Y \in(0;1]$ but when, for example, $|X|<0.5$ also $(Y|X)$ support changes thus, i.e.
$$\mathbb{P}[Y>0.5||X|<0.5]=0$$
which is different from
$$\mathbb{P}[Y>0.5]$$
that is positive. This is a clear contradiction w.r.t. definition of independence
In other words, the occurrence of $Y$ strictly depends on what happens in $X$