How do I find the value of n in the following equation [duplicate]
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?
$\endgroup$ 53 Answers
$\begingroup$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}$$
$\endgroup$ 1 $\begingroup$I suppose use of quadratic formula can help(). Just substitute coefficients to expression $x=(-b-sqrt(b^2-4ac))/2a, y=(-b+sqrt(b^2-4ac))/2a$ where $a=1, b=-1, c=-90.$ Obviously, only positive solution makes sense, so you see n=10.
$\endgroup$ $\begingroup$Ok write the quadratic expression as $$n^2-10n+9n-90=0$$ then factorise it to get $(n+9)(n-10)=0$.
$n$ can't be negative so the answer is only $10$.
$\endgroup$