Calculation of remainder when $(x+1)^n$ is divided by $(x-1)^3$, where $n\in \mathbb{N}$
$\bf{My\; Try}::$ Using Division Algorithm:: $p(x) = q(x)\cdot g(x)+r(x)$
Now Let $r(x) = ax^2+bx+c$
So $(x+1)^n=q(x)\cdot (x-1)^3+ax^2+bx+c........................(1)$
Now put $x=1$, we get $\boxed{a+b+c=2^n}$
Now differentitae $(1)$, we get $n(x+1)^{n-1} = q(x)\cdot 3(x-1)^2+(x-1)^3\cdot q^{'}(x)+2ax+b$
again put $x=1$, we get $\boxed{2a+b=n(2)^{n-1}}$
Now again differentitae $(1)$ and then put $x=1$, we get
$\displaystyle \boxed{2a=n(n-1)2^{n-2}\Rightarrow \displaystyle a=\frac{n(n-1)}{2}\cdot 2^{n-2}}$
Similarly we get $\displaystyle b = n(2)^{n-1}-n(n-1)\cdot 2^{n-2}$
Similarly we get $\displaystyle c= 2^{n}+n(n-1)\cdot 2^{n-2}-\frac{n(n-1)}{2}\cdot 2^{n-2}$
So Remainder
$\displaystyle r(x) = \frac{n(n-1)}{2}2^{n-2}x^2+\left\{n(2)^{n-1}-n(n-1) 2^{n-2}\right\}x+2^{n}+n(n-1)\cdot 2^{n-2}-\frac{n(n-1)}{2}2^{n-2}$
is my solution is right , if not then how can i calculate it
or If there is any better method , then plz explain here
Thanks