Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Complete the square of a quadratic polynomial having any number of variables but with no mixed terms
ResourceFunction["CompleteTheSquare"][quad,vars] completes the square of the quadratic polynomial quad in the variables vars that has no mixed terms. |
Complete the square of a quadratic polynomial in x:
In[1]:= |
Out[1]= |
Complete the square in x of a quadratic polynomial in x and y:
In[2]:= |
Out[2]= |
Complete the square in both x and y:
In[3]:= |
Out[3]= |
Symbolic coefficients are allowed:
In[4]:= |
Out[4]= |
Complete the square symbolically for a trivariate quadratic polynomial:
In[5]:= |
Out[5]= |
If the expression is not a polynomial, an error message is returned:
In[6]:= |
If the expression is not a polynomial of degree 2, an error message is returned:
In[7]:= |
If the polynomial contains mixed terms, an error message is returned:
In[8]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License