I am stuck with solving this problem:
Let $X$ be a continuous random variable with probability density function $f_X$. Then,
$$ f_X(x)=f_{X\mid X<0}(x)\cdot P(X<0)+f_{X\mid X\ge 0}(x)\cdot P(X\ge 0).$$
I supose it comes from the partition theorem (law of total probability for expectations),
$$E\left[X\right]=\sum_n E\left[X\mid B_n\right]\cdot P(B_n),$$
where $B_n$ is a partition of the sample space.
Moreover, I'm unacquainted with the conditional expectation of a random variable given an event. If we define it like
$$E\left[X\mid A\right]:=\begin{cases}\frac{E\left[X\,I_A\right]}{P(A)},& P(A)>0,\\0,&\text{otherwise}.\end{cases}$$
How to formally define $f_{X\mid A}$ from it?