<s>[INST] Find the solution for $x$ with $0 \le x \lt 13$ so $13 \mid 3x^2+9x+7 $. Find the solution for $x$ with $0 \le x \lt 13$ so $13 \mid 3x^2+9x+7 $.
I got this question in my discrete mathematics class.
I don't really get the idea how 13 can divide $3x^2+9x+7 $ 
All of my friend told me to try all the number between 0 and 12, but I know that's not how to solve this question.
Can anyone help me?
Thanks.
 [/INST] The discriminant of the equation $3x^2+9x+7=0$ equals $81-4 \cdot 9 \cdot 7=-3=10=7^2 \mod 13$. Taking into account that $3^{-1}=9 \mod 13$  we  have 
$$
x_1=\frac{-9+7}{6}=\frac{-2}{6}=-\frac{-1}{3}=-9=4  \mod 13, 
$$
$$
x_2=\frac{-9-7}{6}=\frac{-16}{6}=\frac{-8}{3}=-8 \cdot 9=5 \cdot 9=45=6  \mod 13. 
$$
Thus $x=4$ and $x=6.$
</s>