Given $f(x)=ax^3-ax^2+bx+4$ Find the Value of $a+b$ 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$

One more way to see the conditions imposed on $f(x)$ are inconsistent/impossible:  
Since $x^2 + 1$ divides $f(x)$ with remainder $0$, $f(x)$ factors as
$ax^3 - ax^2 + bx + 4 = (x^2 + 1)(cx + d) = cx^3 + dx^2 + cx + d; \tag 1$
comparing coefficients:
$a = c = -d, \tag 2$
$b = c, \tag 3$
$ d = 4; \tag 4$
thus,
$a = b = c = -4; \tag 5$
thus,
$cx + d = -4x + 4, \tag 6$
and
$f(x) = -4x^3 + 4x^2 - 4x + 4; \tag 7$
then clearly $f(4)$ is even, so
$f(4) \ne 51. \tag 8$
If we choose to ignore the condition 
$f(4) = 51, \tag 9$
we may still salvage the inference
$a + b = -8. \tag{10}$
