ax2+bx+c=0{\displaystyle ax^{2}+bx+c=0} The only condition is that a≠0,{\displaystyle a\neq 0,} because otherwise, the equation reduces to a linear equation. See if you can find general solutions for the special cases where b=0{\displaystyle b=0} and where c=0. {\displaystyle c=0. }

ax2+bx=−c{\displaystyle ax^{2}+bx=-c}

x2+bax=−ca{\displaystyle x^{2}+{\frac {b}{a}}x={\frac {-c}{a}}}

x2+2b2ax+b24a2=b24a2−ca(x+b2a)2=b24a2−ca{\displaystyle {\begin{aligned}x^{2}+2{\frac {b}{2a}}x+{\frac {b^{2}}{4a^{2}}}&={\frac {b^{2}}{4a^{2}}}-{\frac {c}{a}}\\left(x+{\frac {b}{2a}}\right)^{2}&={\frac {b^{2}}{4a^{2}}}-{\frac {c}{a}}\end{aligned}}} Here, it is clear why a≠0,{\displaystyle a\neq 0,} since a{\displaystyle a} is in the denominator, and you cannot divide by 0. If you need to, you can expand the left side to confirm that completing the square works.

(x+b2a)2=b24a2−4ac4a2=b2−4ac4a2{\displaystyle {\begin{aligned}\left(x+{\frac {b}{2a}}\right)^{2}&={\frac {b^{2}}{4a^{2}}}-{\frac {4ac}{4a^{2}}}\&={\frac {b^{2}-4ac}{4a^{2}}}\end{aligned}}}

|x+b2a|=b2−4ac4a2{\displaystyle \left|x+{\frac {b}{2a}}\right|={\sqrt {\frac {b^{2}-4ac}{4a^{2}}}}} Now, we can get rid of the absolute value bars by putting a ±{\displaystyle \pm } on the right side. We can do this because the absolute value does not distinguish between positive and negative, so they are both valid. This tidbit is why the quadratic equation allows us to get two roots. x+b2a=±b2−4ac4a2{\displaystyle x+{\frac {b}{2a}}=\pm {\sqrt {\frac {b^{2}-4ac}{4a^{2}}}}} Let’s simplify this expression a bit further. Since the square root of a quotient is the quotient of the square roots, we can write the right side as ±b2−4ac4a2. {\displaystyle {\frac {\pm {\sqrt {b^{2}-4ac}}}{\sqrt {4a^{2}}}}. } Then we can take the square root of the denominator. x+b2a=±b2−4ac2a{\displaystyle x+{\frac {b}{2a}}={\frac {\pm {\sqrt {b^{2}-4ac}}}{2a}}}

|x+b2a|=b2−4ac4a2{\displaystyle \left|x+{\frac {b}{2a}}\right|={\sqrt {\frac {b^{2}-4ac}{4a^{2}}}}} Now, we can get rid of the absolute value bars by putting a ±{\displaystyle \pm } on the right side. We can do this because the absolute value does not distinguish between positive and negative, so they are both valid. This tidbit is why the quadratic equation allows us to get two roots. x+b2a=±b2−4ac4a2{\displaystyle x+{\frac {b}{2a}}=\pm {\sqrt {\frac {b^{2}-4ac}{4a^{2}}}}} Let’s simplify this expression a bit further. Since the square root of a quotient is the quotient of the square roots, we can write the right side as ±b2−4ac4a2. {\displaystyle {\frac {\pm {\sqrt {b^{2}-4ac}}}{\sqrt {4a^{2}}}}. } Then we can take the square root of the denominator. x+b2a=±b2−4ac2a{\displaystyle x+{\frac {b}{2a}}={\frac {\pm {\sqrt {b^{2}-4ac}}}{2a}}}

x=−b2a±b2−4ac2a{\displaystyle x={\frac {-b}{2a}}\pm {\frac {\sqrt {b^{2}-4ac}}{2a}}}

x=−b±b2−4ac2a{\displaystyle x={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}}