PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Revision difference : completing the square
Version 2 Version 1
\newcommand{\sR}[0]{\mathbb{R}} Let us consider the expression $x^2+xy$, where
Let us consider the expression $x^2+xy$, where $x$ and $y$ are real (or complex) numbers.
$x$ and $y$ are real (or complex) numbers. Using the formula
Using the formula $$(x+y)^2 = x^2+2xy +y^2$$
$$(x+y)^2 = x^2+2xy +y^2$$ we can write
we can write
\begin{eqnarray*}
x^2+xy &=& x^2+xy+ 0\\
&=& x^2+xy+ \frac{y^2}{4}-\frac{y^2}{4}\\
&=& (x+\frac{y}{2})^2-\frac{y^2}{4}.
\end{eqnarray*}
This manipulation is called \emph{completing the square} in
$x^2+xy$, or completing the square $x^2$.
Replacing $y$ by $-y$, we also have
$$x^2-xy = (x-\frac{y}{2})^2-\frac{y^2}{4}.$$
Here are some uses of this method:
\begin{itemize}
\item
\PMlinkname{Derivation of the solution formula to the quadratic equation}{DerivationOfQuadraticFormula}.
\item Completing the square can also be used to find the extremal value
of a quadratic polynomial \cite{thompson}.
We illustrate this for the polynomial $p(x)=4x^2+8x+9$. Completing the
square yields
\begin{eqnarray*} \begin{eqnarray*}
p(x) &=& (2x+2)^2-4 +9 \\ x^2+xy &=& x^2+xy+ 0\\
&=& (2x+2)^2+5 \\ &=& x^2+xy+ \frac{y^2}{4}-\frac{y^2}{4}\\
&\ge & 5 &=& (x+\frac{y}{2})^2-\frac{y^2}{4}.
\end{eqnarray*} \end{eqnarray*}
since $(2x+2)^2\ge 0$. On the last line, equality is obtained if and This manipulation is called \emph{completing the square} in
only if $x=-1$. $x^2+xy$, or completing the square $x^2$.
Thus $p(x)\ge 5$ for all $x\in \sR$, and $p(x)=5$ if and only if Replacing $y$ by $-y$, we also have
$x=-1$. $$x^2-xy = (x-\frac{y}{2})^2+\frac{y^2}{4}.$$
It follows that $p(x)$ has a global minimum at $x=-1$, where $p(-1)=5$. As an example,
\end{itemize} the above method is used to
{\bf See also} derive
\begin{itemize} \PMlinkname{the solution formula to the quadratic equation}{DerivationOfQuadraticFormula}.
\item E. Weisstein, Eric W. Weisstein's world of mathematics,
\PMlinkexternal{entry on completing the square}{http://mathworld.wolfram.com/CompletingtheSquare.html}.
\end{itemize}
\begin{thebibliography}{9}
\bibitem {thompson}
\emph{Matematik Lexikon} (in Swedish),
ed. J. Thompson, T. Martinsson, Wahlstr\"om \& Widstrand, 1991.
\end{thebibliography}
(Anyone has an English reference?)