<s>[INST] Determining whether this congruence is solvable: $3x^2+6x+5 \equiv 0\pmod{89}$ I'm trying to figure out whether the following quadratic congruence is solvable: $3x^2+6x+5 \equiv 0\pmod{89}$.
It's impossible to divide $3x^2+6x+5$ to a form of $f(x) \cdot g(x)=3x^2+6x+5$ and then to check whether $f(x)\equiv 0
\pmod{89}$ or $g(x)\equiv 0(89)$, but $3x^2+6x+5 \equiv 0\pmod{89}$ is equal to $3(x+1)^2+2 \equiv 0\pmod{89}$ or $3(x+1)^2 \equiv -2\pmod{89}$ or $3(x+1)^2 \equiv 87\pmod{89}$ or
$(x+1)^2 \equiv 29\pmod{89}$. for $y=x+1$, I need to determine whether  $y^2 \equiv 29\pmod{89}$ is solvable, and it is not. Am I able to conclude something about the original equation in this way? what is the correct way to solve this problem?
Thanks a lot!
 [/INST] If you know about the law of quadratic reciprocity, it gives you a way to tell whether $y^2\equiv29\pmod{89}$ is solvable. 
Here's how it goes: Since 29 and 89 are both prime and congruent 1 mod 4, $y^2\equiv29\pmod{89}$ is solvable if and only if $y^2\equiv89\pmod{29}$ is solvable. That reduces to $y^2\equiv2\pmod{29}$. Then there's a little result that says if $p$ is an odd prime then $y^2\equiv2\pmod p$ is solvable if and only if $p\equiv\pm1\pmod8$. 
There's more to quadratic reciprocity than what I've done here. It's in every intro number theory text, and all over the web. 
</s>