How do I solve $3n^2+3n-1=0\pmod{5}$? 
How do I solve $3n^2+3n-1=0\pmod{5}$?

I know the answer should be $1  \pmod 5 $ and $3 \pmod5$, but am unsure how to get there. Thanks!
 A: Multiply by $2$ (mod $5$), so you get
$$n^2+n-2 = (n+2)(n-1) \equiv 0 \pmod 5.$$
Can you finish now?
A: $3n^2+3n\equiv1\equiv6\pmod5$
$\iff5$ divides $3(n^2+n-2)=3(n+2)(n-1)$
A: The quadratic formula still applies, as the integers modulo $5$ is a field (where division by $2$ is allowed), like the rational numbers and the real numbers (this is because $5$ is a prime number):
$$
n\equiv\frac{-3\pm\sqrt{3^2+4\cdot3}}{2\cdot3}\\
=\frac{-3\pm\sqrt{21}}{6}
$$
Now, $-3$ is the same as $2$, $21$ is the same as $1$ and $6$ is the same as $1$. The square root (or rather a square root) of $1$ is $1$. So we simplify and get
$$
n\equiv\frac{2\pm1}{1}
$$
which is easily calculated.
A: You can complete the square in the usual way. For $an^2+bn+c=0$ it can work well to multiply by $4a$. Here, multiply by $12$ to give $$36n^2+36n-12=(6n+3)^2-21=(n+3)^2-1=(n+2)(n+4)=0$$
(you need to find a square root of $21$ modulo $5$).
Obviously with a base as low as $5$, it is easy to try all possibilities. The quadratic formula (which can be established by completing the square in this way) works provided the modulus is prime to $2a$ (because you have to divide by $2a$) and you get a solution if $b^2-4ac$ has a square root.
A: This quadratic equation has solutions, as in all fields, iff its discriminant has square roots. Now
$$\Delta= 3^2-4(-1)3\equiv 4-3=1\mod 5$$
is indeed the square of $1,-1$, so the solutions are given by
$$x_1, x_2\equiv (2\cdot 3)^{-1}(-3\pm1)\equiv -3\pm 1=-4,-2\equiv 1, 3\mod 5.$$
