Basic Examples
Basic Examples
Complete the square of a quadratic polynomial in :
x
2
x
In[]:=
-15+
2
(1+x)
Out[]=
Complete the square in of a quadratic polynomial in and :
x
x
y
2
x
2
y
In[]:=
-15++7y+2
2
(1+x)
2
y
Out[]=
Complete the square in both and :
x
y
2
x
2
y
In[]:=
-++2+y
169
8
2
(1+x)
2
7
4
Out[]=
Symbolic coefficients are allowed:
2
x
In[]:=
-+π+a+x
2
b
4a
2
b
2a
Out[]=
Complete the square symbolically for a trivariate quadratic polynomial:
3
(a+c)
2
x
2
y
2
z
2
(a+z)
In[]:=
3
(a+c)
2
b
2
3
(a+c)
2
7
4π
2
a
2
1
8
2
a
2
2
b
3
(a+c)
49
π
Out[]=
Possible Issues
Possible Issues
If the expression is not a polynomial, an error message is returned:
2
x
2
y
In[]:=
Poly
2
x
2
y
If the expression is not a polynomial of degree 2, an error message is returned:
3
y
In[]:=
Poly
3
y
If the polynomial contains mixed terms, an error message is returned:
2
y
In[]:=
Poly
2
y