# When do you break for a red light?

Suppose that you crest a hill and see a red light.  Should you brake immediately or wait. Supposing that your goal is to minimize gas consumption, you want to maximize the average mechanical energy of your car when the light turns green.  The formula for mechanical energy is

${E={1\over2}mv^2}.$

Suppose that you know that red lights last for $T$ seconds and you are distance ${d}$ from the light when you first notice the red light.  If you chose to reduce your speed to ${v}$, then the probability that you will see the light turn green before reaching it is ${p = d/v/T}$ (assuming that $T\geq d v$).  The mechanical energy while you travel toward the light is ${E={1\over2}mv^2}$, so the average energy when the light turns green is

${{p E} = {{d\over{v T}}{1\over2}mv^2} = v{{d m}\over{2 T}}.}$

So, it looks like higher speed implies higher average energy when the light turns green and lower gas consumption.  (Of course, higher speed also implies lower safety.)