Find all real numbers $a, b$ such that $(x-1)^{2}$ divides $a x^{4}+b x^{3}+1$.
We know that $(x-1)^{2}$ divides $a x^{4}+b x^{3}+1$ if and only if 1 must be a double root of $P$. Now, 1 is a double root of $P$ if and only if $P(1)=0$ and $P^{\prime}(1)=0$, which allows us to find $a=3$ and $b=-4$.