\(\displaystyle{\frac{{{d}}}{{{d}\mu}}}{f{{\left(\mu\right)}}}=-{2}{\sum_{{{i}={1}}}^{{{n}}}}{\left({x}_{{{1}}}-\mu\right)}=-{2}{\sum_{{{i}={1}}}^{{{n}}}}{x}_{{{i}}}+{2}{n}\mu\)

\(\displaystyle{\frac{{{d}^{{{2}}}}}{{{d}\mu^{{{2}}}}}}{f{{\left(\mu\right)}}}={2}{n}\)

In the 1st step on line 1, the chain rule is applied. The term within the brackets is differentiated, producing a -1.

Then the bracket itself is differentiated, producing the 2 at the front. The 2nd step on line 1 involves no differentiation. Instead, the bracket is split into two terms.

The second term has an n because it is simply the summation from \(\displaystyle{i}={1}\) to \(\displaystyle{i}={n}\) of a constant.

The summation of a constant is equal to n multiplied by the constant. Then for the second line, there are no extra rules.

The first term becomes 0 because it's a constant and the second term loses \(\displaystyle\mu\).