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.

• see liebniz integral rule and the dominated convergence thoerem – qbert Nov 21 '17 at 3:57
• Your example function is separable and so you just pull the theta out and takes its derivative. If the limits are a function of theta, then the chain rule is required. In probably most cases that one comes across in calculus courses, you can interchange derivative and integral. – jdods Nov 21 '17 at 4:01

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.

• Thanks, Now I understand, this is exactly what I need to know! – user467365 Nov 21 '17 at 4:36
• How is it true for weak derivatives? For instance, to show the conservation of energy in heat equation, we do it again, but I don't understand why it is still true. – Fardad Pouran Apr 18 '18 at 9:35
• @FardadPouran : It sounds like you have a different question, so perhaps should ask a new Question. With essentially no context in your comment, my half-blind guess is that you use the definition of weak derivative to shift the derivative to the other factor under the integral. (This is somewhat analogous to integration by parts.) – Eric Towers Apr 18 '18 at 14:14
• I meant the case like $f\in C([0,T],H)$ for some Hilbert space $H$ and integrating the $H$-valued functions. Hopefully, I could find a chapter in Evans book related to this topic (Space involving times Section 5.9.2) – Fardad Pouran Apr 19 '18 at 18:30