Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to compute the derivative of this function:

$f(\alpha) = \sum_{i=1}^n \left[U_i - U_0 \left( \frac{h_i}{h_0} \right)^\alpha \right]^2$

where $h_0$ and $U_0$ are constant. I thought it was

$\frac{d}{d\alpha} f(\alpha) = -2 \sum_{i=1}^n \left[U_i - U_0 \left( \frac{h_i}{h_0} \right)^\alpha \right] \alpha U_0 \left( \frac{h_i}{h_0} \right)^{\alpha-1}$

but i don't know why, when i plot this with MATLAB i find something that is obviously not the derivative of $f(\alpha)$

Where am I wrong?

Thank you very much

share|cite|improve this question

Your inner derivative is wrong. The derivative of $$k^\alpha = \exp(\alpha \log k) $$ with respect to $\alpha$ is $$ \exp(\alpha \log k) \log k = \log k \cdot k^\alpha$$ not $\alpha k^{\alpha - 1}$. So the derivative should be $$ -2\sum_{i=1}^n \left[ U_i - U_0 \left(\frac{h_i}{h_0}\right)^{\alpha}\right]U_0\left(\frac{h_i}{h_0}\right)^\alpha \cdot \log \frac{h_i}{h_0} $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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