0

How do we solve quadratic congruences such as: $$ X^2+ 3X \equiv -5 \mod{7} $$

Jyrki Lahtonen
  • 133,153
  • 1
    Well, for such a small modulus we can just try everything. For larger moduli, we can use a variant of the familiar quadratic formula. We will need to solve congruences of the shape $Y^2\equiv a \pmod{p}$, for which there are good algorithms. – André Nicolas Nov 12 '14 at 09:37
  • Hmm. Is this a duplicate of for example this? (probably better older matches exist) – Jyrki Lahtonen Nov 12 '14 at 10:32

2 Answers2

2

As $(2,7)=1,$ $$x^2+3x\equiv-5\pmod7\iff4x^2+12x+20\equiv0\pmod7$$

$$(2x+3)^2\equiv-11\equiv3\pmod7$$

But $a\equiv0,\pm1,\pm2,\pm3\pmod7\implies a^2\equiv0,1,4,2\pmod7$

1

Hint:
I. The equation is equivalent with $(x+5)^2\equiv-1\pmod7.$
II. $x^2\equiv-1\pmod7$ jas no solutions by the supplemented reciprocity law.
Hope this helps.

awllower
  • 16,536