For primes $p,q$, what are the solutions to $$x^2=(p+q)x\pmod{pq}$$
-
Please edit in your attempts to solve this problem? – Rushabh Mehta Dec 16 '20 at 13:27
-
Can't really find a way to solve this.. – אבג דיזיין Dec 16 '20 at 13:32
-
If you don't know CRT: note that it's equivalent to $,(x-p)(x-q)\equiv 0 \pmod {pq},,$ i.e. $,pq\mid(x-p)(x-q),,$ and $,pq\mid mn\iff p\mid m, q\mid n, $ or $,p\mid n,q\mid n,,$ or $,pq\mid n,$ or $,pq\mid n,,$ by unique factorization. – Bill Dubuque Dec 16 '20 at 14:29
-
And how can use it? – אבג דיזיין Dec 16 '20 at 14:34
-
Same as in the linked dupes, except you have roots $,p,q,$ vs $,-2,-3$ or $,0,1\ \ $ – Bill Dubuque Dec 16 '20 at 14:37
-
You'll get the roots $, p,\ q,\ 0,\ p+q\ \ \ $ – Bill Dubuque Dec 16 '20 at 14:44
-
Can you please upload the full answer, still can't understand what to do and how. :( – אבג דיזיין Dec 16 '20 at 14:48
-
Do you not know CRT? If you do the linked answers explain in detail how to use it to solve such quadratics. – Bill Dubuque Dec 16 '20 at 14:52
-
As an optimization note that if $,r,$ is a root of $,x(x-b),$ then so too is $,b-r,,$ so the roots come in pairs that sum to $,b,$ (as in Vieta's formula). Here $,b = p+q,$ and our root pairs are $,p,q,$ and $,0,,p+q.,$ These are the solutions of all possible combinations of the roots listed in Bernard's answer, e.g. $p$ is the root $,\equiv (p,p)\equiv (0,p)\pmod{p,q},$ and $,q,$ is that $\equiv (q,q)\equiv (q,0),$ and their sum $,p+q,$ that $,\equiv (p+q,p+q)\equiv (q,p). \ \ $ – Bill Dubuque Dec 16 '20 at 15:13
-
The $,4,$ combinations of $,x\equiv p,q\pmod {!p},,$ $,x\equiv p,q\pmod {!q},$ are $\qquad\qquad\begin{align} &(p,p), (p,q), (q,p), (q,q)!\pmod{(p,q)}^{\phantom{|^|}}\[.3em] \mapsto &\ \ \ p,\ \ \ \ \ \ \ 0,\ \ \ \ p!+!q,\ \ \ \ q\ \ \ \text{when solved by CRT}\end{align}\ \ $ – Bill Dubuque Dec 16 '20 at 15:23
-
Thank you so much! – אבג דיזיין Dec 16 '20 at 15:24
-
If anything still is not clear you can ask further questions in comments here or in the linked answers. It will be clarified when you learn CRT as a ring isomorphism $,\Bbb Z/pq\cong \Bbb Z/p\times \Bbb Z/q,$ (which I do implicitly by doing arithmetic on the CRT solution tuples). – Bill Dubuque Dec 16 '20 at 15:25
2 Answers
Hint:
Use the Chinese remainder theorem: for $p\ne q$, $$\mathbf Z/pq\mathbf Z\simeq\mathbf Z/p\mathbf Z\times \mathbf Z/q\mathbf Z$$ so the given congruence is equivalent to the system of congruences $$\begin{cases} x^2\equiv qx\mod p \\ x^2\equiv px\mod q \end{cases}\iff\begin{cases} x\equiv 0 &\text{or }x\equiv q\mod p \\ x\equiv 0 &\text{or } x\equiv p \mod q \end{cases}$$ Next, you can use the inverse isomorphism of the Chinese remainder theorem, which relies on a Bézout's relation $up+vq=1$: \begin{align} \mathbf Z/p\mathbf Z\times \mathbf Z/q\mathbf Z &\longrightarrow \mathbf Z/pq\mathbf Z \\ (x\bmod p,y\bmod q)&\longmapsto yup+xvq\bmod pq \end{align}

- 175,478
-
-
Tried to solve this with the Chinese raminder theorem, couldnt finish. – אבג דיזיין Dec 16 '20 at 13:37
-
-
-
-
The general formula given by the inverse isomorphism is that the solution of the linear system of congruences: $\begin{cases}x\equiv\alpha\mod p,\x\equiv\beta\mod q,\end{cases};$ is given by $; x\equiv \beta up+\alpha vq\mod pq $, where $up+vq=1$ is a Bézout's relation between $p$ and $q$ (which need not be prime – only coprime). – Bernard Dec 16 '20 at 14:55
We can rewrite the modular equivalence as $$x^2-(p+q)x+kpq=0$$for some $k\in\mathbb Z$.
The discriminant of this quadratic is $(p+q)^2-4kpq$. To check whether there exists a square root of the discrimnant, we have to evaluate ${(p+q)^2-4kpq\choose pq}$, the legendre symbol. However, this is equal to ${(p+q)^2\choose pq}$ trivially, and this tells us that the discriminant is in fact a quadratic residue.
Hence, our solutions are of the form $$\frac{p+q\pm\sqrt{(p+q)^2-4kpq}}2$$for $k\in\mathbb Z$.

- 13,663
-
How you got from the first equation to the second in a trivial way? – אבג דיזיין Dec 16 '20 at 13:43
-
-
-
@אבגדיזיין This is not a good way to proceed. See the other approaches. – Bill Dubuque Dec 16 '20 at 14:31
-