Why is $\frac{d}{dx}\int_a^x f(t)dt$ different from $\int_a^x \frac{d}{dt}f(t)dt$? For the former one, I am aware that if let $F(x)=\int_a^x f(t)dt$, then it also equals $\int_0^x f(t)dt-\int_0^a f(t)dt$, so $F'(x)= f(x)-0=f(x)$. But who can tell me why $\int_0^a f(t)dt$ is $0$?
 A: No. $\int^a_0 f(t)dt$ is not zero, is a constant respect $x$ that's mean it derivative $\frac{d}{dx} \int^a_0 f(t)dt = 0$
A: $$\int_a^x \frac{d}{dt}f(t)dt=f(x)-f(a)$$ since a primitive of the derivative is $f(t)$, while $$\frac{d}{dx}\int_a^x f(t)dt=f(x).$$
A: Maybe you have heard about Leibniz' rule concerning "differentiation under the integral sign". This refers to functions depending not only on the current variable $x$ (or $t$), but also on an external parameter, say $p$. The rule then says that under mild hypotheses one has
$${d\over dp}\int_a^b f(x,p)\>dx=\int_a^b{\partial f\over\partial p}(x,p)\>dx\ .$$
But in your case we have a totally different thing: The differentiations affect the current variable $x$, resp. $t$, and do so in different ways: On the left hand side $x$ is the upper limit of the integral, and the differentiation process does not affect $f$ in the least (maybe $f$ is not even differentiable), whereas on the right hand side we are told to differentiate $f$, i.e. replace $f$ by $f'$, before starting to integrate. Therefore there is absolutely no reason to expect that the two expressions should have the same value.
