How do I find the derivative of a definite integral in which the variable of differentiation is a limit in the integral? The derivative I would like to find is 
$$\frac{\partial}{\partial z} \int_{-z_0}^z (z - z^{\prime}) \; f(z^{\prime}) \; dz^{\prime}$$
where $f(z^{\prime})$ is some arbitrary function of $z^{\prime}$.  So $z$ actually appears twice: once in the upper limit of integration, and once in the integrand.
 A: Similar questions are this one and this one.
The integral depends on the variable $z$ only, because $z'$ is a dummy variable. So you want to find the derivative of the integral and not its partial derivative. This is a special case of the following more general rule (Leibniz rule):
If 
    $$I(z)=J(u(z),v(z),z)=\int_{u(z)}^{v(z)} f(z,z')dz',\tag{1}$$
i.e. $$\  J(a,b,z)=\int_{a}^{b} f(z,z')dz',\qquad \text{  with   }a=u(z),b=v(z),$$
then, under suitable conditions, we have 
$$I^{\prime }(z)=\displaystyle\int_{u(z)}^{v(z)}\dfrac{\partial f(z,z')}{\partial z}dz'+f(z,v(z))v^{\prime }(z)-f(z,u(z))u^{\prime }(z).\tag{2}$$
It is a consequence of
$$\frac{dI}{dz}=\frac{\partial J}{\partial z}+\frac{\partial J}{\partial u}
\frac{du}{dz}+\frac{\partial J}{\partial v}\frac{dv}{dz}.$$
The first term is the differentiation under the integral sign
$$\frac{\partial J}{\partial z}=\int_{u(z)}^{v(z)}\dfrac{\partial f(z,z')}{\partial z}dz'$$
 and the other two are a consequence of the Fundamental Theorem of Calculus:
$$\frac{\partial J}{\partial v}
=f(z,v(z)),\qquad\frac{\partial J}{\partial u}
=-f(z,u(z)).$$
In your case you want do find $$\frac{d }{d z}\int_{-z_{0}}^{z}g(z,z')dz',$$ where $$g(z,z^{\prime })=(z-z^{\prime
})f(z^{\prime }).$$ Since the lower limit of integration is constant, we have two terms only
$$\frac{d }{d z}\int_{-z_{0}}^{z}g(z,z^{\prime
})dz'=\int_{-z_{0}}^{z}\frac{\partial g(z,z^{\prime })}{\partial z}dz^{\prime
}+g(z,z)=\int_{-z_{0}}^{z}f(z')dz^{\prime
},$$
because $g(z,z)=0$ and $\frac{\partial g(z,z^{\prime })}{\partial z}=f(z').$
A: Introduce a second variable $y$ and set $g(x,y) = \int_{z_o}^{x}(y-z')f(z')dz'$. Calculate $dg$,
$$ dg = \frac{\partial g}{\partial x}dx + \frac{\partial g}{\partial y}dy $$
Then set $x=y=z$ and find $dg/dz$. 
