TITLE: How to solve $x^3 + 2x + 2 \equiv 0 \pmod{25}$?
QUESTION [6 upvotes]: My attempt was:
$x^3 + 2x + 2 \equiv 0 \pmod{25}$
By inspection, we see that $x \equiv 1 \pmod{5}$. is a solution of $x^3 + 2x + 2 \equiv 0 \pmod{5}$. Let $x = 1 + 5k$, then we have:
$$(1 + 5k)^3 + 2(1 + 5k) + 2 \equiv 0 \pmod{25}$$
$$\Leftrightarrow 125k^3 + 75k^2 + 25k + 5 \equiv 0 \pmod{25}$$ 
$$\Leftrightarrow 5 \equiv 0 \pmod{25}$$
And I was stuck here :( because k was completely cancelled out, how can we find solution for this equation?  
Thanks,

REPLY [7 votes]: I wanted to post some excerpts from Niven's book that gives a nice recurrence relation to lifting nonsingular roots. I always found it helpful to use as a kind of plug and chug way to go. I also included an example of it in action.




To address your specific problem, you see that $x\equiv 1,3$ are roots mod $5$. However, 
$$
f'(1)=3(1)^2+2\equiv 0\pmod{5}\quad\text{and}\quad f'(3)=3(3)^2+2\equiv 4\pmod{5}
$$
so $x\equiv 3$ is nonsingular, and may be lifted to a solution $a_2$ mod $25$ by Hensel's Lemma. Notice that $\overline{f'(3)}=4$. By the recurrence (2.6) of the excerpt above, you have
$$
a_2=3-35(4)\equiv 3+(15)(4)\equiv 3+10\equiv 13\pmod{25}
$$
which is the solution found by others. I hope it's useful when the numbers you're working with may not be as nice.