# Solving single-variable polynomials

## Single-variable polynomials

### Introduction

A single-variable polynomial is an equation of the form:

\(\sum^n_{i=0} a_i x^i=0\)

For example:

\(x=1\)

\(x^2=4\)

\(x^2-3x+2=0\)

### Degrees

The degree of a polynomial is the highest-order term.

For example \(x^3+x=0\) has degree \(3\).

### Roots of single-variable polynomials

A solution to a polynomial is a root.

For example \(1\) and \(2\) are roots of \(x^2-3x+2=0\)

## Solving quadratic polynomials

### Quadratic polynomials

Quadratic polynomials are of the form \(ax^2+bx+c=0\).

### Solving quadratic polynomials

\(x=\dfrac{-b\pm \sqrt {b^2-4ac}}{2a}\)

### Proof

We can get the two solutions to a quadratic equation from the following manipulation.

\(ax^2+bx+c=0\)

\(a[x^2+\dfrac{b}{a}x]=-c\)

\(a[(x+\dfrac{b}{2a})^2-\dfrac{b^2}{4a^2}]=-c\)

\(a[(x+\dfrac{b}{2a})^2]=\dfrac{b^2}{4a}-c\)

\((x+\dfrac{b}{2a})^2=\dfrac{b^2-4ac}{4a^2}\)

\(x+\dfrac{b}{2a}=\pm \sqrt {\dfrac{b^2-4ac}{4a^2}}\)

\(x=\dfrac{-b\pm \sqrt {b^2-4ac}}{2a}\)