### Theory:

Consider the quadratic equation $$ax^2 + bx + c = 0$$, where $$a \ne 0$$.

Let us find the roots of this equation by the method of completing the square.

Divide the equation by $$a$$.

${x}^{2}+\frac{b}{a}x+\frac{c}{a}=0$

Move the constant to the right side.

${x}^{2}+\frac{b}{a}x=-\frac{c}{a}$

Add the square of one half of coefficient of $$x$$ on both sides.

${x}^{2}+\frac{b}{a}x+{\left(\frac{b}{2a}\right)}^{2}=-\frac{c}{a}+{\left(\frac{b}{2a}\right)}^{2}$

${\left(x+\frac{b}{2a}\right)}^{2}=-\frac{c}{a}+\frac{{b}^{2}}{4{a}^{2}}$

${\left(x+\frac{b}{2a}\right)}^{2}=\frac{{b}^{2}-4\mathit{ac}}{4{a}^{2}}$

Taking square root on both sides.

$x+\frac{b}{2a}=±\sqrt{\frac{{b}^{2}-4\mathit{ac}}{4{a}^{2}}}$

$x+\frac{b}{2a}=±\frac{\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$

$x=-\frac{b}{2a}±\frac{\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$

$x=\frac{-b±\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$

Therefore, the roots of $$ax^2 + bx + c = 0$$ are $x=\frac{-b+\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$ and $x=\frac{-b-\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$.
The formula for finding the roots of the quadratic equation $$ax^2 + bx + c = 0$$ is:

$x=\frac{-b±\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$

This formula is known as the quadratic formula.
Example:
1. Find the roots of $$2x^2 + 3x - 77 = 0$$ by using quadratic formula.

Solution:

The given equation is $$2x^2 + 3x - 77 = 0$$.

Here, $$a = 2$$, $$b = 3$$ and $$c = -77$$.

$x=\frac{-b±\sqrt{{b}^{2}-4\mathit{ac}}}{2a}$

Substitute the given values in the formula.

$x=\frac{-3±\sqrt{{3}^{2}-4×2×\left(-77\right)}}{2×2}$

$x=\frac{-3±\sqrt{9+616}}{4}$

$x=\frac{-3±\sqrt{625}}{4}$

$x=\frac{-3±25}{4}$

$x=\frac{-3+25}{4}$ or $x=\frac{-3-25}{4}$

$x=\frac{22}{4}$ or $x=\frac{-28}{4}$

$$x =$$ $\frac{11}{2}$ or $$x = -7$$

Therefore, the roots of the given equation are $$-7$$ and $\frac{11}{2}$.