This question is concerned with the integral with parameter, so let's assume that every function below is smooth.
To find the formula for the derivative of an integral with parameter, say $$g(x) = \int_{a(x)}^{b(x)}f(x,t)dt$$ for some function $f: \mathbb{R}^2 \to \mathbb{R}$, one would define $$ F: \mathbb{R}^3 \to \mathbb{R}, F(a,b,x) = \int_a^b f(x,t)dt $$ and then use the multivariable chain-rule to determine $g'$.
Thus, we would have that $$g'(x) = \frac{\partial F}{\partial a} \cdot \frac{\partial a}{\partial x} + \frac{\partial F}{\partial b} \cdot \frac{\partial b}{\partial x} + \frac{\partial F}{\partial x}.$$
It is easy so see that $$\frac{\partial F}{\partial a} \cdot \frac{\partial a}{\partial x} = -f(x,a(x)) \cdot a'(x)$$ and that $$\frac{\partial F}{\partial b} \cdot \frac{\partial b}{\partial x} = f(x,b(x)) \cdot b'(x). $$
What I don't understand is why we have that $$\frac{\partial F}{\partial x} = \int_a^b \frac{\partial f}{\partial x}(x,t)dt. $$
Shouldn't it be $$\frac{\partial F}{\partial x} = \frac{\partial}{\partial x}\int_a^b f(x,t)dt ? $$
Could you please tell me why we are allowed to interchange the partial derivative and the integral?