I'm trying to take a marginal pdf $f_{X'}(x')$, where $x'$ is the $x$-axis rotated an angle $\theta$.
What I've done is:
$$ \iint{f_{X,Y}(x,y)}\ dy\ dx= \int f_X(x)\ dx$$
Given that $dy\ dx = |\mathbf J|\ dy'\ dx'$, where $|\mathbf J|$ is the determinant of the Jacobian matrix:
$$\iint{f_{X,Y}(x,y)}\ dy\ dx= \iint{f_{X,Y}(x',y')}\ |\mathbf J|\ dy'\ dx'$$
Given that $|\mathbf J| = 1$, then:
$$\iint{f_{X,Y}(x',y')}\ dy'\ dx' = \int f_X(x)\ dx$$
Now, my question is if I have to differentiate the last equality by $x'$ to get $f_{X'}(x')$, like:
$$ {d\over dx'}{\iint{f_{X,Y}(x',y')}\ dy'\ dx'} = {d\over dx'} \int f_X(x)\ dx$$
$$ \int{f_{X,Y}(x',y')}\ dy' = {d\over dx'} \int f_X(x)\ dx $$
$$ {d\over dx'} \int f_X(x)\ dx = f_{X'}(x')$$
Is it the last equality correct? And then, if that is correct, Can I do follow?
$$ {d\over dx'} \int f_X(x)\ dx= {d\over dx'} \int f_X(x)\ (dx'\cos(\theta)+dy'\sin(\theta))$$
$$ = {d\over dx'} \int f_X(x)\cos(\theta)\ dx'+f_X(x)\sin(\theta)\ dy'$$
$$=f_X(x)\cos(\theta) + \sin(\theta)\int {\partial\over\partial x'}f_X(x)\ dy'$$
So:
$$ f_{X'}(x,y)=f_X(x)\cos(\theta) + \sin(\theta)\int {\partial\over\partial x'}f_X(x)\ dy'$$
EDIT:
After some reasoning, I tried another approach, but searched for the marginal pdf of a random radius $R$. First, this two integral have to be the same:
$$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{X,Y}(x,y)\ dy\ dx = \int_0^{\infty}\int_0^{2\pi}f_{X,Y}(r,\theta)r\ d\theta\ dr$$
Differentiate for $r$ to get the pdf $f_R(r)$:
$$ {d\over dr}\int_0^{\infty}\int_0^{2\pi}f_{X,Y}(r,\theta)r\ d\theta\ dr = \int_0^{2\pi}f_{X,Y}(r,\theta)r\ d\theta = f_R(r)$$
$$f_R(r) = {d\over dr}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{X,Y}(x,y)\ dy\ dx$$
$$= {d\over dr}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{X,Y}(x,y)\ dy\ dx = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}{\partial\over\partial r}f_{X,Y}(x,y)\ dy\ dx$$
$$ = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\nabla f_{X,Y}(x,y)\cdot {\partial\over\partial r}\langle x,y\rangle\ dy\ dx = f_R(x,y)$$
Is this second approach correct?
No. You cannot just substitute $x'$ for $x$, nor $y'$ for $y$, when changing variables. Use the same transformation used to obtain the Jacobian.
Since we are rotating: $$\begin{bmatrix}x'\\y'\end{bmatrix}=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}\\~\\\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}x'\\y'\end{bmatrix}$$
Therefore, the change of variables transformation yeilds: $$\iint_{D}{f_{X,Y}(x,y)}\ \mathrm dy\ \mathrm dx= \iint_{D'} {f_{X,Y}(x'\cos\theta+y'\sin\theta,y'\cos\theta-x'\sin\theta)}\ \lVert\mathbf J\rVert\ \mathrm dy'\ \mathrm dx'$$
Yesish, but also no. Clearly it is just:
$$f_{X'}(x')=\int_{\Bbb R}{f_{X,Y}(x'\cos\theta+y'\sin\theta,y'\cos\theta-x'\sin\theta)}\ \lVert\mathbf J\rVert\,\mathrm d y'$$
This is of course $$\dfrac{\partial~~}{\partial x'}\int_{-\infty}^{x'}\int_\Bbb R{f_{X,Y}(s\cos\theta+y'\sin\theta,y'\cos\theta-s\sin\theta)}\ \lVert\mathbf J(s,y')\rVert\,\mathrm d y'\,\mathrm d s$$
No, because of the same issue.
The transformation is: $x=r \cos\theta, y=r\sin\theta$, therefore changing variables gives:
$$\begin{align}f_{R,\Theta}(r,\theta) = f_{X,Y}(r\cos\theta, r\sin\theta)\begin{Vmatrix}\cos\theta & -r\sin\theta\\\sin\theta&r\cos\theta\end{Vmatrix}\end{align}\\f_R(r)=\int_0^{2\pi} f_{X,Y}(r\cos\theta, r\sin\theta)\cdot r\,\mathrm d \theta$$
Note: This is not the marginal distribution along the rotated $x$-axis, since it is the marginal distribution over distance from the origin.