I have a simple question about the partial derivative of a function including an absolute value. I am reading a book and there is a summation:

$$ A = β\sum_\textbf{x} ||\textbf{x}||^n r(\textbf{x})$$ where $n \in \mathbb{R}_{\geq 0}$, $\beta \in \mathbb{R}_{\geq 0}$ and $\textbf{x} = (x_0, x_1, ... , x_{M−1})^T$. My question is: Can I treat the elements $||\textbf{x}||^n$ from summation as a constant during the partial derivative in relation to $r(\textbf{x})$, obtaining: $$\frac{\partial A(\textbf{x})}{\partial r(\textbf{x})} = β||\textbf{x}||^n$$?


1 Answer 1


If you define the function as $ H(x, y) = \beta \|x\| y$, then $A(x) = H(x, r(x))$ and

$$\partial_{r(x)}H(\|x\|, r(x)) = \beta \|x\|$$ also, you need to be carefull with the sum. If it is on a finite set then

$$\frac{\partial A(x)}{\partial r(\textbf{x})} = β\sum_x||\textbf{x}||^n$$

Don't forget to remember that $$\frac{\partial A(x)}{\partial x} = \sum_x \partial_{x}H(\|x\|, r(x)) + \partial_{r(x)}H(\|x\|, r(x)) $$

  • $\begingroup$ +! for the line "Don't forget to remember" :-) $\endgroup$
    – Autolatry
    Jul 20, 2015 at 15:33
  • $\begingroup$ I've changed the definition to represent exactly what I saw in this book. Sorry if the first time I was not precise, but the answer does not contain the summation $\endgroup$
    – Mauro
    Feb 9, 2016 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .