<s>[INST] Solve $x^2+x+1\equiv0\pmod5$ 
Solve:
$$x^2+x+1\equiv0\pmod5$$

My attempt:
Our proffesor told us that if we have $ax^2+bx+c\equiv\pmod p$ we need to multiply by $4a$, to get form of $(\text{ something})^2\equiv D\pmod p$.
$p$ is a prime and $\gcd(4a,p)=1$, so I tried to do that here:
$$4x^2+4x+4\equiv 0 \pmod 5$$
But now
$$(2x+1)^2+3\equiv 0 \pmod 5$$
$$(2x+1)^2\equiv -3 \pmod 5$$
 [/INST] More generally, there's this trick for solving quadratic congruences: if $\gcd(n,2a)=1$, then:
$$ax^2+bx+c\equiv 0\pmod{n}$$
$$\stackrel{\cdot 4a}\iff (2ax+b)^2\equiv b^2-4ac\pmod{n}$$
In this case,
$$x^2+x+1\equiv 0\pmod{5}$$
$$\stackrel{\cdot 4}\iff (2x+1)^2\equiv -3\equiv 2\pmod{5},$$
contradiction, because $2$ is not a quadratic residue mod $5$ (to see this, notice $(5k\pm 1)^2\equiv 1\pmod{5}$, $(5k\pm 2)^2\equiv 4\pmod{5}$, $(5k)^2\equiv 0\pmod{5}$).
</s>