<s>[INST] Remainder Theorem: $f(x) = x^3+1$ divided by $\operatorname {d}(x)= x$ Take for example $\operatorname {f}(x) = x^3+1$ divided by $\operatorname {d}(x)= x-1$ $$\frac {x^3+1}{x-1}$$
The Remainder Theorem tells us that the remainder will be $$\operatorname {f}(zero-of-\operatorname {d}(x))$$
In this case the remainder should be $$\operatorname {f}(1) = 1^3+1 = 2$$
so the remainder should be 2 for any value of $x$  
But for $x=3$
$$f(3) = 3^3+1$$
when this is divided by $x-1$ which is $3-1$ which equals to $2$, $$\frac {3^3+1}{3-1}$$ $$= \frac {27+1}{2}$$ $$= \frac {28}{2}$$ $$= 14, remainder = 0 ≠ 2$$
Please explain me why this happened
 [/INST] Leave fractions aside. The remainder theorem tells you that, if $f(x)$ is a polynomial with integer coefficients and $a$ is an integer, then
$$
f(x)=(x-a)q(x)+f(a)
$$
so $f(a)$ is the remainder of the division by $x-a$ in the ring of polynomials with integer coefficients.
What you're conjecturing is that $f(a)$ should also be the remainder of the division of $f(b)$ by $b-a$, whenever $b$ is an integer.
This is not possible, in general. For instance, if $b=a+1$, then would you expect that $f(a)$ is the remainder of the division of $f(a+1)$ by $(a+1)-a=1$? Well, no! The remainder in this case is zero, whatever $f(a+1)$ is.
And what if $f(a)<0$?
Example, similar to yours but with $f(x)=x^3-1$ and $a=-1$: we have $f(-1)=-2$ and indeed
$$
x^3-1=(x+1)(x^2-x+1)-2
$$
With the standard definitions, $-2$ can never be a remainder.
What you can say, and no more, is that
$$
f(b)=(b-a)q(b)+f(a)
$$
and therefore $f(a)\equiv f(b)\pmod{b-a}$
</s>