The problem requires knowledge of the time when the light will change and the distance to the intersection. In the graph of the situation. The acceleration is a line with predetermined slope. We will describe the separate cases relative to the situation where a car starts at rest, then accelerates at maximal acceleration a, and crosses the intersection when the light changes. This basic situation will be a triangle. The base of the triangle is the time to till the light change. The area of the triangle is the distance to the crossing. time barrier | | | | | | (to,ato) | /| | / | | / | | / | | / | | / | | / | | / | | /distance| |/ barrier | ----------------------------/----------+-------- | | to The light will change at time to. The car is sitting at (t,v). There are three possibilities. (1) The car is inside the triangle. v <= a t (2) The car is above the triangle. a t < v This case hase two sub cases, depending on whether the car has to brake or not to avoid coming to the intersection too soon. 2 1/2 a t (a) at < v <= ------------ + at to - t 2 1/2 a t (b) ------------ + at < v to - t (3) The car is left of the y axis. t < 0 Case (1). The car is inside the triangle. The best the car can do is to accelerate and the light will change before the car reaches the intersection. The velocity of the car when the light changes will be v + a (to-t) | | | | | | | /| | / | | / | | / | | / /| (to, v+a(to-t)) | / / | | / / | | / 0 | | / | | | / | | -------------+---------------/------|---+-------- | | | time barrier Case (2) The car is above the triangle. The best the car can do is slow to a speed w so that the area of the triangle A to the left matches the area of the trapezoid T above. O /| | . / | | . / | | . / /| | ./ T/ | |(t,w)* / | | | / | | |/ | (t,at)/ | | /| | | / | | | / A| | | / | | -----------------------------/----|-----+-------- t to 1/2 t a t = (w-a t)(to-t) 2 1/2 a t ------------ = w - at to - t 2 1/2 a t ------------ + at = w to - t If v is greater than w, then slow (instantly) to w and then accelerate. This is case (b). If at < v < w, then accelerate. This is case (a). In this case, the light will change before the car reaches the intersection. In case (a) the velocity will become v + a(to-t) when the light changes, but the car will be short of the intersection. In case (b) the velocity will become _ _ | | | 2 | | 1/2 a t | w+a(to-t) = | ------------ + at | + a (to-t) | to -t | |_ _| 2 1/2 a t = ------------ + a to to - t Which is bigger than a to Case (3) The car is to the left of the triangle Now he backs up until the area A of the triangle equals the area of the Trapezoid T. The car stops instantly, backs up till time 2 - t h = 1/2 ----------------- to - t and then accelerates forward and crosses the intersection at velocity 2 1/2 a t a to + ------------- to - t | | | /| | / | | / /| | / / | (t,v) | / / | o | / / | | | / / | | | / / | | | /T/ | | |/ / | | / / | | h/ / | --------------------------/-/----------+-------- \ A | | \ | to \ | \| 2 1/2 (h-t) a(h-t) = 1/2 (to-h) a(to-h) - 1/2 a to 2 2 2 1/2 (h-t) = 1/2 (to-h) -1/2 to 2 2 2 (h-t) = (to-h) - to 2 2 2 (h-t) - (to-h) = - to 2 [h-t - (to-h)][ h-t + to-h] = - to 2 [2h -t-to] [to-t] ] = - to 2 -to 2h -(t+to) = --------- to-t _ 2 _ | to | h = 1/2|(t+to) - ------------- | |_ to - t _| 2 2 2 to - t - to h = 1/2 ----------------- to - t 2 -t h = 1/2 -------------- to - t So you will back up from time t to time h and then go forward at full acceleration. The back up distance is _ _ 2 | 2 | 2 | -t | 1/2 a (h-t) = a/2 | 1/2 ------ - t | | to-t | |_ _| _ _ 2 | 2 | | -t | = a/8 | ------ - 2 t | | to-t | |_ _| _ _ 2 | 2 2 | | -t -2 t to + 2 t | = a/8 | ----------------- | | to-t | |_ _| _ _ 2 | 2 | | t -2 t to | = a/8 | ----------------- | | to-t | |_ _| _ _ 2 | | | t -2 to | = a/8 | t ------------- | | to-t | |_ _| the additional area of the right hand side triangle is 2 2 1/2 a (to-h) - 1/2 a to _ 2 _ 2 | -t | 2 1/2 a | to - 1/2 -------- | - 1/2 a to | to-t | |_ _| _ 2 2 _ 2 | to -t to +1/2 t | 2 1/2 a | ----------------- | - 1/2 a to | to-t | |_ _| 2 2 2 2 2 (to - t to + 1/2 t ) - to (to-t) 1/2 a ---------------------------------------- 2 (to-t) 4 2 2 4 3 2 2 3 4 3 2 2 to + t to + 1/4 t -2 to t +to t - to t - to +2 to t -to t 1/2 a -------------------------------------------------------------------- 2 (to-t) 2 2 4 3 + t to + 1/4 t - to t 1/2 a -------------------------------------------------------------------- 2 (to-t) 2 2 2 + to + 1/4 t - to t 1/2 a t ------------------------------------------------------------------- 2 (to-t) 2 2 2 4 to - 4 to t + t 1/8 a t ------------------------------------------------------------------- 2 (to-t) 2 2 (2 to - t) 1/8 a t ------------------------------------------------------------------- 2 (to-t) velocity is a (to-h) = _ _ | | | 2 | | - t | a |to - 1/2 ----------------- | | to - t | |_ _| 2 1/2 a t a to + ------------- to - t to = 5; a = 2; h[t_] := -1/2 t^2/(to-t); f[t_,v_] := If[t < 0, a(to-h[t]), If[ g[t] <= v, g[t] + a to ,0]]; Plot3D[ f[t,v],{t, -5 , to-0.1},{v,0,80}]; g[t_] := 1/2 a t^2/(to-t) + a t; p1 = Plot[a t,{t,0,to},PlotRange->All]; p2 = Plot[g[t],{t,0,to-1.0},PlotRange->All]; p3 = Plot[h[t],{t,-5,0},PlotStyle->{RGBColor[1,0,0]},PlotRange->All]; p4 = ParametricPlot[{to,v},{v,0,3 a to},PlotStyle->{RGBColor[0,1,0]}, PlotRange->All]; p5 = Show[p1,p2,p3,p4,PlotRange->All] f[t_,v_] := If[t < 0, a(to-h[t]), If[ g[t] <= v, g[t] + a to ,v+a(to-t)]]; p6 = Plot3D[f[t,v],{t,0,to},{v,0,30}]; p7 = ParametricPlot3D[ {t,g[t],f[t,g[t]]},{t,0,to}, PlotStyle->{Thickness[0.01]}]; p8 = ParametricPlot3D[ {t, a t, a to},{t,0,to}, PlotStyle->{Thickness[0.01]}]; Show[p6,p7,p8]