I'm studying theoretical probability theory. Let $(\Omega,\Sigma,P)$ be a probability space. $X:\Omega\to\Bbb R$ be a random variable. Suppose the probability density function $f$ of $X$ exists.
If the definition of expectation is $\Bbb E[X]:=\int_{\Omega}X\,dP$. I want to prove that $\Bbb E(X)=\int_{\Bbb R}xf(x)\,d\lambda$, where $\lambda$ is the Lebesgue measure in $\Bbb R$.
My attempt:
$$\Bbb E[X]:=\int_{\Omega}X\,dP=\int_{\Omega}\text{id}\circ X\,dP=\int_{X(\Omega)}\text{id}\,dP_X,$$ where the last equality came from Lebesgue change-of-variable formula in abstract settings (i.e, $\Omega$ is not necessarily required to be $\Bbb R^n$; an abstract measure space is fine), and $P_X$ is the push-forward measure of $P$.
Next, by Radon-Nikodym Theorem we know that $P_X(A)=\int_Af\,d\lambda$ for every Borel set $A$ in $\Bbb R$. Then how can I run to the next and final step that $$\int_{X(\Omega)}\text{id}\,dP_X=\int_{\Bbb R}xf(x)\,d\lambda?$$
I guess it would be quite easy; however, I haven't studied real analysis for a while, so I was not able to figure out. And on the other hand, is my self-attempted proof correct? Could it be more simpler?