Expand description
§Wait For It
We can solve analytically using the quadratic formula.
xis time spent holding the button.tis the duration of the race.dis the record distance.
Then the distance travelled is:
x * (t - x)
To beat the record the following condition must hold:
x * (t - x) = dx² - tx +d = 0
The start and end times where we will be the record are given by the roots of the quadratic equation which we can solve using the quadratic formula.
(t ± √(t² - 4d)) / 2