1
$\begingroup$

I've tryied to calculate the following derivative using the chain rule, but in vain. Could you please help me with it? So I have a absolute value of a gradient of a function f, and I need to calculate the derivative of it with respect to the same function f.

$$\frac{d(|\nabla f|)}{df}$$

thanks!

To correct my question.

I came to the $$\frac{d(|\nabla f|)}{df}$$ derivative mistakenly.

The expression that wanted to evalualte was $$\nabla e^{f(x)|\nabla f(x)|}$$, and thanks to @mfl now I know how to do it.

$\endgroup$
  • $\begingroup$ Look again. A gradient is a vector. Absolute values are for scalars. So those vertical bars mean what? $\endgroup$ – mvw Aug 9 '18 at 18:44
  • $\begingroup$ @mvw It is $|\nabla f|=\sqrt{\nabla f\cdot \nabla f}.$ In any case it is not clear to me what derivative you want to have. Is it possible that you are looking for the derivative of $|\nabla f|$ in the direction of $\nabla f?$ $\endgroup$ – mfl Aug 9 '18 at 18:57
  • $\begingroup$ Don't tell me.There seems to be something missing or wrong. $\endgroup$ – mvw Aug 9 '18 at 19:05
  • $\begingroup$ @mfl So I have the magnitude of the gradient of a function $f$ with respect to the same function $f$. It came when I was calculating the following: $\nabla (exp(f(\textbf{r})|\nabla f(\textbf{r})|))$ $\endgroup$ – user582956 Aug 9 '18 at 19:30
  • $\begingroup$ So, you want to get $\nabla e^{f(x)|\nabla f(x)|}.$ Is it correct? $\endgroup$ – mfl Aug 9 '18 at 19:35
0
$\begingroup$

Partial answer

We have that

\begin{align} \dfrac{\partial}{\partial x_i}e^{f(x)|\nabla f(x)|}&=e^{f(x)|\nabla f(x)|}\dfrac{\partial}{\partial x_i}(f(x)|\nabla f(x)|) \\&=e^{f(x)|\nabla f(x)|}\left(|\nabla f(x)|\dfrac{\partial}{\partial x_i}f(x)+f(x)\dfrac{\partial}{\partial x_i}|\nabla f(x)|\right) \end{align}

Now, it is

$$|\nabla f|=\sqrt{\sum_{i=j}^n\left(\dfrac{\partial f}{\partial x_j}\right)^2}$$

and thus

$$\dfrac{\partial}{\partial x_i}|\nabla f(x)|=\dfrac{\displaystyle\dfrac{\partial}{\partial x_i}\sum_{j=1}^n\left(\dfrac{\partial f}{\partial x_j}\right)^2}{\displaystyle2\sqrt{\sum_{j=1}^n\left(\dfrac{\partial f}{\partial x_j}\right)^2}}=\dfrac{\displaystyle\sum_{j=1}^n\dfrac{\partial^2 f}{\partial x_i\partial x_j}}{\displaystyle\sqrt{\sum_{j=1}^n\left(\dfrac{\partial f}{\partial x_j}\right)^2}}.$$

And now I hope you can get the answer.

$\endgroup$
  • $\begingroup$ thanks so much, now I see my mistake. That derivative of the magnitude appeared because I used incorrectly the chain rule for a gradient of a composite function. $\endgroup$ – user582956 Aug 9 '18 at 21:26

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.