# Find all elements $b\in\mathbb{Z}_{17}$ such that for at least one $x \in \mathbb{Z}_{17}$: $x^2 + 3x + b = 0$

Find all elements $b\in\mathbb{Z}_{17}$ such that for at least one $x \in \mathbb{Z}_{17}$:
$x^2 + 3x + b = 0$

Hi everyone, this one has me wondering. I'm not all that confident with second degree equations in rings as it is, but how do I deal with the term $b$? Any tips or whole solutions would be nice.

• Well by brute force you cal list all $x^2 + 3x$ and then $b$ must simply be it additive inverse of those values. – fleablood Dec 4 '17 at 23:33

Since $17$ is prime, $\mathbb{Z}_{17}$ is not just a ring, but a field. Solving equations in a field, works the same all the time. Also you could just go about and solve

$x^2+3x+0=0$

$x^2+3x+1=0$

...

$x^2+3x+16=0$

$x_{1,2}=-\frac{3}{2}\pm\sqrt{\frac{9}{4}-b}$

Since there are no fractions in $\mathbb{Z}_{17}$ you have to ask what $2^{-1}$ and $4^{-1}$ is. We search $y\in\mathbb{Z}_{17}$ with $2y=1$ Since $2\cdot 9=18=1\mod 17$ it is $2^{-1}=9$

The same for 4y=1 we get y=13, hence $4^{-1}=13$

$x_{1,2}=-3\cdot 9\pm\sqrt{9\cdot 13-b}$

$x_{1,2}=-27\pm\sqrt{117-b}$

We can reduce this mod 17 as well. But this is not needed. It just makes the calculation easier, in my opinion.

$x_{1,2}=7\pm\sqrt{15-b}$

So this just one solution for $b=15$, and two solutions if $15-b$ is a square in $\mathbb{Z}_{17}$.

Note, that you can not write $15-b<0$ like in $\mathbb{R}$, since there is no order $<$ on $\mathbb{Z}_{17}$. It is a field that can not be arranged. Like $\mathbb{C}$.

• Hi, thank you for your answer. I'm really interested in your comment: "Since $17$ is prime, $Z_{17}$ is not just a ring, but a field. Solving equations in a field, works the same all the time." Does that mean that there would be a different approach if we were in $Z_{18}$, where $18$ is not prime? – Something Dec 6 '17 at 20:28
• You have to be carefull then, since $\mathbb{Z}_{18}$ has zero divisors, like $2\cdot 9=18=0$ for example. – Cornman Dec 6 '17 at 20:50
• "Solving equations in a field, works the same all the time" - close, but not quite true. For example you can't use the quadratic formula in ${\Bbb Z}_2$ because then dividing by $2$ means dividing by $0$. – David Dec 6 '17 at 23:28
• But that is a little bit like cheating, since you always have to be careful that you divide by 0. – Cornman Dec 6 '17 at 23:55

In ${\Bbb Z}_{17}$ we have \eqalign{x^2+3x+b=0\quad &\Leftrightarrow\quad x^2-14x+b=0\cr &\Leftrightarrow\quad (x-7)^2-49+b=0\cr &\Leftrightarrow\quad b=49-(x-7)^2\cr &\Leftrightarrow\quad b=-2-(x-7)^2\ .\cr} So $b$ must be $-2$ minus a square. The squares in ${\Bbb Z}_{17}$ are $$0^2=0\ ,\quad 1^2=16^2=1\ ,\quad 2^2=15^2=4$$ and so on. So the values of $b$ are $$-2-0=-2=15\ ,\quad -2-1=-3=14\ ,\quad -2-4=-6=11\ ,$$ and a few more which I'm sure you can find for yourself.

• Thank you, very easy to follow and understand. – Something Dec 6 '17 at 20:40

Well by brute force you cal list all $x^2 + 3x$ and then $b$ must simply be it additive inverse of those values.

$x^2 + 3x + b\equiv 0\mod 17$

$b \equiv -x^2 - 3x = -x(x+3) \mod 17$.

So just list them all: $-0*3 = 0; -1*4= 13; -2*5=7.... etc.$

It's interesting as $-14*0=0$ so there will be fewer than $17$ distinct answers.

$(7 - i)(10-i) = 70 - 17i +i^2 \equiv 70 + 17i + (-i)^2 =(7 + i)(10+i)$ so you only have to check for $x=0... 7$.

They are $0,-4,7,-1,6,-6,3,2$. I don't really see any pattern in that to get any further insight how to solve without brute force.

• Hi, thank you for your answer. I can't help but notice that David above has one answer that is $b = 15$ while you don't. Who is wrong here? Also, I would like to ask where you got $(7-i)(10-i)$ from. – Something Dec 6 '17 at 20:49