How to solve $3x^2 - 5x + 5 \equiv 0 \pmod 7$? In general, how to approach this kind of problem? Any help is appreciated.
-
You can safely add or subtract $7,$ or $7x$ or $7x^2$ to goal is to create a quadratic that factors into inegers. – Doug M May 17 '17 at 21:57
-
Working mod 7, you can just check the values $0,1,2,3,4,5,6$. – JavaMan May 17 '17 at 22:07
3 Answers
First note that the modulus is prime. This is important because if $p\mid ab$, then $p\mid a$ or $p\mid b$ and the existence of multiplicative inverses. We solve the equation like we do when we prove the quadratic formula. Multiply both sides by $3^{-1}=5$ to get the equation $$ x^2-4x+4=(x-2)^2=0\pmod{7}\iff x=2\pmod{7}. $$ If we weren't as lucky, we could complete the square and proceed.

- 31,116
As the characteristic isn't two you can directly use the quadratic formula:
$$\Delta=(-5)^2-4\cdot3\cdot5=25-60=-35=0\pmod 7\implies\text{ there's a single double root:}$$
$$x_{1,2}=\frac{5}{2\cdot3}=\frac{5}{-1}=-5=2\pmod 7$$
Another way: Factor out the quadratic coefficient and try to complete the square:
$$3x^2-5x+5=3\left(x^2-4x+4\right)=3\left(x-2\right)^2$$
and we get the same as in the first part, of course.

- 211,718
- 17
- 136
- 287
If $a,b,c,x,n\in\mathbb Z$, $n\ge 3$, $\gcd(2a,n)=1$, then
$$ax^2+bx+c\equiv 0\pmod{n}$$
$$\stackrel{\cdot 4a}\iff (2ax+b)^2\equiv b^2-4ac\pmod{n}$$
You're left with finding the modular square roots of $b^2-4ac$ mod $n$.
First, you may want to find a Legendre symbol, use Quadratic reciprocity.
Here you're solving $3x^2 - 5x + 5 \equiv 0 \pmod 7$.
In this case, you're left with finding the modular square roots of $(-5)^2-4(3)(5)\equiv -35\equiv 0$ mod $7$, which is just $0$.
$2(3)x-5\equiv 0\pmod{7}$, i.e. $6x\equiv 5\pmod{7}$,
i.e. $-x\equiv 5\pmod{7}$. Multiply both sides by $-1$ (here $\gcd(-1,7)=1$).
$\iff x\equiv -5\equiv 2\pmod{7}$.

- 13,324