# How to solve $2x^3+7x-4\equiv0 \pmod{25}$ without Hensel's lemma and with it

In general how to solve this equation:(with Hensel's lemma and without it) $$2x^3+7x-4\equiv0 \pmod{25}$$

-
The crude way without Hensel is to note that $1$ is the only solution mod $5$, and then try $1$, $6$, $11$, $16$, $21$ modulo $25$. – André Nicolas Dec 7 '12 at 18:01

Without Hensel's lemma: First solve $2x^3+7x-4\equiv 0\pmod 5$, getting a solution $x_0$.

Then write $x=x_0+5k$ and substitute into the equation:

$$2(x_0+5k)^3+7(x_0+5k)-4\equiv 0\pmod {25}$$

solving for $k$. This turns out to be linear in $k$ because the high powers of $k$ have coefficients that are divisible by $25$.

With Hensel's lemma: Hensel's lemma is a shorter version of this, and can be written much like Newton's method:

$$p(x)=2x^3+7x-4$$

Let $x_0$ be a solution of $p(x)\equiv 0 \pmod 5$.

Then $$x_1=x_0 + \frac{p(x_0)}{p'(x_0)}$$

Where by the fraction, we really mean multiplication by an inverse of $p'(x_0)$ modulo $5$. Clearly, that's only going to be possible of $p'(x_0)\not\equiv 0\pmod 5$.

Then $x_1$ is a solution $\pmod {25}$.

-
$x=5k+1$ then $2(5k+1)^3$ + $7(5k+1)-4=0$ then $250k^3+150k^2+50k+4 \equiv 0 (mod25)$ =4 , k doesn't exist , how to continue? – misi10 Dec 7 '12 at 17:16
@misi10 I think you need to rework your substitution. Definitely, the constant term should be $2+7-4=5$, for example. I think the $k$ term is also wrong, although the $k^3$ and $k^2$ terms look correct. – Thomas Andrews Dec 7 '12 at 17:21
It looks to me like: $$2(5k+1)^3+7(5k+1)-4 = 250k^3 + 150k^2 + 65k + 5$$ That's also what Wolfram alpha gives me. – Thomas Andrews Dec 7 '12 at 17:24
sorry, correct is $65k+5\equiv 0 (mod25)$. I found k=5 and x=26 , 26 is uniqe answer? . inspection for k=5,6,... is needed? – misi10 Dec 7 '12 at 17:28
Definitely not $k=5$, since $65\cdot 5\equiv 0\pmod {25}$ – Thomas Andrews Dec 7 '12 at 17:28