# 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 Nov 21, 2017 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. Nov 21, 2017 at 4:01

## 1 Answer

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.

• 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. Apr 18, 2018 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.) Apr 18, 2018 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) Apr 19, 2018 at 18:30
• The linked Wikipedia statement of the measure theoretic Lebesgue integration case is disappointing, requiring a constant bound on the partial derivative - constant w.r.t. the variable relative to which the partial derivative is being computed. There is a stronger statement (Theorem 3) here which instead only requires a weaker "locally integrable" condition: planetmath.org/differentiationundertheintegralsign Jul 12, 2021 at 14:40