1
$\begingroup$

Actually, I found a open problem which is the same as my problem, see Solve quadratic congruence equation by completing square. But I can not understand the answers...they are too brief...

My typical method to solve a prime power $p^r$ modulus congruence is first solve the corresponding $p$ modulus congruence and then rise the solution in some way. For example, to solve the congruence $x^2 +x+7=0$ (mod $27)$, I will first solve the congruence $x^2 +x+7=0$ (mod $3)$ and the only solution is $1$. Then, with the same trick used in the open problem, we can rise the solution, and finally get the solutions of the congruence modulo $27$.

But my textbook requires me to solve this problem with the method of completing the square. And it provides me of a hint that $4x^2+4x+28=(2x+1)^2+27.$ However, I have no idea about this hint. And the textbook never mentions the method of completing the square.

Thanks in advance.

$\endgroup$
11
  • $\begingroup$ So you want to solve $$4x^2+4x+28\equiv 0\pmod{27}\ \text{ or } \ x^2+x+7\equiv 0\pmod{27}$$? $\endgroup$
    – Dr. Mathva
    Commented May 10, 2019 at 23:27
  • $\begingroup$ Note $2\times14+1\equiv0\pmod{27}$ $\endgroup$ Commented May 10, 2019 at 23:32
  • 2
    $\begingroup$ Isn't it $2\times 14\color{red}-1\equiv 0\bmod 27$ @J.W.Tanner $\endgroup$
    – Dr. Mathva
    Commented May 10, 2019 at 23:35
  • 2
    $\begingroup$ Yes, I meant 13 $\endgroup$ Commented May 10, 2019 at 23:38
  • 1
    $\begingroup$ @J.W.Tanner Your argument makes more sense. I found a flaw in my reasoning. Because $u$ may not be powers of a prime, I can not argue in that way. Thanks a lot Tanner, sincerely. You helped me a lot in my study of elementary number theory. $\endgroup$
    – Sam Wong
    Commented May 12, 2019 at 19:57

2 Answers 2

2
$\begingroup$

Completing the square is simply adding some amount and subtracting it in order to get partially a square. Consider for instance $x^2+2x=x^2+2x\underbrace{\color{green}{+1-1}}_{=+0}=(x\color{green}{+1})^2-1$...

Your textbook suggests that $$x^2+x+7\equiv 0\bmod{27}\stackrel{\cdot 4}{\iff}4x^2+4x+28\equiv0\bmod {27}$$ $$\iff \underbrace{(2x+1)^2}_{=4x^2+4x+1}+27\equiv(2x+1)^2+0\equiv(2x+1)^2\equiv0\bmod 27\iff \ldots$$ I obtained $$x\equiv\begin{cases}4\\13\\22\end{cases}\bmod 27$$

$\endgroup$
4
  • 1
    $\begingroup$ You mean mod $\color{red}27$ $\endgroup$ Commented May 10, 2019 at 23:53
  • 1
    $\begingroup$ mod 27 for the last part perhaps $\endgroup$
    – user645636
    Commented May 10, 2019 at 23:53
  • $\begingroup$ $\color{red}{27}$ $\endgroup$
    – user645636
    Commented May 10, 2019 at 23:54
  • $\begingroup$ And again, thanks for pointing the typo out! $\endgroup$
    – Dr. Mathva
    Commented May 11, 2019 at 0:12
2
$\begingroup$

if $$ u^2 \equiv 0 \pmod {27} $$ then $$ u \equiv 0 \pmod 9 $$

so $$ u \equiv 0,9,18 \pmod {27} $$

$\endgroup$
2
  • $\begingroup$ Thanks Jagy. Your post helped me understand Dr. Mathva's post. But I still have problems in understanding your first step. i.e. How do we know $u\equiv 0\,($mod $9)$ provided $u^2\equiv 0\,($mod $27)\,?$ Thanks for your elaboration in advance. $\endgroup$
    – Sam Wong
    Commented May 11, 2019 at 3:07
  • 1
    $\begingroup$ I came up a reasoning and can you help me see if it works. Since $27=3\cdot 3\cdot 3$ and $27\vert u^2 \iff (3\cdot 3\cdot 3)\vert (u\cdot u)$, we know $3\vert u$ and $(3\cdot 3)\vert u$. And so $9\vert u$. Is my reasoning correct? Thanks! $\endgroup$
    – Sam Wong
    Commented May 11, 2019 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .