You notice a stop-light ahead of you and it is currently red. You can't run the red light, so you will have to brake, but braking wastes energy and you want to be as fuel efficient as possible. What braking strategy maximizes efficiency?


Let's set down some notation and move slowly toward a well-defined question. Suppose you are currently a distance $d$ from the stop-light, and suppose that the stop-light is on a timer whereby it switches from red to green after $T$ seconds. You know the value of $T$, but you don't know how far in the cycle the stop-light is right now -- perhaps it will turn green in 1 second or perhaps in $T$ seconds. So if $t$ is the amount of time until it actually turns green, then $t$ is a random variable uniformly distributed on $[0,T]$. 


Your initial speed is $v$, so that if you don't slow down you'll be at the light in $\frac{d}{v}$ seconds. If $t<\frac{d}{v}$ then ``you win" by not slowing down, because the light will turn green before you get to it and you will have lost no energy to heat. So if $T\leq\frac{d}{v}$ then clearly the best strategy is not to slow down. Thus we may suppose $T>\frac{d}{v}$. We assume no friction.


I'm looking for a strategy for applying the brake minimally, not knowing the status of the stop-light's cycle. Perhaps we apply the brakes uniformly to end up stopped at the light, or perhaps we do not apply the brakes at all until we are almost to the stop-light, or perhaps we apply the brakes at the very beginning and coast at that reduced speed until we get very close to the light. What strategy minimizes the expected brake usage? 


More precisely, I'm looking for a non-increasing differentiable function (for the car's velocity in terms of its distance to the stop-light) $$f\colon[0,d]\to{\mathbb R}\_{\geq 0}$$ such that $f(d)=v$, $f(0)=0$, and such that if you solve the differential equation to find velocity in terms of time, then the expected value of that velocity at time $t$ is maximized.



What braking strategy is most fuel-efficient?
I think the problem would have been more naturally stated in the context of bicycles. In any case, the answer is as follows:


You are looking for an optimal velocity function $v: [0, T] \to \mathbb{R}\_{\geq 0}$ satisfying some conditions. Each such function represents the strategy, "if the light is still red at time $t$, travel at speed $v(t)$; when the light turns green, coast." One of the conditions on $v$ is that you may not run the red light. In terms of the function $v$, this condition may be written as $\int\_0^T v(t) \, dt \leq d$.


The quantity you wish to compute is the expected speed at which you will pass through the light after it turns green. By the givens (uniform distribution, the nature of our strategy), this expected speed is precisely the average value of $v(t)$, i.e., it is $\frac{1}{T} \int\_0^T v(t) \, dt$.


Putting the last two paragraphs together, we see that the optimal expected speed is $\frac{d}{T}$. Moreover, this expected speed is achieved for *any* choice $v(t)$ with the property $\int\_0^T v(t) \, dt = d$, i.e., for any strategy that will get you to the stoplight within time $T$.


Added in edit:
I agree with Willie Wong that maximizing the expected kinetic energy with which you pass through the light should be more physically relevant to, say, a bicyclist coasting on a shallow down-hill.


