# How to solve a quadratic equation

The full quadratic equation is solved by finding its discriminant.

Recall that a complete quadratic equation is called an equation of the form rx2+ wx + h = 0, where r, w, h are the coefficients of the quadratic equation: some numbers that do not equal zero, and x is a variable (unknown).

## How to solve a quadratic equation through a discriminant

Calculate the discriminant (D) of a quadratic equation. To calculate the discriminant, it is necessary to subtract the product of the coefficients r and h by 4 from the second coefficient w, raised to the second power.

D = w2- 4rh

If the resulting discriminant of a quadratic equation is less than zero (D <0), then this equation has no roots, and therefore has no solution.

If the resulting discriminant of a quadratic equation is zero (D = 0), then the equation has only one root. To calculate this root, one needs to divide the coefficient of the quadratic equation w with a minus sign by the doubled coefficient r.

This is the formula for finding the only root:

x = -w / 2r

If the resulting discriminant of a quadratic equation is greater than zero (D> 0), then two roots fit the equation.

To find the first root of a quadratic equation x1, it is necessary to add the square root of the discriminant to the coefficient w with a minus sign, and divide the result by the doubled coefficient r.

To find the second root of the equation x2, it is necessary to subtract the square root of the discriminant from the coefficient w with a minus sign, and divide the result by the doubled coefficient r.

If a complete quadratic equation of the form rx2+ wx + h = 0 is reduced, that is, the coefficient that stands next to the unknown in the second degree is equal to unity (r = 1), then it can be solved by the formula of the Viet theorem.

## How to solve the given quadratic equation using the formula of the Viet theorem

Vieta's theorem reads as follows: the sum of the roots of the reduced quadratic equation is equal to the second coefficient, only with the opposite sign, and the product of the roots is equal to the free term.

That is, if an equation of the form rx2+ wx + h = 0 has real roots, then

- x1+ x2= -w
- x1* x2= h

Using these formulas, you can try to guess the roots of the equation.To do this, we need to expand the free term h into two factors, the sum of which would be equal to the coefficient w with the opposite sign.

### for example

Take the given equation x2- 8x + 12 = 0

We know that:

- x1+ x2= 8
- x1* x2= 12

We need to decompose 12 into two such factors, which together will give 8. Obviously, such factors are 6 and 2.

Really:

- 6 * 2 = 12
- 6 + 2 = 8

It follows that the numbers 6 and 2 are true roots for the reduced quadratic equation. Such obvious solutions quickly come to mind when working with simple integer coefficients of a quadratic equation. therefore, the Vieta theorem is often used to select the roots of quadratic equations, which saves time when solving them.