Irreducible quadratic factors
are quadratic factors that when set equal to zero only have complex
roots. As a result they cannot be reduced into factors
containing only real numbers, hence the name irreducible. Examples include
$x^2+1$ or indeed $x^2+a$ for any real number $a>0$, $x^2+x+1$
(use the quadratic formula to see the roots), and $2x^2-x+1$.

When $Q(x)$ has irreducible quadratic
factors, it affects our decomposition.

Irreducible quadratic factors of $Q(x)$

For every irreducible quadratic factor $x^2 + bx +
c$ of $Q(x)$, we have
$$\displaystyle\frac{Ax+B}{x^2+bx+c}$$ in the
decomposition.

For every repeated irreducible quadratic factor
$(x^2+bx+c)^n$ of $Q(x)$, we have the $n$ terms
$$\displaystyle\frac{A_1 x + B_1}{x^2+bx+c} +
\frac{A_2x+B_2}{(x^2+bx+c)^2}+\ldots +
\frac{A_nx+B_n}{(x^2+bx+c)^n}$$ in the decomposition.

Example: We have the decomposition $$ \displaystyle{
2x^3+5x-1 \over (x+1)^3(x^2+1)^2 } = \displaystyle{ { A \over x+1 }
+ { B \over (x+1)^2 }+ { C \over (x+1)^3 } + { Dx+E \over x^2+1 } +
{ Fx+G \over (x^2+1)^2 } }. $$
Finding the coefficients $A$, $B$, etc. for these terms in the
decomposition can be challenging. We can't just plug in the
roots of $Q(x)$ to get the coefficients one at a time, since the
quadratic factors don't have real roots. We either have to
plug in lots of different values of $x$, or compare the
corresponding coefficients of $1$, $x$, $x^2$, etc. Either way, we
get a system of linear equations to solve.

Finally, solving the integrals at the end is harder than with
linear factors, but we can do it:

To integrate $\displaystyle\int \frac{x}{(x^2+a^2)^n}\,dx,$ we
can substitute $u=x^2+a^2$.

To integrate $\displaystyle\int \frac{dx}{(x^2+a^2)^n},$ where
$u$-substitution will not work, we can substitute
$x=a\tan(\theta)$.

These types of problems are explained in the following video.