How to solve $3x^2 – 5x + 5 \equiv 0 \pmod 7$? In general, how to approach this kind of problem? Any help is appreciated.
[Math] Solve Quadratic Congruence Equation
elementary-number-theorymodular arithmetic
Related Solutions
You use the quadratic formula!
No, really. But you need to interpret the terms correctly: rather than "dividing" by $2a$ (here, $2$) you need to multiply by a number $r$ such that $2r\equiv 1\pmod{11}$ (namely, $r=6$). And rather than trying to find a square root, here $\sqrt{b^2-4ac} = \sqrt{1-4} = \sqrt{-3}$, you want to find integers $y$ such that $y^2\equiv -3\pmod{11}$. It may be impossible to do so, but if you can find them, then plugging them into the quadratic formula will give you a solution; and if you cannot find them, then there are no solutions.
Now, as it happens, $-3$ is not a square modulo $11$; so there are no solutions to $x^2+x+1\equiv 0\pmod{11}$. (You can find out if $-3$ is a square by using quadratic reciprocity: we have that $-1$ is not a square modulo $11$, since $11\equiv 3\pmod{4}$. And since both $3$ and $11$ are congruent to $3$ modulo $4$, we have $$\left(\frac{-3}{11}\right) = \left(\frac{-1}{11}\right)\left(\frac{3}{11}\right) = -\left(-\left(\frac{11}{3}\right)\right) = \left(\frac{11}{3}\right) = \left(\frac{2}{3}\right) = -1,$$ so $-3$ is not a square modulo $11$).
(You can also verify that this is the case by plugging in $x=1,2,\ldots,10$ and seeing that none of them satisfy the equation).
On the other hand, if your polynomial were, say $x^2+x-1$, then the quadratic formula would say that the roots are $$\frac{-1+\sqrt{1+4}}{2}\qquad\text{and}\qquad \frac{-1-\sqrt{1+4}}{2}.$$ Now, $5$ is a square modulo $11$: $4^2 = 16\equiv 5\pmod{11}$. So we can take $4$ as one of the square roots, and taking "multiplication by $6$" as being the same as "dividing by $2$" (since $2\times 6\equiv 1\pmod{11}$), we would get that the two roots are $$\begin{align*} \frac{-1+\sqrt{5}}{2} &= \left(-1+4\right)(6) = 18\equiv 7\pmod{11}\\ \frac{-1-\sqrt{5}}{2} &= \left(-1-4\right)(6) = -30\equiv 3\pmod{11} \end{align*}$$ and indeed, $(7)^2 + 7 - 1 = 55\equiv 0\pmod{11}$ and $3^2+3-1 = 11\equiv 0\pmod{11}$.
We can definitely use this method when $2a$ is relatively prime to the modulus; if the modulus is not a prime, though, nor an odd prime power, then there may be more than $2$ square roots for any given number (or none). But for odd prime moduli, it works like a charm.
The good old quadratic equation works just fine if $p\neq2$. If $a\not\equiv 0\pmod{p}$ and $b^2-4ac$ is a quadratic residue mod $p$, then the solutions to the quadratic congruence $$ax^2+bx+c\equiv0\pmod{p},$$ are precisely $$-\frac{b\pm\sqrt{b^2-4ac}}{2a}.$$
In this particular case we have $p=7$ and $a\equiv b\equiv1\pmod{7}$ and $c\equiv47\equiv5\pmod{7}$. Then $$b^2-4ac\equiv2\equiv3^2\pmod{7},$$ so the congruence has the two solutions $$-\frac{1+3}{2}=5\qquad\text{ and }\qquad-\frac{1-3}{2}=1.$$
On the other hand, if you want to solve it purely by inspection, note that there are only $7$ possible solutions to check. Clearly $x=0$ is not a solution, and plugging in $x=1$ yields the first solution. The product of the solutions is congruent to $47\equiv5\pmod{7}$, so the other solution is $x=5$.
Best Answer
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.