<s>[INST] Extrema of a funcion of $x$ depending on $n$. I have this function:
$$f(x)=\frac{x^{3}+3(\sqrt{n}-2)x^{2}-24\sqrt{n}x-2}{n^{2}}$$
I have to find the critical point of this funcion depending on $n\ge1\in \mathbb N$.
So I have computed the first derivative
$$f'(x)=\frac{3x^{2}+6(\sqrt{n}-2)x-24 \sqrt{n}}{n^{2}}$$
So the problem is, since in this case $n^{2}\ge1$ is always positive and $\neq 0$, studying:
$$3x^{2}+6(\sqrt{n}-2)x-24 \sqrt{n}=0$$
I've tried and tried to solve this equation without finding the correct answer. Could someone help me? Thank you :).
 [/INST] You have obtained a quadratic equation $ax^2+bx+c=0$ then, as a standard method, we can apply the formula for the roots
$$x_{1,2}=\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
to $$x^2+(2\sqrt n-4)x-8\sqrt n=0$$
and obtain
$$x_{1,2}=\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}=\frac{-(2\sqrt n-4)\pm \sqrt{4n+16-16 \sqrt n + 32\sqrt n}}{2}=\frac{-(2\sqrt n-4)\pm (2\sqrt n+4)}{2}= 4, \quad-2\sqrt n$$
As an alternative, this is the way indicated by Lord Shark the Unknown, use that
$$(x-x_1)(x-x_2)=x^2-(x_1+x_2)x+x_1x_2=0$$
and thus


*

*$x_1+x_2=-2\sqrt n+4$

*$x_1x_2=-8\sqrt n$


and solve from here.
</s>