PDF for a transformed variable Let $Y$ have the probability density  $f_Y(x)$ and let $X$ have the PDF $f_X(x)$. $X$ and $Y$ are continuous and independent from each other. If $f_Y$ and $f_X$ are known and $Z=g(X,Y)$ where $g$ is known;
How can one derive the PDF for $Z$, $f_z$?
If the general case is difficult to show, then let $g(x,y)=x+y$ for simplicity so $Z=X+Y$
 A: Let $Z = X+Y$. Then, for any fixed value of $z$,
$$F_Z(z) = P\{Z \leq z\} = P\{X+Y \leq z\}
= \int_{-\infty}^{\infty}\left[ \int_{-\infty}^{z-x}
f_{X,Y}(x,y)\,\mathrm dy\right]\,\mathrm dx$$ 
and so, using the rule for differentiating under the integral sign 
(see the comments following this answer over on math.SE
if you have forgotten this)
$$\begin{align*}
f_Z(z) &= \frac{\partial}{\partial z}F_Z(z)\\
&= \frac{\partial}{\partial z}\int_{-\infty}^{\infty}\left[ \int_{-\infty}^{z-x}
f_{X,Y}(x,y)\,\mathrm dy\right] \,\mathrm dx\\
&= \int_{-\infty}^{\infty}\frac{\partial}{\partial z}\left[ \int_{-\infty}^{z-x}
f_{X,Y}(x,y)\,\mathrm dy\right]\,\mathrm dx\\
&= \int_{-\infty}^{\infty}
f_{X,Y}(x,z-x)\,\mathrm dx
\end{align*}$$
When $X$ and $Y$ are independent random variables, the joint density
is the product of the marginal densities and we get the convolution
formula
$$f_{X+Y}(z) = \int_{-\infty}^{\infty}
f_{X}(x)f_Y(z-x)\,\mathrm dx ~~ \text{for independent random variables} 
~X~\text{and}~Y.$$
A: This is a common question in basic probability. To get more details, look up Jacobian, convolution etc. Otherwise, for your question this is the answer. You can see the proof here
If $Z=X+y$, then $f_Z(z)=\int_{-\inf}^{\inf} f_X(z-y)f_Y(y) dy$
For a general $g$ it becomes a bit more complicated as you would have to simplify the following: 
$ f_Z(z) = \frac{\delta}{\delta z } F_Z(z)= \frac{\delta}{\delta z } \left[\int_{\mathbb{R}^2 \cap \{(x,y): g(x,y)\leq z\}} f_X(x) f_Y(y) dydx \right]$ 
[Note that integral gives you the CDF of $Z$ and you would need to differentiate $F_Z$ to get $f_Z$]
