How to solve system of congruences of polynomial? Find a polynomial $p(x)$ such that
$p(x)\ \equiv 1\mod\ x^{100}$  and
$p(x)\ \equiv 2\mod\ (x-2)^3$
 A: Suppose a polynomial $f(x)$ leaves a constant remainder $r$ when divided by
the polynomial $(x − c)^k$. Then $f'(x)$ is divisible by $(x − c)^{k−1}$. The converse is also true: suppose for a polynomial $f(x)$, the derivative $f'(x)$ is divisible by $(x − c)^{k−1}$, say $f'(x) = q(x)(x−c)^{k−1}$. Then $f(x)$ leaves a constant remainder when divided by $(x−c)^k$.
One can see this e.g. by substituting $u = (x − c)$ in $q(x)(x − c)^{k−1}$ and integrating.
In the problem, $p'(x)$ must be divisible by $x^{99}$ as well as by $(x−2)^2$. Moreover any polynomial whose derivative is divisible by $x^{99}(x − 2)^2$ will leave constant remainders when divided by either of $x^{100}$ and $(x − 2)^3$. The simplest way to find one such $p(x)$ is to integrate $$Ax^{99}(x−2)^2 = A(x^{101}−4x^{100} + 4x^{99})$$ to get
$$
p(x) = A\left(\frac{x^{102}}{102}−4\frac{x^{101}}{101}+4\frac{x^{100}}{100}\right)+B
$$
and solve for constants $A$ and $B$ to ensure desired values of the constant remainders. We have $p(0) = B = 1$ and $p(2) = A\left(\frac{2^{102}}{102}−4\frac{2^{101}}{101}+4\frac{2^{100}}{100}\right)+1 = 2$ which gives $A$.
