<s>[INST] How to solve this quadratic congruence? $27w^2+20w+35 \equiv 0 \pmod{23}$ Given $27w^2+20w+35 \equiv  0 \pmod{23}$
How to solve this  quadratic congruence?
All hints are welcome.
I completed the square ,so I obtained $27(x+\frac{10}{27})^2+\frac{845}{27} \equiv  0 \pmod{23} $
I need to get 2 solutions in the least residue system which are the correct answers:  $w\equiv  6 \pmod{23}$ and  $w \equiv  12 \pmod{23}$
 [/INST] Since $27 \equiv 4$ we can write the equation as $4w^2 + 20w + 35 \equiv 0.$ Completing the square gives $(2w+5)^2 + 10 \equiv 0,$ i.e. $(2w+5)^2 \equiv -10.$ But $-10 \equiv -10+2\cdot 23=36=6^2,$ so $2w+5\equiv\pm 6,$ i.e. $2w=-5\pm 6.$
Case $+$: $2w=-5+6=1\equiv 1+23=24=2\cdot12$ so $w\equiv12.$
Case $-$: $2w=-5-6=-11\equiv -11+23=12=2\cdot6$ so $w\equiv6.$
Thus the solutions are $w=12$ and $w=6$.
</s>