Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

Consider the function $f(\mu) = \sum_{i = 1}^{n} (x_i - \mu)^2$, where $x_i = i,\,i=1, 2,\dots, n$.

What is the first and second derivative of $f(\mu)$?

$\endgroup$ 11

3 Answers

$\begingroup$

$f'(\mu) = -2\sum_{i = 1}^{n} (x_i - \mu)$ and $f''(\mu)=2n$

$\endgroup$ 8 $\begingroup$

$$\frac{d}{d \mu} f(\mu) = -2 \sum_{i=1}^n (x_i - \mu) = -2 \sum_{i=1}^n x_i + 2 n \mu $$

$$\frac{d^2}{d \mu^2} f(\mu) = 2 n $$

$\endgroup$ 4 $\begingroup$

Adding an answer here to further clarify the other ones which are simply answers without steps. To get the first derivative, this can be re-written as:

$$\frac{d}{d\mu}\sum(x-\mu)^{2} \\ = \sum\frac{d}{d\mu}(x-\mu)^{2} $$

After that it's standard fare chain rule

$$ = \sum-1 \cdot 2(x-\mu) \\ = -2\sum(x-\mu) $$

Second derivative: you can observe the same property of linear summation:$$ \frac{d}{d\mu}-2\sum(x-\mu) \\ =-2\sum\frac{d}{d\mu}(x-\mu) \\ =-2\sum(-1) \\ =2n $$

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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