Core idea

For real a≠0,b,ca\ne0,b,c, completing the square is the identity

ax2+bx+c=a(x+b2a)2+c−b24a.ax^2+bx+c=a\left(x+\frac{b}{2a}\right)^2+c-\frac{b^2}{4a}.

Expansion proves the formula. If a>0a>0, it shows that the minimum is c−b2/(4a)c-b^2/(4a), attained at x=−b/(2a)x=-b/(2a); if a<0a<0, the same value is the maximum.

Gaussian factors

For a>0a>0, e−ax2+bx=eb2/(4a)e−a(x−b/(2a))2e^{-ax^2+bx}=e^{b^2/(4a)}e^{-a(x-b/(2a))^2}. This separates an overall amplitude from a translated decaying profile. The sign of the quadratic coefficient is essential for decay.