Do not use a calculator in this question.
It is given that \(\mathrm{f}(x)=x^3+px^2+qx-6\), where \(p\) and \(q\) are constants.
\((x+1)\) is a factor of \(\mathrm{f}(x)\).
When \(\mathrm{f}(x)\) is divided by \((x+2)\) there is a remainder of \(4\).
Find the values of \(p\) and \(q\).[6]
It is given that \(3x-1\) is a factor of \(\mathrm{g}(x)=9x^3-18x^2-x+2\). Express \(\mathrm{g}(x)\) as a product of three linear factors.[3]