Suppose you have a particle moving in 1 dimension.

There's an acceleration $a(t)$, a velocity $v(t)$ and a total distance traveled, $s$.

The particle starts and ends at rest.

The goal is to travel $s$ distance in time $T$, while minimising $$\int\_0^{T}{a(t)^2 dt}$$

How do you find that function?