Find the real numbers $a$ and $b$ for which $(X-1)^{2}$ divides $a X^{4}+b X^{3}+1$.
If $(X-1)^{2}$ divides the polynomial $A(X)=a X^{4}+b X^{3}+1$, then $a+b+1=A(1)=0$. Therefore, $b=-1-a$, and we can rewrite $A$ as $A(X)=a X^{4}-(a+1) X^{3}+1$, which allows us to factorize it as $A(X)=(X-1)\left(a X^{3}-X^{2}-X-1\right)$.

It remains to ensure that $X-1$ divides the polynomial $B(X)=a X^{3}-X^{2}-X-1$, that is, $0=B(1)=a-3$. We deduce that $a=4$ and $b=-4$, in which case $X-1$ indeed divides $B$, so $(X-1)$ divides $A$.