MHB Calculating Derivative of Integral w/ Chain Rule

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

Let $I=[a,b]$, $J=[c,d]$ compact intervals in $\mathbb{R}$, $g,h:I\rightarrow J$ differentiable, $fI\times J\rightarrow \mathbb{R}$ continuous and partial differentiable as for the first variable with continuous partial derivative.
Let $F:I\rightarrow \mathbb{R}$.
I want to calculate the derivative of $$F(x)=\int_{g(x)}^{h(x)}f(x,y)\, dy$$ using the chain rule.

Following hint is given:
Let $G:I\rightarrow \mathbb{R}^3$ and $H:J\times J\times I\rightarrow \mathbb{R}$ defined by $G(x):=(g(x), h(x), x)=(u,v,w)$ and $H(u,v,w):=\int_u^vf(w,y)\, dy$. Then it is $F=H\circ G$. So, to calculate the derivative of the integral we have to calculate the derivative of $F(x)=H(G(x))$.

From the chain rule we have that $F'(x)=H'(G(x))\cdot G'(x)$.

The derivatives of the functions $H$ and $G$ are the following:
\begin{align*}G'(x)&=\frac{dG(x)}{dx}=\frac{dG(x)}{dg(x)}\cdot \frac{dg(x)}{dx}+\frac{dG(x)}{dh(x)}\cdot \frac{dh(x)}{dx}+\frac{dG(x)}{x}\cdot \frac{dx}{dx}\\ & =\frac{dG(x)}{dg(x)}\cdot \frac{dg(x)}{dx}+\frac{dG(x)}{dh(x)}\cdot \frac{dh(x)}{dx}+\frac{dG(x)}{x}\end{align*} The last term $\frac{dG(x)}{x}$ is not the same as $G'(x)$, is it?

For the derivative of $H$ do we use the total differential?

Or am I thinking wrong? (Wondering)
 
Physics news on Phys.org
mathmari said:
Let $G:I\rightarrow \mathbb{R}^3$ and $H:J\times J\times I\rightarrow \mathbb{R}$ defined by $G(x):=(g(x), h(x), x)=(u,v,w)$ and $H(u,v,w):=\int_u^vf(w,y)\, dy$. Then it is $F=H\circ G$.

So, to calculate the derivative of the integral we have to calculate the derivative of $F(x)=H(G(x))$.

From the chain rule we have that $F'(x)=H'(G(x))\cdot G'(x)$.

The derivatives of the functions $H$ and $G$ are the following:
\begin{align*}G'(x)&=\frac{dG(x)}{dx}=\frac{dG(x)}{dg(x)}\cdot \frac{dg(x)}{dx}+\frac{dG(x)}{dh(x)}\cdot \frac{dh(x)}{dx}+\frac{dG(x)}{x}\cdot \frac{dx}{dx}\\ & =\frac{dG(x)}{dg(x)}\cdot \frac{dg(x)}{dx}+\frac{dG(x)}{dh(x)}\cdot \frac{dh(x)}{dx}+\frac{dG(x)}{x}\end{align*} The last term $\frac{dG(x)}{x}$ is not the same as $G'(x)$, is it?

Hey mathmari! (Wave)

Isn't in general the derivative of a vector function $\phi$ of multiple variables the matrix:
$$\phi'(x) = \left(\pd {\phi_i} {x_j}\right)$$
(Wondering)

So isn't it:
$$G'(x) = \begin{pmatrix}g(x)\\h(x)\\x\end{pmatrix}' = \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix}$$

mathmari said:
For the derivative of $H$ do we use the total differential?

Shouldn't it then be:
$$H'(u,v,w) = \left(\pd {H}{u}\quad \pd {H}{v}\quad \pd {H}{w}\right)$$
(Wondering)
 
I like Serena said:
Isn't in general the derivative of a vector function $\phi$ of multiple variables the matrix:
$$\phi'(x) = \left(\pd {\phi_i} {x_j}\right)$$
(Wondering)

So isn't it:
$$G'(x) = \begin{pmatrix}g(x)\\h(x)\\x\end{pmatrix}' = \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix}$$
Shouldn't it then be:
$$H'(u,v,w) = \left(\pd {H}{u} \pd {H}{v} \pd {H}{w}\right)$$
(Wondering)

At the derivative of $H$ you mean it as a vector, or not? (Wondering) Oh ok!

So, so we have the following?
\begin{align*}F'(x)=H'(G(x))\cdot G'(x)= \left(\pd {H}{g(x)} \pd {H}{h(x)} \pd {H}{x}\right)\cdot \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix}= \pd{H}{g(x)}\cdot g'(x)+ \pd {H}{h(x)}\cdot h'(x)+\pd {H}{x}\cdot 1\end{align*} (Wondering)
 
mathmari said:
At the derivative of $H$ you mean it as a vector, or not? (Wondering)

I meant it as the transpose of a vector (a row vector).

To be fair, there are different schools of thought whether it's a vector, a row vector, or a column vector.
However, we should be consistent to make sure we correctly multiply with another vector or matrix. (Nerd)
mathmari said:
Oh ok!

So, so we have the following?
\begin{align*}F'(x)=H'(G(x))\cdot G'(x)= \left(\pd {H}{g(x)} \pd {H}{h(x)} \pd {H}{x}\right)\cdot \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix}= \pd{H}{g(x)}\cdot g'(x)+ \pd {H}{h(x)}\cdot h'(x)+\pd {H}{x}\cdot 1\end{align*} (Wondering)

Almost.
But instead of $\pd H{g(x)}$ we should have $\pd Hu(g(x),h(x),x)$. (Worried)

That is, we can't take a partial derivative with respect to $g(x)$. We can only take a partial derivative with respect to a variable. In our case the variable is $u$ and not $g(x)$.
Then, after taking the partial derivative, we should substitute $G(x)=(g(x),h(x),x)$. After all, $\pd Hu$ is a scalar function of 3 variables. (Nerd)
 
Ah ok!

I thought about that again. (Thinking)

Do we have from the chain rule that $F'(x)=\frac{H(G(x))}{dx}=\nabla H(G(x))\cdot G'(x)$ ? (Wondering)

The derivative of the vector function $G$ is \begin{equation*}G'(x) = \begin{pmatrix}g(x)\\h(x)\\x\end{pmatrix}' = \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix}\end{equation*}

The gradient of the function $H$ is equal to \begin{equation*}\nabla H= \left(\frac{\partial{H}}{\partial{u}} \ \ \ \frac{\partial{H}}{\partial{v}} \ \ \ \frac{\partial{H}}{\partial{w}}\right)\end{equation*} At the point $G(x)$ the gradient is equal to \begin{equation*}\nabla H(G(x))= \left(\frac{\partial{H}}{\partial{u}}(g(x), h(x), x) \ \ \ \frac{\partial{H}}{\partial{v}}(g(x), h(x), x) \ \ \ \frac{\partial{H}}{\partial{w}}(g(x), h(x), x)\right)\end{equation*}

So we get:
\begin{align*}F'(x)&=\nabla H(G(x))\cdot G'(x)\\ & =\left(\frac{\partial{H}}{\partial{u}}(g(x), h(x), x) \ \ \ \frac{\partial{H}}{\partial{v}}(g(x), h(x), x) \ \ \ \frac{\partial{H}}{\partial{w}}(g(x), h(x), x)\right)\cdot \begin{pmatrix}g'(x) \\h'(x)\\ 1\end{pmatrix} \\ & = \frac{\partial{H}}{\partial{u}}(g(x), h(x), x)\cdot g'(x)+\frac{\partial{H}}{\partial{v}}(g(x), h(x), x)\cdot h'(x)+\frac{\partial{H}}{\partial{w}}(g(x), h(x), x)\end{align*}

The derivative of an integral in respect to its upper limit is identical to the value of the integral at the upper limit, accordint to the differential and integral calculus, right? (Wondering)

So, we have that $\displaystyle{\frac{\partial{H}}{\partial{u}}(u,v,w)=\frac{\partial}{\partial{u}}\left (\int_u^vf(w,y)\, dy\right )=f(w,u)}$ and $\displaystyle{\frac{\partial{H}}{\partial{v}}(u,v,w)=\frac{\partial}{\partial{v}}\left (\int_u^vf(w,y)\, dy\right )=\frac{\partial}{\partial{v}}\left (-\int_v^uf(w,y)\, dy\right )=-\frac{\partial}{\partial{v}}\left (\int_v^uf(w,y)\, dy\right )=-f(w,v)}$.

We also have that $\displaystyle{\frac{\partial{H}}{\partial{w}}(u,v,w)=\frac{\partial}{\partial{w}}\left (\int_u^vf(w,y)\, dy\right )=\int_u^v\frac{\partial}{\partial{w}}f(w,y)\, dy=\int_u^vf_w(w,y)\, dy}$.

Therefore, we get:
\begin{equation*}F'(x) = f(x, g(x))\cdot g'(x)-f(x, h(x))\cdot h'(x)+\int_{g(x)}^{h(x)}f_x(x,h(x))\, dy\end{equation*} Is everything correct? (Wondering)
 
mathmari said:
Do we have from the chain rule that $F'(x)=\frac{H(G(x))}{dx}=\nabla H(G(x))\cdot G'(x)$ ?

Indeed. The gradient is the same as the derivative.

mathmari said:
The derivative of an integral in respect to its upper limit is identical to the value of the integral at the upper limit, accordint to the differential and integral calculus, right?

So, we have that $\displaystyle{\frac{\partial{H}}{\partial{u}}(u,v,w)=\frac{\partial}{\partial{u}}\left (\int_u^vf(w,y)\, dy\right )=f(w,u)}$

Let's see... suppose we integrate $\phi$ with anti-derivative $\Phi$, followed by differentiating with respect to the lower bound $u$.
Then:
$$\pd {}u \int_u^v \phi(x)dx = \pd{}u[ \Phi(v) - \Phi(u)] = -\phi(u)$$
isn't it? (Wondering)

I think it should be $-f(w,u)$. (Thinking)

mathmari said:
and $\displaystyle{\frac{\partial{H}}{\partial{v}}(u,v,w)=\frac{\partial}{\partial{v}}\left (\int_u^vf(w,y)\, dy\right )=\frac{\partial}{\partial{v}}\left (-\int_v^uf(w,y)\, dy\right )=-\frac{\partial}{\partial{v}}\left (\int_v^uf(w,y)\, dy\right )=-f(w,v)}$.

We also have that $\displaystyle{\frac{\partial{H}}{\partial{w}}(u,v,w)=\frac{\partial}{\partial{w}}\left (\int_u^vf(w,y)\, dy\right )=\int_u^v\frac{\partial}{\partial{w}}f(w,y)\, dy=\int_u^vf_w(w,y)\, dy}$.

Therefore, we get:
\begin{equation*}F'(x) = f(x, g(x))\cdot g'(x)-f(x, h(x))\cdot h'(x)+\int_{g(x)}^{h(x)}f_x(x,h(x))\, dy\end{equation*}

I think that a plus and minus sign should be exchanged. (Worried)
 
I like Serena said:
Let's see... suppose we integrate $\phi$ with anti-derivative $\Phi$, followed by differentiating with respect to the lower bound $u$.
Then:
$$\pd {}u \int_u^v \phi(x)dx = \pd{}u[ \Phi(v) - \Phi(u)] = -\phi(u)$$
isn't it? (Wondering)

I think it should be $-f(w,u)$. (Thinking)

Oh yes (Tmi)

We have that $\displaystyle{\frac{\partial{H}}{\partial{u}}(u,v,w)=\frac{\partial}{\partial{u}}\left (\int_u^vf(w,y)\, dy\right )=\frac{\partial}{\partial{u}}\left (-\int_v^uf(w,y)\, dy\right )=-\frac{\partial}{\partial{u}}\left (\int_v^uf(w,y)\, dy\right )=-f(w,u)}$ and $\displaystyle{\frac{\partial{H}}{\partial{v}}(u,v,w)=\frac{\partial}{\partial{v}}\left (\int_u^vf(w,y)\, dy\right )=f(w,v)}$, right? (Wondering) The derivative $\displaystyle{\frac{\partial{H}}{\partial{w}}(u,v,w)=\frac{\partial}{\partial{w}}\left (\int_u^vf(w,y)\, dy\right )=\int_u^v\frac{\partial}{\partial{w}}f(w,y)\, dy=\int_u^vf_w(w,y)\, dy}$ is correct, or not? (Wondering)
I like Serena said:
I think that a plus and minus sign should be exchanged. (Worried)

So, we get \begin{align*}F'(x)&=\frac{\partial{H}}{\partial{u}}(g(x), h(x), x)\cdot g'(x)+\frac{\partial{H}}{\partial{v}}(g(x), h(x), x)\cdot h'(x)+\frac{\partial{H}}{\partial{w}}(g(x), h(x), x)\\ & = -f(x, g(x))\cdot g'(x)+f(x, h(x))\cdot h'(x)+\int_{g(x)}^{h(x)}f_x(x,h(x))\, dy\end{align*}
right? (Wondering)
 
Indeed. All correct. (Happy)
 
All of that can be encapsulated into "Leibniz's rule":

\frac{d}{dx}\int_{\alpha(x)}^{\beta(x)} F(x, t)dt= \frac{d\beta}{dx}F(x, \beta(x))- \frac{d\alpha(x)}{dx}F(x,\alpha(x))+ \int_{\alpha(x)}^{\beta(x)} \frac{\partial F(x,t)}{\partial x} dx
 
  • #10
Thank you very much! (Smile)
 
Back
Top