CompleteSquare

CompleteSquare

CompleteSquare[ expr, var ] writes an expression to the completed square form.

Usages

CompleteSquare[ expr, var ]

CompleteSquare[ expr, var ] writes a quadratic expression expr to the completed square form with respect to variable var.

Example in reduced
The completed square form of x^2 - 10x + 16. CompleteSquare[ x^2 - 10x + 16,x ] (x-5)^2-9

CompleteSquare[ equa, var ]

CompleteSquare[ equa, var ] writes a quadratic equation equa in completed square form with respect to variable var.

Example in reduced
The completed square form of x^2 - 10x = -16. CompleteSquare[x^2 - 10x = -16, x] (x-5)^2=9

CompleteSquare[ expr, {var1, ..., varn}]

CompleteSquare[ expr, {var1, ..., varn}] writes a quadratic expression expr to the completed square form with respect to each of the variables var1, ..., varn.

Example in reduced
The completed square form of x^2 + 6x + y^2 + 10y + 30 with respect to both x and y. CompleteSquare[ x^2 + 6x + y^2 + 10y + 30, {x,y}] (y+5)^2 + (x+3)^2 - 4

CompleteSquare[ equa, {var1, ..., varn}]

CompleteSquare[ equa, {var1, ..., varn}] writes a quadratic equation equa to the completed square form with respect to each of the variables var1, ..., varn.

Example in reduced
The completed square form of x^2 + 6x + y^2 + 10y + 30 = 0. CompleteSquare[x^2 + 6x + y^2 + 10y + 30 = 0, {x,y}] (y+5)^2 + (x+3)^2 = 4

CompleteSquare[ (var1 - expr1)^2+(var2 - expr2)^2 = expr3^2 , {var1, var2} ]

CompleteSquare[ (var1 - expr1)^2+(var2 - expr2)^2 = expr3^2 , {var1, var2} ] is a special case of CompleteSquare to let students derive the formula for a circle. This command writes the equation for a circle in centre-radius form.

Example in reduced
The centre-radius form of the circle equation. CompleteSquare[ (x-h)^2+(y-k)^2 = r^2 , {x,y} ] (x-h)^2+(y-k)^2 = r^2