Strategy on factoring quartic polynomials: cross method.
Are you aware of how to factor quadratic equations? This is just a method for that, adapted to work for quartic equations. The reason that this works is that many (but not all) quartic equations factor into the product of two quadratic equations.
To see that this doesn't always work, apply it to $$p(x)=x^4-3x^3+x^2-2x-3=(x-3)(x^3+x+1)$$ The second term doesn't factor any further.
Here's a less confusing way of giving the same instructions:
- Assume the polynomial, $f(x)$, factors into $(x^2+ax+b)(x^2+cx+d)$
- $bd$ must give the constant term of the original polynomial, so find two values that multiply to give the constant term and write $g(x)=(x^2+b)(x^2+d)=x^4+(b+d)x^2+bd$. In the computational example, $g(x)=(x^2+3)(x^2-1)$
- Now let's look at $f(x)-g(x)$, which is $2x^3+x^2+2x$ in your example. This is a degree 3 polynomial with no constant term and represents the parts of the factors we need to still find. In our factorization, we know that the degree $1$ term is given by $(ad+bc)x$, and we have already found $b$ and $d$. Similarly, we know that the degree $3$ term is given by $(a+c)x^3$. This is a system of equations with two variables and two unknowns and so can be solved. In your example, these equations are $-a+3c=2$ and $a+c=2$ respectively.
- Solving gives the last two coefficients we need, and then putting them together with the original piece gives us the factorization. In your example, the solution $a=c=1$ works. This gives us $(x^2+x+3)(x^2+x-1)$
I might be misunderstanding, but this just looks like concealed expanding $$(x^2+ax+b)(x^2+cx+d)\tag{1}$$ and comparing coefficients.
- Factoring extremes
Well, what we want is to choose $b$ and $d$ such that $(x^2+b)(x^2+d)$ matches leading and constant factor. What it amounts to is finding $b$ and $d$ such that $bd = -3$. Let's say we were lucky and chose the winning pair $b = -1,\ d=3.$
- Calculating $\Delta$
Why is this important? Well, $(x^2-1)(x^2+3) = x^4+2x^2-3$, so we are missing one $x^2$: $\Delta = 3x^2 - 2x^2$.
- Covering for the missing $\Delta$
There is only one place where $\Delta$ can come from, that is from $a$ and $c$ - we must have $ac x^2 = \Delta$. Why? Well, if you expand $(1)$, you will find that $x^2$ term must be equal to $b + d + ac$. We found $b+d$ in step 1 and 2, so $acx^2$ is equal to $\Delta$. In this case $ac = 1$. There are two possibilities in $\Bbb Z$, either $a=c=1$, or $a=c=-1$. It is easy to decide which one, since it must fit the other terms as well, namely $x^3$ term is equal to $a + c$ and the $x$ term is equal to $ad + bc = 3a - c$. Thus, $a = c = 1$.
- Collecting terms
We simply write $(x^2+x-1)(x^2+x+3) = x^4+2x^3+3x^2+2x-3$ and feel the magic all around us.
Now, let us do the same thing, only transparently:
$$(x^2+ax+b)(x^2+cx+d) = x^4+(a+c)x^3+(b+d+ac)x^2+(ad+bc)x+bd$$
so we need to solve the following system in $\Bbb Z$:
\begin{array}{c r}\begin{align} a+c&=2\\ b+d+ac&=3\\ ad+bc&=2\\ bd &= -3 \end{align} &\tag{2}\end{array}
There are two possibilities, either $b = 1$ and $d = -3$, or $b = -1$ and $d = 3$. We can see that former leads to no solution, so we will pursuit the latter, the system becomes:
\begin{align} a+c&=2\\ ac&=1\\ 3a-c&=2 \end{align}
The first and the third equation form linear system, which has unique solution $a = c = 1$, luckily, consistent with the second equation. Thus, we now know for certain that $$(x^2+x-1)(x^2+x+3) = x^4+2x^3+3x^2+2x-3.$$
Addendum:
There is a legitimate question why we would consider $(1)$ in the first case. Now, we are trying to factor a quartic over $\Bbb Z$. Let's say $p(x) = x^4 +2x^3+3x^2+2x-3$ and assume that $p = fg$. We have that $\deg p = \deg f + \deg g$, so there are two cases: $4=1+3$ or $4=2+2$. The first case would imply that $p$ has integer root and we can use rational root theorem to rule that out. Thus, only case $4=2+2$ remains, which leads to considering $(1)$.
Finally, if the system $(2)$ had no solutions in $\Bbb Z$, we would conclude that $p$ is irreducible over $\Bbb Z$.