In the 1967 MAA High School Mathematics Contest (Problem #27), contestants faced this classic algebra challenge:
"Two candles of the same length are made of different materials so that one burns out completely at a uniform rate in 3 hours and the other in 4 hours. At what time should the two candles be lighted simultaneously so that, at 4:00 PM, one stub is twice the length of the other?"
Let each candle have an initial length of $L_0 = 1$ (representing 100% of its height).
Because both candles burn down at a constant, uniform speed:
Candle A: Burns completely in 3 hours. Its burn rate is $r_A = \frac{1}{3}$ length/hour.
$$L_A(t) = 1 - \frac{t}{3}$$
Candle B: Burns completely in 4 hours. Its burn rate is $r_B = \frac{1}{4}$ length/hour.
$$L_B(t) = 1 - \frac{t}{4}$$
Since Candle A burns faster, Candle B will be the longer stub. We seek the elapsed burning time $t$ where Candle B's height is double Candle A's height:
$$L_B(t) = 2 \cdot L_A(t)$$
$$1 - \frac{t}{4} = 2\left(1 - \frac{t}{3}\right) = 2 - \frac{2t}{3}$$
Rearranging the terms:
$$\frac{2t}{3} - \frac{t}{4} = 2 - 1 = 1$$
Find a common denominator ($12$):
$$\frac{8t - 3t}{12} = 1 \implies \frac{5t}{12} = 1 \implies t = \frac{12}{5} = 2.4\text{ hours}$$
Converting $2.4$ hours into hours and minutes:
$$0.4\text{ hours} \times 60\text{ minutes/hour} = 24\text{ minutes} \implies t = 2\text{ hours and } 24\text{ minutes}$$
Counting backwards from 4:00 PM:
$$4:00\text{ PM} - 2\text{ hours } 24\text{ minutes} = 1:36\text{ PM}$$
In this lesson, we write code to simulate the burn down process and find the exact lighting time!
rate_A = 1 / 3 rate_B = 1 / 4 for t = 0, 3, 0.1 do len_A = 1 - rate_A * t len_B = 1 - rate_B * t if math.abs(len_B - 2 * len_A) < 0.05 then print(t) end end
Move the mouse over a dotted box for more information.
Linear decay: Both functions $L_A(t)$ and $L_B(t)$ are straight lines with negative slopes ($-1/3$ and $-1/4$). The steeper line drops faster.
Verifying the heights: At $t = 2.4$ hours:
Candle A height: $1 - 2.4 / 3 = 1 - 0.8 = 0.20$
Candle B height: $1 - 2.4 / 4 = 1 - 0.6 = 0.40$
$0.40 = 2 \times 0.20$ — exactly double!
Now you try. Run the code to verify that both candle stubs have a 2:1 ratio at 1:36 PM. Then see Example 2 to plot the burning candles on the screen!
Type your code here:
See your results here:
The code models the two linear burn-down equations.
Replace ???? with 12 / 5.
When you click Run, check the output: Candle B's length ($0.40$) is exactly $2.0 \times$ Candle A's length ($0.20$), and the lighting time is calculated as 1:36 PM!
Share your code
Show a friend, family member, or teacher what you've done!