Find the values of the constants in the following identity $2x^3+3x^2-14x-5=(ax+b)(x+3)(x+1)+C$ I'm working through identities but I can't figure out how to get further than multiplying out the above to get :
$$2x^3+3x^2-14x-5=2ax^3+3ax^2+3ax+bx^2+3bx+bx+3b+C$$
can someone give me a hint on what to do next?

The now deleted answer by amWhy used polynomial long division. Since $(x+3)(x+1)= x^2+4x+3$, if we perform the following polynomial long division 

we get rightaway the quotient $2x-5=ax+b$, thus $a=2,b=-5$, and the remainder $10=C$.

have you any tips on spotting when to use this ?

Given two polynomials $A(x)$ and $B(x)$, with degree of $B(x)$ greater than $0$, we can find two other polynomials $Q(x)$ and $R(x)$ such that $$A(x)=B(x)Q(x)+R(x),$$ and the degree of $R(x)$ is lower than the degree of $B(x)$.
In your case $A(x)=2x^3+3x^2-14x-5$, $B(x)=x^2+4x+3$, $Q(x)=2x-5$ and $R(x)=10$.
