# Searching sum of constants in a polynomial

Consider the polynomial $f(x)=x^3+ax+b$, where $a$ and $b$ are constants. If $f(x+1004)$ leaves a remainder of $36$ upon division by $x+1005$, and $f(x+1005)$ leaves a remainder of $42$ upon division by $x+1004$, what is the value of $a+b$?

• The remainders shall hold for all $x$? Jul 29, 2013 at 12:42
• What have you tried as far as work? Did you attempt any computations with $\frac{f(x+1004)}{x+1005}$ and the other? Jul 29, 2013 at 12:43

By assumption we have $$f(x+1004)=(x+1005)Q(x)+36\tag{1}$$ and $$f(x+1005)=(x+1004)S(x)+42\tag{2}$$ so let $x=-1005$ in $(1)$ gives $$f(-1)=-1-a+b=36$$ and let $x=-1004$ in $(2)$ gives $$f(1)=1+a+b=42$$ hence $$a=2\quad,\quad b=39$$

• excellent, my friend! Apr 29, 2014 at 12:46

The general knowledge to be used is that if

$$P(x)=(x-a)Q(x)+R$$ where $P$ and $Q$ are polynomials and $R$ a constant. Then, evaluating on $x=a$ we get $P(a)=R$. This is called the Polynomial remainder theorem.

You are looking for $f(1)-1=a+b$.

We have that $f(x+1005)$ gives remainder $42$ after division by $x+1004=x-(-1004)$. This means that $f(-1004+1005)=f(1)=1+a+b=42$.

From this we get that $a+b=41$.

HINT: From the given information $$f(x+1004)=36+(x+1005)b_{1}(x)\\ f(x+1005)=42+(x+1004)b_{2}(x)$$ So, $$f(-1)=-a+b-1=36\\ f(1)=a+b+1=42$$

• You have a typo in $f(-1)$: should be $-a+b-1=36$. Jul 29, 2013 at 12:50
• Oh! sorry. I've edited now. Jul 29, 2013 at 12:52