Let $f(x)=ax^3-ax^2+bx+4$. If $f(x)$ divided by $x^2+1$ then the remainder is $0$. If $f(x)$ divided by $x-4$ then the remainder is $51$. What is the value of $a+b$?
From the problem I know that $f(4)=51$.
Using long division, I found that remainder of $\frac{ax^3-ax^2+bx+4}{x^2+1}$ is $a+b+x(b-a)$.
Then $$a+b+x(b-a)=0$$
I can't proceed any further so I'm guessing the other factor of $f(x)$ is $ax+4$.
Then $$f(x)=(ax+4)(x^2+1)=ax^3+4x^2+ax+4=ax^3-ax^2+bx+4$$
I found that $a=-4$ and $b=a=-4$. Then $f(x)=-4x^3+4x^2-4x+4$. But I doesn't satisfy $f(4)=51$