Suppose I have a random variable $X$ and I know its PDF $p_X$. The goal is to find the corresponding $p_Z$ of the random variable $Z=f(X)$. For now, $f$ is any Borel measurable function. I'm trying to obtain and add the correct hypotheses on $f$ as I go along.
By definition $p_Z=\frac{\mathrm{d}F_Z}{\mathrm{d}z}$, where $F_Z$ is the CDF of $Z$. Given a probability space $(\Omega, \mathfrak{F}, \mathrm{P})$, $F_Z$ is such that $F_Z(A\subseteq\Omega):=\mathrm{P}[Z\in A]$ for each subset $A$.
Now, here comes the first step. $$ \mathrm{P}[Z\in A]=\mathrm{P}[X\in f^{-1}(A)] $$
We hence have to require that $f(x)$ is invertible for every $x$ whose image falls in $A$.
$$\tag{1} p_Z(z)=\frac{\mathrm{d}F_Z}{\mathrm{d}z}= \frac{\mathrm{d}}{\mathrm{d}z}\int_{f^{-1}(A)}p_X(x)\,\mathrm{d}x = \frac{\mathrm{d}}{\mathrm{d}z}\int_{f^{-1}(z_1)}^{f^{-1}(z_2)}p_X(x)\,\mathrm{d}x $$
where I have assumed that $A$ is an interval of the form $[z_1,z_2]$ (otherwise I don't know how to go on). Using Leibniz integral rule, the previous is equal to: \begin{equation} \tag{2} p_X(f^{-1}(z_2)){\frac{\mathrm{d}}{\mathrm{d}z}}f^{-1}(z)\bigg\vert_{z_2}-p_X(f^{-1}(z_1)){\frac{\mathrm{d}}{\mathrm{d}z}}f^{-1}(z)\bigg\vert_{z_1} \end{equation} now we have the additional requirement for $f$ to be differentiable, since $$ \frac{\mathrm{d}f^{-1}}{\mathrm{d}z}=\frac{1}{{\mathrm{d}}f/{\mathrm{d}x}}. $$ In theory, I should also require that the derivative is non-zero, but I think this is automatically true since every continuous (continuity implied by differentiability) and injective function (injective because it's invertible) is strictly monotone.
So, differentiability and injectivity. Are there other conditions? Can we generalize formula $(2)$ when $A$ is not simply an interval?