0
$\begingroup$

Suppose $x \in \mathbb{R}^n$, and $f : \mathbb{R} \rightarrow \mathbb{R}$, $g :\mathbb{R}^n \rightarrow \mathbb{R}$ are two functions. $F(u)$ is the primitive function of $f$, $F(u) = \int_0^u f(v) dv$.

I want to compute the gradient of $F(g(x))$. I know that I should use the chain rule, but I couldn't understand chain rule in higher dimensions.

$\endgroup$

2 Answers 2

1
$\begingroup$

The answer is $$(F'(g(x))\frac {\partial g} {\partial x_1},F'(g(x))\frac {\partial g} {\partial x_2},..., F'(g(x))\frac {\partial g} {\partial x_n})$$ $$=(f(g(x))\frac {\partial g} {\partial x_1},f(g(x))\frac {\partial g} {\partial x_2},..., f(g(x))\frac {\partial g} {\partial x_n})$$

$\endgroup$
1
$\begingroup$

Let $h(x)=F(g(x))$. The multivariate chain rule states $dh=\frac{\partial h}{\partial dx^i}dx^i$, with implicit summation over repeated indices. By the univariate chain rule, $\frac{\partial h}{\partial x^i}=f(g(x))\frac{\partial g}{\partial x^i}$, so $dh=f(g(x))\frac{\partial g}{\partial x^i}dx^i$. In particular, $\nabla h$ is the vector whose $i$th component is the $dx^i$ coefficient, so $\nabla h=f(g)\nabla g$, in agreement with @KaviRamaMurthy's answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.