### Instruction: Given that $-1 - 4\sqrt{2}$ is a root of the equation \[x^3 + ax^2 + bx + 31 = 0\]and that $a$ and $b$ are rational numbers, compute $a.$.### Response: This problem involves finding the coefficients of a cubic polynomial given one of its roots.
I recall that if a polynomial with rational coefficients has an irrational root, then its conjugate must also be a root.
That means that if $-1 - 4\sqrt{2}$ is a root, then so is $-1 + 4\sqrt{2}$.
Now I have two roots of the polynomial, so I can use the fact that the sum of the roots is equal to the opposite of the coefficient of $x^2$ divided by the leading coefficient.
In this case, the leading coefficient is 1, so I have \[(-1 - 4\sqrt{2}) + (-1 + 4\sqrt{2}) = -a.\]
Simplifying the left side, I get \[-2 = -a.\]
Therefore, $a = 2$.