Can all real polynomials be factored into quadratic and linear factors? So I understand how to do integration on rational functions with a linear and a quadratic denominator, and I understand how to do a partial fraction decomposition, but I was wondering what happens if the polynomial is higher degree and can't be factored. Later in the page, it says this:

However, it can be shown that any polynomial with real coefficients is a product of linear and/or irreducible quadratic factors with real coefficients.

And I was wondering, how do we know this and is this definitely true?

For example, take $P(x) = x^n-1$. The factorization into complex linear factors is
$$(x^n-1) = \prod_{k=0}^{n-1}( x - (\cos \frac{2 k \pi}{n} + i \sin \frac {2 k \pi}{n}) )$$
From the pairs of non-real conjugate roots $\{ (\cos \frac{2 k \pi}{n} + i \sin \frac {2 k \pi}{n}) ,(\cos \frac{2 (n-k) \pi}{n} + i \sin \frac {2 (n-k) \pi}{n}) \}$ for $0< k < \frac{n}{2}$ we get the quadratic factors
$$( x - (\cos \frac{2 k \pi}{n} + i \sin \frac {2 k \pi}{n}) )(x-(\cos \frac{2 (n-k) \pi}{n} + i \sin \frac {2 (n-k) \pi}{n}))=\\=x^2 - 2\cos\frac{2 k \pi}{n}\, x + 1 $$
Thus we get the real factorization of $x^n-1$:
$$x^n-1 =(x-1)\prod_{k=1}^{\frac{n-1}{2}} (x^2 - 2\cos\frac{2 k \pi}{n}\, x + 1 )$$
if $n$ odd and 
$$x^n-1 =(x-1)(x+1)\prod_{k=1}^{\frac{n}{2}-1} (x^2 - 2\cos\frac{2 k \pi}{n}\, x + 1 )$$
if $n$ is even. 
