A shopper spends in total on pens. If the same had bought one extra pen, the average price per pen would have been less. How many pens were bought?
Choose the unknown that makes the prices easy to write. Let be the number of pens actually bought. Then the actual average price is
Choosing the count rather than the price as the unknown is what keeps the algebra to a single variable.
Express the hypothetical price. With one extra pen for the same money, the count is and the price becomes
More pens for the same total means a lower unit price, so this second expression is the smaller of the two.
Turn the comparison into an equation. The hypothetical price is less than the actual price, so the actual price minus the hypothetical price equals :
Getting this subtraction the right way round matters — reversing it gives and no positive solution.
Combine the fractions and clear denominators.
so
Factor and solve the quadratic. Two numbers multiplying to and adding to are and :
Reject the impossible root and check. A count of pens cannot be negative, so is discarded and . Checking against the story: per pen, and with one more pen per pen — exactly less. So 15 pens were bought.
Need to solve a different problem like this? Open the solver →