Relax. We 're all dumb kids in this grand game called lifePlease explain as if you are talking to an idiot child, which I am.
Now, for the functional , the argument is , so maybe it makes more sence to write . Now, the Euler-Lagrange equation (the "derivative" of I) gives us that, at a stationary point ,
or . Solve and use the boundary conditions.