The first mathematical application which we will write a C program for is solving quadratic equations. We will then write some programs to solve equations of higher powers.

## Quadratic Equations

Quadratic equations are equations which have a squared variable as their highest power.

So x^{2} + 2x + 1 = 0, 2x^{2} – 6x + 7 = 0, and –x^{2} + 2x –15 = 0 are all quadratic equations, but x^{3} + 2x^{2} – 3x + 7 = 0, 2x^{5} –3x = 0, and 3x – 2 = 0 are not quadratic equations.

The normal analytical methods for solving quadratics are

Factorizing

Completing the square

Using the quadratic formula

### Factorizing

Factors of any ordinary whole numbers are just ...