Given $X\sim N(0,1)$ and $Y=|X-1|$. Find the PDF of $Y$.
I tried to discussed when $x>1$ and $x\le1$, but this gives me two different functions and I have no idea how to combine them.
However, when I tried to use the CDF method, i.e.find the CDF of $Y$, I got $F_Y (y)=\int_{1-y}^{1+y}f_X(x)$ where $f_X(x)$ is the PDF of $X$. Then I got stuck on solving the integral.
Observe that \begin{align} F_Y(y)&=P(|X-1|\leq y)\\&=P(1-y\leq X\leq1+y)\\&=F_X(y+1)-F_X(1-y).\end{align}
Differentiate both sides using the chain rule to get the result.