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$
 A: $f(x)=ax^3-ax^2+bx+4$
Since $f(4) = 51$,
$51
=a(64-16)+4b+4
=48a+4b+4
$
so
$12a+b
=47/4
$.
Since $f(i) = 0$,
$0
=a(-i+1)+ib+4
=i(b-a)+a+4
$
so
$ a+4 = 0,
a=-4,
b-a = 0,
b=a=-4
$.
Therefore
$f(x) = -4x^3+4x^2-4x+4
$.
But this does not satisfy
$f(4) = 51$.
Therefore the problem is wrong.
A: 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}$
A: $$x=\pm i$$
so
$$a(\pm i)^3-a(\pm i)^2+b(\pm i)+4=0$$
so
$$ai+a\pm bi+4=0$$
$$ai+a+bi+4=0\tag 1$$
or
$$ai+a-bi+4=0\tag 2$$ 
now we will solve the first equation
$$a+4=0\rightarrow a=-4$$
$$a-b=0\rightarrow b=-4$$
hence $$f(x)=-4x^3+4x^2-4x+4$$
at $x=4$
$$f(4)=-204=-4(51)$$
the second equation gives
$$a=-4$$
$$b=4$$
hence $$f(x)=-4x^3+4x^2+4x+4$$
at $x=4$
$$f(4)=-176=-4(43)$$
as @marty said the problem is wrong
A: Let $a+b=c$.
Solving in pari/gp:
? lift(Mod(a*x^3-a*x^2+b*x+4,x^2+1))
%9 = (-a + b)*x + (a + 4)
?
? lift(Mod(a*x^3-a*x^2+b*x+4,x-4))
%10 = 48*a + (4*b + 4)
?
? polresultant(%9,a+b-c,a)
%11 = (-2*b + c)*x + (b + (-c - 4))
?
? polresultant(%10-51,a+b-c,a)
%12 = 44*b + (-48*c + 47)
?
? polresultant(%11,%12,b)
%13 = (52*c - 94)*x + (-4*c + 223)

Or in Wolfram.
I.e. $a+b=\dfrac{94x-223}{4(13x-1)}$.
If $x=4$ then $\begin{cases}4(b-a)+a+4=0\\48a+4b+4=51\end{cases} \Longrightarrow \begin{cases}a=1\\b=-1/4\end{cases} \Longrightarrow (a+b)\bigg|_{x=4}=\dfrac{3}{4}$.
Verifying: $(a+b)\bigg|_{x=4}=\dfrac{94\cdot 4-223}{4(13\cdot 4-1)}=\dfrac{3}{4}$.
By modulo $x^2+1$ remainder is $x(b-a)+a+4$ and quotient is $a(x-1)$:
$ax^3-ax^2+bx+4=\bigg(x(b-a)+a+4\bigg)+\bigg(a(x-1)\bigg)\cdot(x^2+1)$.
I think that from remainder$=0$ $\not\Rightarrow ax^3-ax^2+bx+4=a(x-1)(x^2+1)$, but only $ax^3-ax^2+bx+4 \equiv 0 \equiv x(b-a)+a+4 \equiv a(x-1)(x^2+1) \pmod {x^2+1}$. Thus is not correct to match the coefficients of $ax^3-ax^2+bx+4$ and $a(x-1)(x^2+1)$ whitout modulo.
A: This question is very interesting......
Only by this statement, the question can be solved
$f(x)= ax^3-ax^2+bx+4$ is a multiple of $x^2+1$;
Because the roots of the equation $x^2+1$ would be the roots of $f(x)$. 
Therefore if $j,k$ are roots of the equation then $j+k=0$ and $j.k =1$.
Let the roots of $f(x)$ be $j,k,l$.
Then,
$j+k+l = -\frac{-a}{a}$
$l=1$
now, $j.k.l= -\frac{4}{a}$
so, $a= -4$
now $j.k + l(k+j) = \frac{b}{-4}$
Therefore  $b=-4$ 
Finally $a+b=-8$ 
But $f(4)= 4(-4^3+4^2-4+1)$ 
Therefore $f(4)= -204$
So the question may be incorrect.
