I am studying the proof of the density function of the normal distribution. In one of the steps, the demonstration goes from
$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-(y^2 + x^2)/2}dydx$
to $\int_{0}^{\infty}\int_{0}^{2\pi} e^{-r²/2}rd\theta~dr$
The explanation is that the author changed variables to polar coordinates: $x = r\cos\theta$, $y = r\sin\theta$, and $dydx = rd\theta~dr$
My question is: how did it come to $dydx = rd\theta~dr$ ?
I tried the following:
$\frac{dx}{d\theta} = -r\sin\theta$
$\frac{dy}{dr} = \sin\theta$
$\frac{dx}{d\theta}\frac{dy}{dr} = -r\sin\theta \sin\theta = -r\sin^2\theta$
$dxdy = -r\sin^2\theta d\theta dr$
I do not know how to go from $-r\sin^2\theta d\theta dr$ to $rd\theta dr$.
Someone could help me to see where I am doing it wrongly?