Quadratic congruence relation Is there a general formula for solving quadratic congruence relation like $ax^2-bx+c = 0$ in $\mathbb{Z}_{n}$ where $n \in \mathbb{N}$?
For example, I am trying to solve $x^2-3x+2 = 0$ in $\mathbb{Z}_{200}$. What kind of tools I need to solve it?
 A: There are techniques, but no general formula. In this case there is a method, based on the factorization $(x-1)(x-2)$.
For any $x$, the numbers $x-1$ and $x-2$ are relatively prime. Note that $200=2^3\cdot 5^2$, and work modulo $8$ and $25$ separately.
Since $x-1$ and $x-2$ are relatively prime, we have $(x-1)(x-2)\equiv 0\pmod{8}$ if and only if $x\equiv 1\pmod{8}$ or $x\equiv 2\pmod{8}$.
Similarly,  we have $(x-1)(x-2)\equiv 0\pmod{25}$ if and only if $x\equiv 1\pmod{25}$ or $x\equiv 2\pmod{25}$.
That gives $4$ possibilities:
(i) $x\equiv 1\pmod{8}$, $x\equiv 1\pmod{25}$;
(i) $x\equiv 2\pmod{8}$, $x\equiv 2\pmod{25}$;
(iii) $x\equiv 1\pmod{8}$, $x\equiv 2\pmod{25}$;
(iv) $x\equiv 2\pmod{8}$, $x\equiv 1\pmod{25}$.
Using the Chinese Remainder Theorem, or inspection, we can then write down the $4$ solutions modulo $200$.
The solutions to (i) and (ii) are trivial. For (iii), the solution is (by inspection) $177$ (modulo $200$. We leave (iv) to you. 
A: You can just apply the general formula and work in $\mathbb Z_{200}$ (as far as possible):
$$
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\mod 200
$$
The square root doesn't always exist and calculating them isn't very easy, but it can be done. Sometimes there are no solutions and sometimes there are multiple solutions. Calculate the possible values for $x$ for each of the square roots. Division by $2$ isn't trivial too, because $200$ is even ($\gcd (200,2)\neq 1$). Therefore, when calculating $x=\frac k2\mod 200$, for even $x$ it can be $\frac k2$ or $\frac k2+100$, because $2\cdot(\frac k2+100)=k\mod 200$. For odd $x$, $\frac x2$ doesn't exist.
A: Another way to get something better is
$ax^2-bx+c=0\Rightarrow4a^2x^2-4abx+4ac=0\Rightarrow(2ax-b)^2=b^2-4ac=D$
So, if the first congruence has a solution mod $n$ then there must be an integer $y$
with $y^2=D$ holding true. 
In other words $D$ must be a quadratic residue mod $n$.
(which sometimes is impossible for some $n$)
