# Leibniz Rule for multivariable function

1. Nov 2, 2014

### joshmccraney

Hi PF!

Can anyone help me with showing the following: $$\frac{\partial}{\partial x} \int_{f(x)}^{g(x)} L(x,y)dy = \int_{f(x)}^{g(x)} \frac{\partial L}{\partial x} dy + \frac{\partial g}{\partial x} L(g,y) - \frac{\partial f}{\partial x} L(f,y)$$

I understand this as the fundamental theorem if $\frac{\partial L}{\partial x} = 0$ but how do I deal with this if it is not equal to zero? i was thinking about trying to say let $F(x,f,g) = \int_{f(x)}^{g(x)} L(x,y)dy$ and use chain rule but I'm not sure how to deal with the boundary terms.

Thanks!

2. Nov 3, 2014

### HomogenousCow

You want to go at it from first principles.

3. Nov 3, 2014

### joshmccraney

Sorry, I'm a little confused at what you're saying. Are you asking if I want to or telling me I should?

4. Nov 3, 2014

### joshmccraney

What I have if I use the chain rule is $$\frac{\partial F}{\partial x}+\frac{\partial F}{\partial g}\frac{\partial g}{\partial x} + \frac{\partial F}{\partial x}\frac{\partial f}{\partial x} = \frac{\partial}{\partial x} \int_{f(x)}^{g(x)} L(x,y) dy$$. Now we may have $$\frac{\partial F}{\partial x} = \lim_{\Delta x \to 0} \frac{\int_f^g L(x+\Delta x,y) dy - \int_f^gL(x,y) dy}{\Delta x}$$ (So far is this correct? I haven't done anything with the $\Delta x$ in $f$ or $g$, but should I have added $\Delta x$ in the bounds?)

At any rate, once we move the limit in the integral we can write $$\frac{\partial F}{\partial x} = \int_f^g \frac{\partial L}{\partial x} dy$$. Thus, this addresses our first term of the three in the chain rule approach. Can someone answer my questions here and let me know if this is correct, and how to proceed?

Thanks so much!

Josh

5. Nov 3, 2014

### HomogenousCow

The integration limits themselves depend on x.
So you need to write g(x+h) (or delta x) and f(x+h) for that one there.

6. Nov 3, 2014

### joshmccraney

Shoot, I was afraid of this! This puts me even further back than where I was. Can you give me some help then on how to proceed?

7. Nov 3, 2014

### HomogenousCow

You might have to just "cheat" and use g(x+h)=g(x)+g'(x)h and then break the integral up.
Edit: When I say break it up I mean break the integral into a few pieces to isolate the individual integration limits.

8. Nov 3, 2014

### joshmccraney

Hahaha. Yep, I'm with you. But this would then be approximate, right? How would it be done exact? (We have been using this extensively and I don't mind but since it's an engineering course we don't prove it and I would like seeing that it works.)

9. Nov 3, 2014

### Fredrik

Staff Emeritus
There's something wrong here. y is just a dummy variable on the left-hand side, so why are there two y's that aren't dummy variables on the right-hand side?

I think this idea works. You just need to be more careful with the details. You define F by
$$F(x,s,t)=\int_s^t L(x,y)\mathrm dy,$$ for all x,s,t. Your job is to compute $\frac{d}{dx}F(x,f(x),g(x))$, right? The chain rule tells you that
$$\frac{d}{dx}F(x,f(x),g(x)) =D_1F(x,f(x),g(x))+D_2F(x,f(x),g(x))f'(x)+D_3F(x,f(x),g(x))g'(x).$$

Last edited: Nov 3, 2014
10. Nov 3, 2014

### joshmccraney

Yikes, I should definitely have written $L(x,f(x))$ and $L(x,g(x))$ instead of the $y$. Sorry about that!

Can you tell me what $D_1$ means? I'm afraid I've lost you.

11. Nov 3, 2014

### Fredrik

Staff Emeritus
It's a standard notation for the partial derivative with respect to the first variable slot. It's a more versatile notation than $\frac{\partial}{\partial x}$, which is only appropriate when the first variable is denoted by $x$. So $D_1F$ is the function defined by
$$D_1F(x,s,t)=\lim_{h\to 0}\frac{F(x+h,s,t)-F(x,s,t)}{h}$$ for all $x,s,t$.

Last edited: Nov 3, 2014
12. Nov 3, 2014

### joshmccraney

Gotcha! So $$D_1 F(x,s,t) = \lim_{h \to 0} \frac{\int_{s(x+h)}^{t(x+h)} L(x+h,y)dy - \int_{s(x)}^{t(x)} L(x,y)dy}{h}$$ but how do i proceed? My idea was to consolidate integrals and swap order with the limit but the bounds are different. Any ideas?

13. Nov 3, 2014

### Fredrik

Staff Emeritus
My s and t aren't functions. When I said "for all x,s,t", I meant for all $x,s,t\in\mathbb R$. What I wrote down is just the definition of the partial derivative with respect to the first variable slot, applied to the function F. The calculation of the partial derivatives is actually pretty simple. You don't need to work directly with the definition of partial derivative. You just need a solid understanding of functions and partial derivatives.
\begin{align}
&D_1F(x,f(x),g(x))=\left(\left.\frac{d}{dx}F(x,s,t)\right)\right|_{s=f(x),\, t=g(x)} =\left(\left.\frac{d}{dx}\int_s^t L(x,y)\mathrm dy\right)\right|_{s=f(x),\, t=g(x)}\\
&=\left(\left.\int_s^t\frac{\partial}{\partial x}L(x,y)\mathrm dy\right) \right|_{s=f(x),\, t=g(x)} =\int_{f(x)}^{g(x)}\frac{\partial}{\partial x}L(x,y)\mathrm dy.
\end{align}

14. Nov 4, 2014

### joshmccraney

So why aren't the bounds included? I'm a little confused if $s=f(x)$. Can you tell me what I'm missing?

15. Nov 4, 2014

### Fredrik

Staff Emeritus
I could have stated that more clearly. For all $x,s,t\in\mathbb R$, we have
$$D_1F(x,s,t)=\frac{d}{dx}\int_s^tL(x,y)\mathrm dy=\int_s^t \frac{\partial}{\partial x}L(x,y)\mathrm dy.$$ This implies that for all $x\in\mathbb R$, we have
$$D_1F(x,f(x),g(x)) =\int_{f(x)}^{g(x)} \frac{\partial}{\partial x}L(x,y)\mathrm dy.$$

16. Nov 4, 2014

### joshmccraney

How then would we write $D_2 F(x,s,t)$? Sorry, I'm just a little confused here.

17. Nov 4, 2014

### Fredrik

Staff Emeritus
$$D_2F(x,s,t)=\frac{d}{ds}\int_s^t L(x,y)\mathrm dy.$$ To compute $D_2F(x,f(x),g(x))$, you can use the fundamental theorem of calculus on the above, and when you're done, substitute f(x) and g(x) for s and t respectively. Alternatively, (this is just another way of writing the same thing) you can use this notation from the start:
$$D_2F(x,f(x),g(x))=\frac{d}{ds}\bigg|_{f(x)}\int_s^{g(x)}L(x,y)\mathrm dy.$$

18. Nov 4, 2014

### joshmccraney

Gotcha! Thanks a ton! You rock!