Basic Examples 
(5)
 

Complete the square of a quadratic polynomial in
x
:
In[13]:=
[◼]
CompleteTheSquare
[
2
x
+2x-14,x]
Out[13]=
-15+
2
(1+x)
———
Complete the square in
x
of a quadratic polynomial in
x
and
y
:
In[14]:=
[◼]
CompleteTheSquare
[
2
x
+2x+2
2
y
+7y==14,x]
Out[14]=
-15+
2
(1+x)
+7y+2
2
y
———
Complete the square in both
x
and
y
:
In[15]:=
[◼]
CompleteTheSquare
[
2
x
+2x+2
2
y
+7y==14,{x,y}]
Out[15]=
-
169
8
+
2
(1+x)
+2
2
7
4
+y
———
Symbolic coefficients are allowed:
In[16]:=
[◼]
CompleteTheSquare
[a
2
x
+bx+π,x]
Out[16]=
-
2
b
4a
+π+a
2
b
2a
+x
———
Complete the square symbolically for a trivariate quadratic polynomial:
In[17]:=
[◼]
CompleteTheSquare
[
3
(a+c)
2
x
+bx+2π
2
y
+7y-14+
2
z
+
2
(a+z)
π+Sin[2],{x,y,z}]
Out[17]=
3
(a+c)
2
b
2
3
(a+c)
+x
+2π
2
7
4π
+y
+2
2
a
2
+z
+
1
8
-112+4
2
a
-
2
2
b
3
(a+c)
-
49
π
-8π-8Sin[2]

Possible Issues 
(3)
 
