# Calculating Derivative of Integral w/ Chain Rule

• MHB
• mathmari
In summary, the conversation discusses the calculation of the derivative of an integral using the chain rule. The hint given is to define two functions, $G$ and $H$, and then use the chain rule to find the derivative of the integral. The conversation also discusses the derivatives of $G$ and $H$, with some clarification on the notation and terminology. Ultimately, it is determined that the derivative of the integral can be expressed as a combination of the partial derivatives of $f$ and the derivatives of $g$ and $h$.
mathmari
Gold Member
MHB
Hey!

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)

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$$

Thank you very much! (Smile)

## 1. What is the chain rule?

The chain rule is a mathematical rule used to calculate the derivative of a composite function, which is a function made up of two or more functions. It states that the derivative of a composite function is equal to the derivative of the outer function multiplied by the derivative of the inner function.

## 2. How do you use the chain rule to calculate the derivative of an integral?

In order to use the chain rule to calculate the derivative of an integral, you first need to rewrite the integral in terms of a composite function. Then, you can apply the chain rule to the composite function to find the derivative. Finally, you can substitute the result back into the original integral to get the final answer.

## 3. Can the chain rule be applied to any type of integral?

Yes, the chain rule can be applied to any type of integral, including definite and indefinite integrals. As long as the integral can be rewritten in terms of a composite function, the chain rule can be used to find the derivative.

## 4. What are the common mistakes when using the chain rule to calculate the derivative of an integral?

One common mistake is forgetting to apply the chain rule to the inner function and only finding the derivative of the outer function. Another mistake is incorrectly rewriting the integral in terms of a composite function, leading to an incorrect result.

## 5. Are there any shortcuts or tricks for using the chain rule to calculate the derivative of an integral?

Yes, you can use the substitution method to make the integral easier to rewrite in terms of a composite function. This can save time and reduce the chance of making mistakes when using the chain rule to find the derivative.

• Calculus
Replies
6
Views
2K
• Calculus
Replies
6
Views
547
• Calculus
Replies
4
Views
987
• Calculus
Replies
9
Views
2K
• Calculus
Replies
6
Views
2K
• Calculus
Replies
2
Views
2K
• Calculus
Replies
3
Views
2K
• Calculus
Replies
2
Views
867
• Calculus
Replies
10
Views
2K
• Calculus
Replies
0
Views
519