Solve $x^2+x+3=0$ mod $27$ I was preparing for my Number Theory class for next semester and one of the questions that I came upon is to solve $x^2+x+3=0$ mod $27$. I have seen modular arithmetic before but never one that involved using mod with an equation. I plugged it into WolframAlpha and it gave me $x=11,15$. My question is, how did wolfram alpha solve this? Is there some kind of procedure? My initial try was to use Brute Force and plug in every value possible until it is divisible by 27 but I would like to see how it is solved.

There is no harm in completing the square. We have that $2^{-1}=-13$, so  $x^2+x+3=x^2-26x+3=0$ gives $(x-13)^2+3-13^2=0$, or $(x-13)^2=4=2^2$. This means that $(x-13)^2-2^2=0$ so that $(x-15)(x-11)=0$. Note you cannot really conclude $x-15=0$ or $x-11=0$ right away, since we're not working over an integral domain.
ADD  Let $p$ be an odd prime, $p\not\mid a$. Then $x^2=a\mod p^k$ has at most two (incongruent) solutions. 
P Suppose $x^2\equiv x_0^2\mod p^k$. Then $p^k\mid (x-x_0)(x+x_0)$. We cannot have $p$ dividing both $x-x_0,x+x_0$ for this means say $p\mid 2x_0$, which is impossible. Thus $x= \pm x_0\mod p^k$.
