MathJax TeX Test Page
$$y''' - y'' - 12y' = x - 2xe^{-3x}$$
First, we find the homogeneous solution.
$$r^3 - r^2 - 12r = 0 \to r(r + 3)(r-4) = 0$$
$$y_c = c_1 + c_2e^{-3x} + c_3e^{4x}$$
Ignore $y_c$ for now, $y_p$ would be $Ax + B + Ce^{-3x} + Dxe^{-3x}$.
However, let's factor in the repeated roots.
Because there's already a constant coefficient, we multiply that term by x. However, there's already an x term! So we multiply that by x as well. Same thing with $e^{-3x}$. That's already in the $y_c$ solution. So, we multiply the $e^{-3x}$ terms by x, but that conflicts with $xe^{-3x}$, so we multiply that by x as well. Our new equation for $y_p$ is
$$Ax^2 + Bx + Cxe^{4x} + Dx^2e^{-3x}$$