<s>[INST] Find the maximum or minimum value of the quadratic function. Find the maximum or minimum value of the quadratic function by completing the squares. Also, state the value of $x$ at which the function is maximum or minimum.
$y=2x^2-4x+7$
$x^2$ has a coefficient of $2$, how should I complete the squares?
 [/INST] $y=2x^2-4x+7$ therefore $y=2(x^2-2x+7/2)$
completing the square now gives $y=2[(x-1)^2-1+7/2]$
which rearranges to $y=2(x-1)^2+5$
For completing the square, I always divide by a number that ensures I have $1$ as the coefficient of $x^2$.
To get the minimum value there are two options:
1) By looking at the equation after we have completed the square we can see that we will always have the $+5$ term, so we need to minimize the $2(x-1)^2$ term. Because it's square it will never be negative, however, we can make it equal to zero. So, $2(x-1)^2=0$, therefore $(x-1)^2=0$ and $x-1=0$ so $x=1$ is the minimum point.
2) Using differentiation. $y'=4x-4$ then set this equal to zero so $4x-4=0$, $4x=4$ and $x=1$.
</s>