Completing the Square Calculator

Complete squares step by step

The calculator will try to complete the square for the given quadratic expression, ellipse, hyperbola, or any polynomial expression, with steps shown.

Enter an expression:

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Solution

Your input: complete the square in $$$\frac{x^{2}}{2} + 2 x - 1$$$.

Add and subtract $$$2$$$:

$$$\frac{x^{2}}{2} + 2 x - 1=\frac{x^{2}}{2} + 2 x - 1 + {\color{red}{\left(2\right)}} - {\color{red}{\left(2\right)}}$$$

Factor $$$\frac{1}{2}$$$:

$$$-3 + {\color{red}{\left(\frac{x^{2}}{2} + 2 x + 2\right)}}=-3 + {\color{red}{\left(\frac{x^{2} + 4 x + 4}{2}\right)}}$$$

Complete the square:

$$$-3 + \frac{{\color{red}{\left(x^{2} + 4 x + 4\right)}}}{2}=-3 + \frac{{\color{red}{\left(x + 2\right)^{2}}}}{2}$$$

Answer: $$$\frac{x^{2}}{2} + 2 x - 1=\frac{\left(x + 2\right)^{2}}{2} - 3$$$.