# Proving that a function $f(x)$ with a variable has only a local maximum

$$f_n(x)=nx^n+n\ln(|x|)$$.

So this is what we have, I do understand the steps but I got stuck at one step, as follows. Firstly we need to find the derivatives of the function, the first and the second, which are \begin{align} (f_n)'(x)=n^2x^{n-1}+\frac{n}{x}, && (f_n)''(x)=(n−1)n^2x^{n−2}−\frac{n}{x^2}. \end{align} Now in the proof I do not understand why we have to solve the first derivative and get $$x$$, then substitute $$x$$ in the second function, like this,

$$f''_n\left(\frac{1}{\sqrt[n]{-n}}\right)=(n−1) n^2\left(\frac{1}{\sqrt[n]{-n}}\right)^{n-2}-n\left(\frac{1}{\sqrt[n]{-n}}\right)^2$$

$$x$$ is give through this process which I understand,

• Note: to prove the satement, they say that we need to see if the second derevative will be less than zero and if it holds. Jul 12, 2022 at 15:26
• Some MathJax tips: Using $f'_n(x) = 0$ yields $f'_n(x) = 0$. Enclose the equation in double dollar signs to use display mode (equation goes on its own line). Fractions like this: $\frac{1}{-n}$ yields $\frac{1}{-n}$. Radicals like this: $\sqrt[n]{k}$ yields $\sqrt[n]{k}$. Jul 12, 2022 at 17:10
At a maximum or minimum, the first derivative will be $$0$$, so you set the first derivative to $$0$$ and solve for $$x$$ to locate where the maximums or minimums can be (the first derivative being $$0$$ doesn't mean it is either one - it could be an inflection point - but looking only at the zeros of the first derivative usually cuts down the number of possible locations for an extremum to just a few). The locations where the first derivative is $$0$$ are called "critical points".