# Show how $\frac{\partial}{\partial x} \left[\int_0^x (x-t)g(t)\,\mathrm{d}t\right] = \int_0^x g(t)\,\mathrm{d}t$

It has something to do with the second part of the Fundamental Theorem of Calculus right? I've always had trouble with this theorem ever since I learned it several years ago :\ Would somebody please show step-by-step how the two are equal? I know that $f(x) = \frac{\mathrm{d}}{\mathrm{d}x} \int_0^x g(t)\,\mathrm{d}t$, but I do not know how to use that to simplify the problem.

Thanks

A

(Just for reference, this Wolfram link is what I'm referring to: http://bit.ly/15SoByj)

$\frac{\mathrm{d}}{\mathrm{d}x} \int_0^x (x-t)g(t)\,\mathrm{d}t=\frac{\mathrm{d}}{\mathrm{d}x} x\int_0^x g(t)-\int_0^x tg(t)\,\mathrm{d}t$
Then if you set $F(x)=x\int_0^x g(t)$， by chain rule, $\frac{d}{dx}F(x)=\int_0^x g(t)+xg(x)$ by fundamental theorem of calculus,
and the second part $\frac{d}{dx}\int_0^x tg(t)\,\mathrm{d}t=xg(x)$ by fundamental theorem of calculus, then you get the result.