<s>[INST] What is the least value of the function $y= (x-2) (x-4)^2 (x-6) + 6$? What is the least value of function:
$$y= (x-2)  (x-4)^2  (x-6) + 6$$
For real values of $x$ ?
Does $\frac{dy}{dx} = 0$, give the value of $x$ which will give least value of $y$?
Thanks in advance.
 [/INST] $$\frac{dy}{dx} = (x-4)^2 (x-6)+(x-4)^2 (x-2)+2(x-2)(x-4)(x-6) = 0 $$
$$ \Rightarrow (x-4) \left[ (x-4)(2x-8)+2(x-2)(x-6) \right] = 0$$
$$ \Rightarrow (x-4) \left[ 2x^2-16x+32+2x^2-16x+24 \right] = 0$$
$$ \Rightarrow (x-4) \left[ 4x^2-32x+56 \right] = 0$$
$$ \Rightarrow 4(x-4) \left[ (x-4+\sqrt{2})(x-4-\sqrt{2}) \right] = 0$$
There is a maxima or minima at $x=4, \hspace{5pt}x=(4-\sqrt{2}),\hspace{5pt} x=(4+\sqrt{2})$ 
If you take the second derivative and find where the second derivative is positive, that is where the function value has a minima.
Second derivative is 
$$8(x-4)^2+4(x-4+\sqrt{2})(x-4-\sqrt{2})$$
And at $x=4\pm\sqrt{2}$ for instance the second derivative is positive and therefore at it is minimum at those points.
</s>