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,

 A: 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".
Once you've found where the critical points are, you can use the 2nd derivative test to tell more about them. If the second derivative is negative at a critical point, then the point is a local maximum. If the second derivative is positive, then the critical point is a local minimum. (If the second derivative is zero, the test fails to classify the critical point.)
Once you've found a local maximum for this function, to prove that it is not a global maximum, you also have to show that somewhere else the function is higher than it is at the local maximum.
