-1

Can you help me to solve this $ x^2+x+1 \equiv 0 \pmod{13} $ ?

Sahiba Arora
  • 10,847
ambimath
  • 55
  • 7
  • 1
    The answers give good general methods for solving problems like this, but, considering how small $13$ is, I'd just proceed by trial and error. – Andreas Blass Jan 25 '17 at 17:47

5 Answers5

6

$x^2 + x + 1 \equiv 0 \pmod {13}\\ x^2 + x -12 \equiv 0 \pmod {13}\\ (x+4)(x-3) \equiv 0 \pmod {13}\\ x \in \{-4, 3\}$

Since $-4 \equiv 9 \pmod {13}$ you could also say: $x \in \{3,9\}$

Doug M
  • 57,877
5

First,let us make a square from the quadratic equation.

$$x^2+x+1 \equiv 0 \pmod {13} \implies 4x^2+4x+4 \equiv (2x+1)^2+3\equiv 0 \pmod{13}$$ Now we have $$(2x+1)^2 \equiv -3 \equiv 49 \equiv 7^2 \pmod {13}$$ So the answer is $$2x+1 \equiv \pm 7 \pmod{13} \implies x \equiv 3 \text{ or } 9 \pmod{13}$$

S.C.B.
  • 22,768
  • 1
    An essentially equivalent solution is to use the quadratic formula. Although it's usually taught in the context of the real or complex field, it works in other fields as long as the characteristic isn't 2 and the required square root is available. In this case case, it gives $(-1\pm\sqrt{-3})/2$. So, just as in your answer, the main work is to find a square root of $-3$ modulo 13. – Andreas Blass Jan 25 '17 at 17:45
  • 1
    To clarify AB's comment, the answer repeats the proof of the quadratic formula, but the formula will still yield roots generally when $2$ is cancelable, and the square root of the discriminant exists. However, it may not yield all roots, since in rings that are not integral domains there can be more than two roots (if so, they can be used to factor the modulus when in $,\Bbb Z/m,,$ e.g. see here). – Bill Dubuque Jan 25 '17 at 18:08
5

Multiply by $x-1$: you have to find the roots $\ne 1$ of $$(x-1)(x^2+x+1)=x^3-1=0.$$ In other words, you have to find the cubic roots of $1$ distinct from $1$.

$2$ is not such a cubic root, but $3$ is. The other root is the inverse of $3$ modulo $13$: $-4$.

Bernard
  • 175,478
4

You can use the standard quadratic formula:

$$x\equiv\frac{-1\pm\sqrt {-3}}{2}\equiv\frac{-1\pm\sqrt {10}}{2} \mod 13$$

Now you have to find a square root of $10 \bmod 13$. Going through the possibilities $10, 13+10=23, 2\cdot 13+10=36$, we hit the perfect square $36$. So $6$ is a square root of $10$.

So we get $x\equiv 5/2\equiv 18/2\equiv 9$, and $x\equiv-7/2\equiv 6/2 \equiv 3$.

Now you have three answers to your question, with three different solutions :-)

TonyK
  • 64,559
0

A modification of Bernard's suggestion: Because $x^2+x+1=(x^3-1)/(x-1)$ any primitive cubic root of unity in $\Bbb{Z}_{13}$ will be a solution. Because $\Bbb{Z}_{13}^*$ is cyclic of order twelve, or all the (non-zero) fourth powers will be solutions of $x^3=1$. So we can just try: $2^4=16\equiv3$ must be one solution, $3^4=81\equiv3$ - nothing new, $4^4=256\equiv9$ - another one. At this point we can stop looking because a quadratic polynomial over a field cannot have more than two solutions.


I posted the above "trick solution" (only works with this specific quadratic), because I don't want to repeat what I said about solving quadratic congruences earlier.

Jyrki Lahtonen
  • 133,153