# Analyze $x^A(1 - x)^B$ divided by $(1 + x^2)$ with remainder $ax + b$

Assume $A, B \in \mathbb{Z}^+$. If $x^A(1 - x)^B$ is divided by $(1 + x^2)$, the remainder is $ax + b$, show that $a = (\sqrt{2})^B \sin\frac{(2A - B)\pi}{4}$ and $b = (\sqrt{2})^B \cos\frac{(2A - B)\pi}{4}$

So, I guess I have something like:

$$g(x)(1+x^2) = ax + b$$

Without a value to sub in, I am not sure how I proceed. Where should I go with this? I'm not sure how the sin and cos will appear.

-
There's some weird typo showing up with "greater than" signs where they have no business being. Can you edit? –  Gerry Myerson Mar 29 '12 at 5:36
@Gerry Myerson: It was from the quote, I don't know why. Edited. –  stariz77 Mar 29 '12 at 7:59

Let $F(x)$ be our polynomial. We have $$F(x)=q(x)(x^2+1)+ax+b.$$ The right substitutions, at least if your course mentions complex variables, are $x=i$ and $x=-i$. Then, for example, $$b=\frac{1}{2}\left(F(i)+F(-i)\right).$$ Put $F(i)$ and $F(-i)$ in polar form.
You were yourself looking for a substitution. If for example we were dividing by $(x-1)(x-2)$ instead of $x^2+1$, we would substitute $x=1$ and $x=2$. Here since we know nothing much about what I called $q(x)$, we substitute values for $x$ that will "kill" $q(x)(x^2+1)$, so we plug in the solutions of $x^2+1=0$. –  André Nicolas Mar 29 '12 at 5:01
@stariz77 The idea is that you have no idea what $q(x)$ is unless you compute it. Anyhow, since $q(x)$ is multiplied by $x^2+1$, it is much easier to make $x^2+1=0$, than compute $q(x)$... And if $x^2+1=0$, it is irrelevant what $q$ is , because it is multiplied by $0$... –  N. S. Mar 29 '12 at 15:57
Hint $\rm\ \mathbb R[x]/(x^2+1)\:\! \cong \mathbb C\$ via $\rm\ f(x) + (x^2+1)\:\mathbb R[x]\: \to\: f({\it i})$
So, equivalently, compute $\rm\ {\it i}^{\:\!A} (1-{\it i})^B =\: a\:{\it i} + b$