when can we interchange integration and differentiation

Let $f$ be a Riemann Integrable function over $\mathbb{R}^2$. When can we do this?

$$\frac{\partial}{\partial\theta}\int_{a}^{b}f(x,\theta)dx=\int_{a}^{b}\frac{\partial}{\partial\theta}f(x,\theta)dx$$

(Here, $a$ and $b$ are not a function of $\theta$.)

In the problem, which I am solving recently, are like this:

$f_{\theta}(x)$, here $\theta$ is constant and $\theta\in\mathbb{R}$ (usually). For example $f_{\theta}(x)=x^2\theta$. So, I am blindly interchanging integration and differentiation because of continuity over $\theta$. But I want to know little bit more.

Also, what happens if $a$ and $b$ are function of $\theta$? Thanks.


Solution 1:

You may interchange integration and differentiation precisely when Leibniz says you may. In your notation, for Riemann integrals: when $f$ and $\frac{\partial f(x,t)}{\partial x}$ are continuous in $x$ and $t$ (both) in an open neighborhood of $\{x\} \times [a,b]$.

There is a similar statement for Lebesgue integrals.