This is from the controversial GCSE question in the UKs recent exams. The orginal question is thus:
There are $n$ sweets in a bag. $6$ of the sweets are orange, the rest are yellow.
Hannah takes at random a sweet from the bag and eats it. She then takes another sweet at random from the bag and eats it.
The probability that hannah eats two orange sweets is 1/3
a) show that $n^2 - n - 90 = 0$
This in itself isn't too difficult:
$$ \frac{6}{n}\frac{5}{n-1} = \frac{30}{n^2 - n} = \frac{1}{3} \Rightarrow \frac{90}{n^2 -n} = 1 $$ so that $$ n^2 - n -90 = 0 $$ But, what I'm trying to figure out is the value of n, the only way to do this I have thought of is trial and error, quickly finding the answer to be 10. Is there a different option here?
You could factor $-90$. You need $a,b$ such that $ab = -90$ and $a+b = -1$. There aren't that many factors, so you can quickly find $a,b = -10,9$, so that $n^2 - n - 90 = (n-10)(n+9)$, which gets you to the solutions $n = 10, -9$, the second of which is obviously invalid.
Alternatively, if you don't notice the factoring, there's always the good old standby: the quadratic formula (assuming you know your squares!)
$$\begin{split} n &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ &= \frac{1 \pm \sqrt{361}}{2} \\ &= \frac{1 \pm 19}{2} \\ &= 10, -9 \end{split}$$