1

Find the solutions of the congruence using Chinese Remainder Theorem: $2x^2 - 3x -2 \equiv 0\mod21$

By now I've done this: $$ \left\{ \begin{array}{c} 2x^2-3x-2\equiv 0\mod 7\\2x^2-3x-2\equiv 0\mod3 \end{array} \right. $$

$$ 2x^2-3x-2\equiv 0\mod 7 \\ \Delta = 25 = 5^2 \\x_1,x_2 = (2a)^{-1}*(-b \pm \sqrt\Delta) \\ x_1=4^{-1}*2 = 2*2 = 4 \mod 7 \\ x_2 = 4^{-1}*(-8)= 6*2 = 5 \mod 7 $$ Then I made $\Delta$ for the (mod 3) equation and got $x_3=1 \mod 3, x_4=2 \mod 3$
So I got: $$ x \equiv 1 \mod 3 \\ x \equiv 2 \mod 3 \\ x \equiv 4 \mod 7 \\ x \equiv 5 \mod 7 \\ $$ And I don't know what to do further. I should apply Chinese Remainder Theorem on it or it would be wrong?

Edit: Thanks for the help! The correct form was: $$ x \equiv 1 \mod 3 \\ x \equiv 2 \mod 3 \\ x \equiv 2 \mod 7 \\ x \equiv 3 \mod 7 $$ And I understand how to solve it.

J. W. Tanner
  • 60,406
  • $2x^2−3x−2 \equiv 2x^2 - 2 \mod 3$ so $x \equiv \pm 1 \mod 3$ is probably an easier way to find the mod 3 solutions. – Ruben Jun 23 '19 at 15:49
  • 2
    Also, your solutions mod 7 seem to be incorrect:

    $2 \cdot 4^2 - 3 \cdot 4 - 2 = 32 - 12 - 2 = 18 \not \equiv 0 \mod 7$.

    – Ruben Jun 23 '19 at 15:53
  • You can apply CRT on the following pairs \begin{align}x & \equiv 1 \pmod{3}\x & \equiv 4 \pmod{7}\end{align} \begin{align}x & \equiv 1 \pmod{3}\x & \equiv 5 \pmod{7}\end{align} \begin{align}x & \equiv 2 \pmod{3}\x & \equiv 4 \pmod{7}\end{align} \begin{align}x & \equiv 2 \pmod{3}\x & \equiv 5 \pmod{7}\end{align} – Anurag A Jun 23 '19 at 15:55
  • With $b=-3$ and $\Delta=5$, solutions mod $7$ should be $\dfrac{3\pm5}4\equiv 2$ or $-2^{-1},$ which is $3$ – J. W. Tanner Jun 23 '19 at 16:05
  • $2x^2-3x-2 = (x-2)(2x+1)$ might be an easier way to do it. – saulspatz Jun 23 '19 at 16:09
  • Now I saw that. So it will be $$x_1 \equiv 2 \mod 7 \ x_2 \equiv 3 \mod 7 \ x_3 \equiv 2 \mod 3 \ x_4 \equiv 1 \mod 3$$. Then I can apply CRT on pairs. – Asan Laurentiu Jun 23 '19 at 16:23
  • See the linked dupe for the general method, and for some optimizations. – Bill Dubuque Jun 23 '19 at 17:33

2 Answers2

0

Solving the quadratic equation mod. $3$ and mod. $7$, you obtain:

  • mod. $3$: the equation i s equivalent to $2(x^2-1)=0$, and since $2$ is a unit mod. $3$, this means $x\equiv\pm 1\bmod 3$.
  • mod $7$: the discriminant is $\Delta=9+16=25\equiv 4\bmod 7$, so the roots are $$x\equiv(3\pm 2)\cdot 4^{-1}\equiv (3\pm 2)\cdot 2\equiv 2,3\mod 7.$$

There remains to combine these solutions in 4 pairs $(\alpha,\beta)$. Modulo $21$, you find the corresponding values via the inverse isomorphism of the Chinese remainder theorem. Explicitly, start from a Bézout's relation between $7$ and $3$, say $\;7-2\cdot 3=1$. Then $$\begin{cases} x\equiv \alpha\mod 3,\\ x\equiv \beta\mod 7 \end{cases}\iff x\equiv\alpha \cdot 7-2\beta \cdot3\mod 21.$$

Bernard
  • 175,478
0

As suggested by saulspatz in a comment to the question,

we have $(x-2)(2x+1)\equiv0\pmod{21}$.

That means $x\equiv 2\pmod{21}$ or $x\equiv-\dfrac12\equiv10\pmod{21}$

or $x\equiv2\pmod7$ and $x\equiv-\dfrac12\equiv1\pmod3$ [which means $x\equiv16\pmod{21}$]

or $x\equiv-\dfrac12\equiv3\pmod7$ and $x\equiv2\pmod3$ [which means $x\equiv17\pmod{21}].$

J. W. Tanner
  • 60,406