Solution:
Consider the quadratic equation:
[tex]ax^2+bx+c=0[/tex]to solve this quadratic equation by completing the square, we can perform the following steps:
Step 1: transform the equation so that the constant term c is alone on the right side:
[tex]ax^2+bx=-c[/tex]Step 2: If a, the leading coefficient, is not equal to 1, then divide both sides of the above equation by a:
[tex]x^2+\frac{b}{a}^{}x=-\frac{c}{a}[/tex]Step 3: add the square of half the coefficient of the x-term, to both sides of the equation:
[tex]x^2+\frac{b}{a}^{}x+(\frac{b}{2a})^2=-\frac{c}{a}\text{ }+(\frac{b}{2a})^2[/tex]Step 4: Factor the left side as the square of a binomial:
[tex](x+\frac{b}{2a})^2=-\frac{c}{a}\text{ }+(\frac{b}{2a})^2[/tex]now, if we denote by q = b/(2a) and by r the right side of the above equation, we get:
[tex](x+q)^2=r[/tex]Step 5: Take the square root of both sides, to obtain:
[tex]x+q^{}=\pm\sqrt[]{r}[/tex]Step 6: solve for x:
[tex]x=\pm\sqrt[]{r}\text{ - q}[/tex]