# Differentiation of an integral

1. Jul 21, 2004

### Galileo

Physicists do it all the time: interchanging limits, assuming uniform convergence, differentiation a delta function..
Usually it's all valid, but I'd like to see when we can interchange differentiation with respect to one variabele with integration over another.
It seems the following theorem exists:

$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=f(x_2,y)\frac{dx_2}{dy}-f(x_1,y)\frac{dx_1}{dy}+\int_{x_1(y)}^{x_2(y)}\frac{\partial f}{\partial y}dx$$
So when the boundaries do not depend on $$y$$ we may simply bring the derivative under the integral sign.

I couldn't find a proof of this so I set out to prove it myself.
I'd like to know if I made any mistakes.

Let $$G(x,y)=\int^xf(x',y)dx'$$.
So that $$\frac{\partial G}{\partial x}=f(x,y)$$
Using this we have:

(1) $$\int_{x_1(y)}^{x_2(y)}\frac{\partial f}{\partial y}dx= \int_{x_1(y)}^{x_2(y)}\frac{\partial^2 G}{\partial y \partial x}dx= \int_{x_1(y)}^{x_2(y)}\frac{\partial^2 G}{\partial x \partial y}dx=$$
$$\int_{x_1(y)}^{x_2(y)}\frac{\partial}{\partial x}\left(\frac{\partial G}{\partial y}\right)dx= \frac{\partial G}{\partial y}(x_2(y),y)-\frac{\partial G}{\partial y}(x_1(y),y)=$$
$$\frac{\partial}{\partial y}\left(\int^{x_2(y)}f(x,y)dx-\int^{x_1(y)}f(x,y)dx\right)=\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$

Which is pretty close. Actually, I realized I need total differentiation with respect to y, not partial differentiation. So I can use:

$$\frac{d}{dy}(G(x_2(y),y)-G(x_1(y),y))=\frac{\partial G}{\partial x_2}\frac{dx_2}{dy}+\frac{\partial G}{\partial y}(x_2,y)-\frac{\partial G}{\partial x_1}\frac{dx_1}{dy}-\frac{\partial G}{\partial y}(x_1,y)$$
Which is equal to
$$\left(\frac{\partial}{\partial x_2}\int^{x_2(y)}f(x,y)dx\right)\frac{dx_2}{dy}-\left(\frac{\partial}{\partial x_1}\int^{x_1(y)}f(x,y)dx\right)\frac{dx_1}{dy}+$$
$$\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$

Which is the right answer if
$$\frac{\partial}{\partial x_2}\int^{x_2(y)}f(x,y)dx=f(x_2(y),y)$$
But Im not sure if this is true. I know that
$$\frac{d}{dx}\int^xf(x)dx=f(x)$$, but Im not sure if I can use that here. Furthermore, we need:

$$\int_{x_1(y)}^{x_2(y)}\frac{\partial}{\partial x}\left(\frac{\partial G}{\partial y}\right)dx= \frac{d}{dy}(G(x_2(y),y)-G(x_1(y),y))$$

Can anyone give me pointers please???

2. Jul 21, 2004

### e(ho0n3

I didn't know it was possible to get away with only one limit of integration:

$$G(x,y)=\int^xf(x\'\;,y)dx\'\;$$

Can you explain?

3. Jul 21, 2004

### Wong

The main step in your derivation is the application of "multivariate chain rule". In fact what you are doing is treating $$G(x_i(y),y)$$ as $$G\circ f$$, where f is the function $$y\rightarrow(x_i(y), y)$$. So you asked if "$$\frac{\partial}{\partial x_2}\int^{x_2(y)}f(x,y)dx=f(x_2(y),y)$$" is correct. In fact, in this step, you do not even need to consider $$x_2(y)$$ as a function of y. You only need to consider it as an independent variable. (For example, consider how you would differentiate $$f\circ g$$, where f is $$(x,y)\rightarrow x^{2}y^{2}$$ and g is $$t\rightarrow (x_1(t), t)$$)

So, given your intermediate mapping $$f: y\rightarrow(x_i(y), y)$$, your proposition is true. Note that it may not be true if you choose another intermediate mapping.

And also, it is better to put a lower limit to $$\int^{x_2(y)}f(x,y)dx$$, like $$\int^{x_2(y)}_{a}f(x,y)dx$$, where a is an arbitrary constant.

Last edited: Jul 21, 2004
4. Jul 22, 2004

### homology

Galileo wanted to show that

$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=f(x_2,y)\frac{dx_2}{dy}-f(x_1,y)\frac{dx_1}{dy}+\int_{x_1(y)}^{x_2(y)}\frac{\partial f}{\partial y}dx$$

so he went ahead and said let:

$$G(x,y)=\int^xf(x',y)dx'$$.

Therefore

$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=\frac{d}{dy}(G(x_2(y),y)-G(x_1(y),y))$$

So from what Galileo found,

$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=$$

$$\left(\frac{\partial}{\partial x_2}\int^{x_2(y)}f(x,y)dx\right)\frac{dx_2}{dy}-\left(\frac{\partial}{\partial x_1}\int^{x_1(y)}f(x,y)dx\right)\frac{dx_1}{dy}+$$
$$\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$

and as Wong noted, this simplifies to

$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=\left(f(x_2(y),y)\right)\frac{dx_2}{dy}-\left(f(x_1(y),y)\right)\frac{dx_1}{dy}+$$
$$\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$

So the question I think is not whether

but rather that

$$\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=\int_{x_1(y)}^{x_2(y)}\frac{\partial f}{\partial y}dx$$

So, is this the case?

5. Jul 22, 2004

### Wong

I think it is the case "if" f(x,y) has continuous derivatives. It is well known that if f(x,y) has continuous derivatives then one can "exchage the operation of integration and (partial) differentiation".

In fact, I think the formula may (I am not sure...) be proved by first breaking down $$\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$ into $$\int_{a}^{x_2(y)}f(x,y)dx - \int_{a}^{x_1(y)}f(x,y)dx$$. Then for each integral, treat it as a composition of mappings that I mentioned in the previous post and differentiate it using chain rule. Using the fact that "the operation of integration and (partial) differentiation may be exchanged for function with continuous derivatives", one may obtain the result.

Last edited: Jul 22, 2004
6. Jul 22, 2004

### homology

I have forgotten this and can't find a proof in the books I have at home, mind sketching one?

Thanks,

Kevin

7. Jul 22, 2004

### Wong

Sorry, the condition should be for f(x,y) with continuous derivatives. It is pretty obvious since otherwise $$\frac{\partial}{\partial y}f(x,y)$$ may not even exist...sorry for the confusion.

8. Jul 22, 2004

### Galileo

Man! I can't believe this problem got me stumped, while the solution is that close.

The lower limit of integration doesn't matter. All I wanted was to get a general expression for an antiderivative of f with respect to x. You can put a constant in there if you want, but all that matters is the derivative of G.

That is what I wanted to prove. I used Clairaut's theorem for G, so that

$$\frac{\partial^2 G}{\partial y \partial x}=\frac{\partial^2 G}{\partial x \partial y}$$
Which is true if G has continous partial derivatives. That is: when f is continuous.

Now the result is established if the following holds:
$$\int_{x_1(y)}^{x_2(y)}\frac{\partial}{\partial x}\left(\frac{\partial G}{\partial y}\right)dx= \frac{d}{dy}(G(x_2(y),y)-G(x_1(y),y))$$
and if (as Wong said) this simplifies to the answer.

In my first post I showed that
$$\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=\int_{x_1(y)}^{x_ 2(y)}\frac{\partial f}{\partial y}dx$$

So the result is established right???

9. Jul 22, 2004

### arildno

$$\lim_{\bigtriangleup{y}\to{0}}\frac{\int_{x_{1}(y+\bigtriangleup{y})}^{x_{2}(y+\bigtriangleup{y})}f(x,y+\bigtriangleup{y})dx-\int_{x_{1}(y)}^{x_{2}(y)}f(x,y)dx}{\bigtriangleup{y}}=$$

$$\lim_{\bigtriangleup{y}\to{0}}\frac{\int_{x_{2}(y)}^{x_{2}(y+\bigtriangleup{y})}f(x,y+\bigtriangleup{y})dx}{\bigtriangleup{y}}+\lim_{\bigtriangleup{y}\to{0}}R_{1}$$

$$\int_{x_{2}(y)}^{x_{2}(y+\bigtriangleup{y})}f(x,y+\bigtriangleup{y})dx\approx{f}(x_{2}(y),y+\bigtriangleup{y})(x_{2}(y+\bigtriangleup{y})-x_{2}(y))$$

Hence, we have:
$$\lim_{\bigtriangleup{y}\to{0}}\frac{\int_{x_{2}(y)}^{x_{2}(y+\bigtriangleup{y})}f(x,y+\bigtriangleup{y})dx}{\bigtriangleup{y}}=$$
$$\lim_{\bigtriangleup{y}\to{0}}f(x_{2}(y),y+\bigtriangleup{y})\lim_{\bigtriangleup{y}\to{0}}\frac{x_{2}(y+\bigtriangleup{y})-x_{2}(y)}{\bigtriangleup{y}}$$

which goes to the limit: $$f(x_{2}(y),y)\frac{dx_{2}}{dy}$$

By using the appropriate expression for $$R_{1}$$ the other terms may be found in a similarly laborious way

10. Jul 22, 2004

### Galileo

Alright! I think we got it. Im convinced that indeed
$$\frac{\partial}{\partial x_2}\int^{x_2(y)}f(x,y)dx=f(x_2(y),y)$$
holds generally, since:
$$\frac{\partial G}{\partial x}=f(x,y)$$
it shouldnt matter what letter we use for the first variable, so that
$$\frac{\partial G}{\partial x_2}=f(x_2,y)$$

Now we have:
$$\frac{d}{dy}\int_{x_1(y)}^{x_2(y)}f(x,y)dx=f(x_2,y )\frac{dx_2}{dy}-f(x_1,y)\frac{dx_1}{dy}+\frac{\partial}{\partial y}\int_{x_1(y)}^{x_2(y)}f(x,y)dx$$
And since $\frac{\partial f}{\partial y}\int_{x_1(y)}^{x_2(y)}dx=\int_{x_1(y)}^{x_2(y)}\frac{\partial f}{\partial y}dx[/tex] We have our little theorem. So what are the requirements? First of all we used Clairaut's theorem so f should be continuous and [itex]f_y$ should be continuous. Since continuity of $G_x$ doesnt imply continuity of $G_y$.
Ofcourse f is then integrable and so forth. I guess that's all we need.

Thanks for your post too arildno, Im gonna work that one out in detail as well.

Now I can finally interchange the derivative and integral signs without the feeling that Im doing something illegal!

11. Jul 22, 2004

### arildno

Just to continue on my own track:
$$R_{1}=\frac{\int_{x_{1}(y+\bigtriangleup{y})}^{x_{2}(y)}f(x,y+\bigtriangleup{y})dx-\int_{x_{1}(y)}^{x_{2}(y)}f(x,y)dx}{\bigtriangleup{y}}=$$
$$\int_{x_{1}(y)}^{x_{2}(y)}\frac{f(x,y+\bigtriangleup{y})-f(x,y)}{\bigtriangleup{y}}dx+\frac{\int_{x_{1}(y+\bigtriangleup{y})}^{x_{1}(y)}f(x,y+\bigtriangleup{y})dx}{\bigtriangleup{y}}$$

where the limiting process is seen to yield:
$$\int_{x_{1}(y)}^{x_{2}(y)}\frac{\partial{f}}{\partial{y}}dx-f(x_{1}(y),y)\frac{dx_{1}}{dy}$$

12. Jul 22, 2004

### Wong

I'm pleased to....only that I'm not that good at analysis so you might find some serious mistakes in my post.

I think one of the possible proofs is to use fubini's theorem. Now,

$$\int_{a}^{b}\frac{\partial}{\partial y}\int_{c}^{d} f(x,y) dx dy$$
$$= \int_{c}^{d} f(x,b) dx - \int_{c}^{d} f(x,a) dx$$
$$= \int_{c}^{d}\int_{a}^{b} \frac{\partial}{\partial y} f(x,y) dy dx$$
$$= \int_{a}^{b}\int_{c}^{d} \frac{\partial}{\partial y}f(x,y) dx dy$$

where in the last step we have used fibini's theorem. Fibini's theorem applies because we assume that $$\frac{\partial}{\partial y}f(x,y)$$ is continuous and [a, b]x[c, d] is a compact set. Now since a, b are arbitrary, this can only mean,

$$\frac{\partial}{\partial y}\int_{c}^{d} f(x,y) dx = \int_{c}^{d} \frac{\partial}{\partial y}f(x,y) dx$$

Last edited: Jul 23, 2004
13. Jul 22, 2004

### homology

I took out a book (Advanced Calculus by Kaplan) this afternoon (couldn't wait) and found a proof both of Leibneiz's general rule for differentiating the integral and the rather mundane one. The mundane one says that

$$\frac{d}{d y}\int_{c}^{d} f(x,y) dx = \int_{c}^{d} \frac{\partial}{\partial y}f(x,y) dx$$

provided of course that $$\frac{\partial f}{\partial y}$$ is continuous.

14. Jul 23, 2004

### Galileo

Homology, could you sketch the proof used in that book?

15. Jul 23, 2004

### homology

I'll do a two part post, the following theorem is used in the proof of the larger and so I incorporate it here. It is verbatim (minus any tex errors I have introduced) from Kaplan's Book.

Leibnitz's rule: Let $$f(x,t)$$ be continuous and have a continuous derivative $$f_t$$ in a domain of the x-t plane which includes the rectangle a < x < b and t1 < t < t2. Then for t1 < t < t2

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

Proof:

Let

$$g(t)=\int_{a}^{b}\frac{\partial f}{\partial t}(x,t)dx\ (t_1 \leq t \leq t_2)$$

Since $$f_t$$ is continuous, one concludes from the theorem of Section 4-6 that g(t) is continuous for t1 < t < t2. (Note from Homology: this is just the standard analysis result, nothing special). Now for t1 < t3 < t2

$$\int_{t_1}^{t_3}g(t)dt=\int_{t_1}^{t_3}\int_{a}^{b}\frac{\partial f}{\partial t}(x,t)dxdt;$$

by the theorem referred to one can interchange the order of integration:

$$\int_{t_1}^{t_3}g(t)dt=\int_{a}^{b}\int_{t_1}^{t_3}\frac{\partial f}{\partial t}(x,t)dtdx=\int_{a}^{b}[f(x,t_3)-f(x,t_1)]dx$$

$$=\int_{a}^{b}f(x,t_3)dx-\int_{a}^{b}f(x,t_1)dx=F(t_3)-F(t_1),$$

where$$F(t)$$ is defined by (4-91). (Note from Homology: 4-91 refers to $$\int_{a}^{b}f(x,t)dx=F(t)$$)

If we now let t3 be simply a variable t, we have

$$F(t)-F(t_1)=\int_{t_1}^{t}g(t)dt.$$

Both sides can now be differentiated with respect to t. By the fundamental theorem (4-19) (Note from Homology: he means the Fund. Th. of Calc.), one obtains

$$\frac{d F}{d t} = g(t)=\int_{a}^{b}\frac{\partial f}{\partial t}(x,t)dx$$

Thus the rule is proved.

Last edited: Jul 23, 2004
16. Jul 23, 2004

### homology

Oh, yes, give me about 20 minutes for the full proof of the actual theorem, I'm pretty new to Latex and am awfully damn slow!

17. Jul 23, 2004

### homology

Theorem Let f(x,t) satisfy the condition stated above for Leibnitz's rule. In addition, let a(t) and b(t) be defined and have continuous derivatives for t1 < t < t2. Then for t1 < t < t2

$$\frac{d}{d t}\int_{a(t)}^{b(t)}f(x,t)dx=f[b(t),t]b'(t)-f[a(t),t]a'(t)+\int_{a(t)}^{b(t)}\frac{\partial f}{\partial t}(x,t)dx\\$$

The above equation is labelled (4-93)

Proof:

Let $$u=b(t),\ v=a(t),\ w=t$$, so that the integral F(t) can be written as follows:

$$F(t)=\int_{v}^{u}f(x,w)dx=G(u,v,w)$$,

where u,v,w all depend on t. Hence by the chain rule:

$$\frac{d F}{d t}=\frac{\partial G}{\partial u}\frac{d u}{dt}+\frac{\partial G}{\partial v}\frac{d v}{d t}+\frac{\partial G}{\partial w}\frac{d w}{d t}$$.

It will be seen that the three terms here correspond to the three terms on the right of (4-93). Indeed one has

$$\frac{\partial G}{\partial u}=\frac{\partial}{\partial u}\int_{v}^{u}f(x,w)dx=f(u,w),$$

by the fundamental theorem (4-19) (Note from Homology: see previous post). Since $$u=b(t), du/dt=b'(t)$$ and

$$\frac{\partial G}{\partial u}\frac{d u}{d t}=f[b(t),t]b'(t)$$.

The second term is accounted for similarly, the minus sign appearing because

$$\frac{\partial}{\partial v}\int_{v}^{u}f(x,w)dx=\frac{\partial}{\partial v}\{-\int_{u}^{v}f(x,w)dx\}=-f(v,w).$$

Finally

$$\frac{\partial G}{\partial w}=\frac{\partial}{\partial w}\int_{v}^{u}f(x,w)dx=\int_{v}^{u}\frac{\partial f}{\partial w}(x,w)dx$$

By Leibnitz's rule. Since $$w=t, dw/dt=1$$ and the third term is accounted for.

18. Jul 23, 2004

### homology

now for a little comment

What I have gained from this little thread is one: the differentiating the integral trick and conditions for it to be valid, but also (2) that we have observed and learnt a method for dealing with integrals in this fashion, i.e. rename the integral as a function like G(v,u,w) or what not and then play with that, substituting the form of the function (the integral) in afterwards.

Just an observation,

Kevin

19. Jul 23, 2004

### mathwonk

The theorems on interchange of limits, i.e. fubini (interchanging two integrals), and the rule on interchanging order of partials, and the rule on differentiating under the integral sign (interchanging a derivative and an integral), it seems i recall are all essentially equivalent. I.e. anyone implies the others.

A nice treatment is in Spivak's Calculus on manifolds, and a more general treatment is in Lang's Analysis book (for lebesgue integrals).

20. Jul 23, 2004

### Galileo

Thanks Homology. Nice to see a proof which is sure to be valid, although it's the same as the other ones (except for arildno's).

My derivation of Leibniz' rule uses Clairaut's theorem (equality of partial cross derivatives) instead of Fubini's theorem (exchanging the order of integration).
I dont know a proof of Fubini's theorem and my teacher said it will be handled
later in a course on Measure theory.

I`m sure Measure theory accounts for these rules in a far more general way (Fubini's theorem is more general than exchanging the order of integration), but as Mathwonk said, this special case of Fubini's theorem may be proved by Clairaut's theorem.