Gradient of $g(t):=f(tx+(1−t)y)$

114 Views Asked by At

I want to find the gradient of $g(t)=f(tx+(1−t)y)$, where $f$ is a single valued function, but I'm unable to do so. My approach to this: $$ \begin{split} g'(t) &= \left< \nabla f((tx+(1−t)y),x−y \right > \\ g''(t) &= \left< \nabla^2 f((tx+(1−t)y)(x−y),x−y \right> \end{split} $$ Can you help me please?

3

There are 3 best solutions below

1
On

If the intent is to have constant values of $x,y$, so indeed $g(\cdot)$ would only depend on one parameter $t$, then $\vec{\nabla} g(t)$ is a vector with one coordinate, $g'(t)$. Can you find it?

If instead, the intent is that $g$ depends on $x,y$ as well, so we have $$g(x,y,t) = f(tx + (1-t)y),$$ then you have $$ \vec{\nabla} g(x,y,t) = \left[ \frac{\partial g}{\partial x}, \frac{\partial g}{\partial y}, \frac{\partial g}{\partial t} \right]. $$

Can you use the Chain Rule to find each partial derivative?

1
On

Assuming that $f$ maps $\Bbb R^n$ into $\Bbb R$, let $h:\Bbb R \to \Bbb R^n$ given by

$$h(t) = tx + (1-t)y = y + t(x-y).$$

Then, $g = f\circ h$ and, by the chain rule,

$$g'(t) = (\nabla f)(h(t)) h'(t)$$

where $h'(t)$ is the column vector $x-y$ and

$$(\nabla f)(h(t)) = \Big( \frac{\partial f}{\partial x_1}(h(t)) , \dots, \frac{\partial f}{\partial x_n}(h(t)) \Big).$$

1
On

Let us explain in the bidimensional case, assuming $f(u,v)$.

By the chain rule

$$\frac{f(u(t), v(t))}{dt}=f_u(u(t),v(t))\frac{du(t)}{dt}+f_v(u(t),v(t))\frac{dv(t)}{dt}.$$

Then with $(u(t),v(t))=(x_u t+y_u(1-t),x_v t+y_v(1-t))$ we have

$$ \begin{split} \frac{f(u(t), v(t))}{dt} &= f_u(u(t),v(t)) (x_u-y_u) + f_v(u(t),v(t)) (x_v-y_v) \\ &= \left< \nabla f(u(t),v(t)),x-y \right>. \end{split} $$