Differential Equations: Coffee beans; logistics — RVHS 2025 H2 Math Prelim Paper 1
What this question tests
Question
A cafe roasts its own coffee beans and packages them to be sold. The amount of roasted coffee beans remaining in the cafe at time \(t\) days is denoted by \(x\) kg. The cafe produces roasted coffee beans at a fixed rate of 10 kg/day, and sells the roasted coffee beans at a rate proportional to \(x^2\) kg/day.
- Given that there is no change in the amount of roasted coffee beans remaining in the cafe when there is 5 kg of beans remaining, show that \(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 10 - \dfrac{2}{5}x^2\). Find the general solution of this differential equation. (You do not have to make \(x\) the subject.)
Due to improvement in roasting capabilities of the cafe, it is now able to produce roasted coffee beans at the rate of \(3x\) kg/day, and sells the roasted coffee beans at a rate proportional to \(x^2\) kg/day.
- Given that the amount of roasted coffee beans is increasing at the rate of 6 kg/day when the amount of roasted coffee beans remaining in the cafe is 6 kg, write down the modified differential equation relating \(\dfrac{\mathrm{d}x}{\mathrm{d}t}\) and \(x\).
- Given that the initial amount of roasted coffee beans in the cafe is 13.5 kg, solve the differential equation in part (b), expressing \(x\) in terms of \(t\). Deduce the amount of roasted coffee beans remaining in the cafe in the long run, and sketch the curve of \(x\) against \(t\).
- Based on the curve in part (c), explain in context why this might be favourable for the cafe owner.
Show full worked solution▾
(a) Show \(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 10 - \dfrac{2}{5}x^2\) and find general solution.
Let rate of producing \(= 10\) kg/day, rate of selling \(= kx^2\) kg/day. \[ \frac{\mathrm{d}x}{\mathrm{d}t} = 10 - kx^2 \]
When \(x = 5\), \(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 0\): \(0 = 10 - 25k \Rightarrow k = \dfrac{2}{5}\).
So \(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 10 - \dfrac{2}{5}x^2 = -\dfrac{2}{5}(x^2-25)\). \( \)
\[ \int \frac{1}{x^2-25}\,\mathrm{d}x = \int -\frac{2}{5}\,\mathrm{d}t \] \[ \frac{1}{2(5)}\ln\left|\frac{x-5}{x+5}\right| = -\frac{2}{5}t + c \](b) Modified DE with production \(3x\) kg/day.
\(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 3x - kx^2\).
When \(x=6\), \(\dfrac{\mathrm{d}x}{\mathrm{d}t} = 6\): \(6 = 18 - 36k \Rightarrow k = \dfrac{1}{3}\).
(c) Solve with \(x(0) = 13.5\).
\[\begin{aligned} \int \frac{1}{x(9-x)}\,\mathrm{d}x &= \int \frac{1}{3}\,\mathrm{d}t\\ \frac{1}{9}\int\left(\frac{1}{x} + \frac{1}{9-x}\right)\mathrm{d}x &= \frac{1}{3}t + c'\\ \ln|x| - \ln|9-x| &= 3t + c\\ \ln\left|\frac{x}{9-x}\right| &= 3t + c \end{aligned}\] \[ \frac{x}{9-x} = Ae^{3t}, \quad A = \pm e^c \] \[ x = 9Ae^{3t} - xAe^{3t} \implies x(1+Ae^{3t}) = 9Ae^{3t} \implies x = \frac{9Ae^{3t}}{1+Ae^{3t}} \]When \(t=0\), \(x=13.5\): \[ 13.5 = \frac{9A}{1+A} \implies 13.5 + 13.5A = 9A \implies 4.5A = -13.5 \implies A = -3 \]
\[ x = \frac{-27e^{3t}}{1-3e^{3t}} = \frac{27e^{3t}}{3e^{3t}-1} = \frac{27}{3-e^{-3t}} \]As \(t\to\infty\): \(e^{-3t}\to 0\), so \(x \to \dfrac{27}{3} = 9\).
In the long run, the amount of roasted coffee beans stabilises at 9 kg.

(d) Why this is favourable for the cafe owner.
The amount of roasted coffee beans stabilises at 9 kg in the long run, meaning there is always stock available for selling. The cafe owner can plan storage capacity adequately, and the inventory never depletes to zero.