I agree with all the previous comments, this was a terrific explanation. I particularly appreciated that you included details of the proof of the adjoint method.
Thanks for the video and detailed derivation. There is a question/comment which really puzzles me. First, if L is a number, which measure the deviation (eg. absolute difference between) of estimation z(t) from the real value, then the mapping z(t) -> L is a functional by definition. We would have, instead, \delta L/\delta z(t) = a(t) naturally defined as a functional derivative. However, as I tried to follow the arguments used in this video (29:28), I realized that it changes a lot (as dz(t+\Delta t)/dz(t) does have its counterpart in the context of functional). So I was forced to understand that the notion of functional is irrelevant here, one defines a number L as a function of another number z(t) which is a function evaluated at a given time, but must not be understood as a function of time. Under such an enforced context, the derivation then makes sense. PS: please do not use "partial" in the numerator and "d" in the denominator, as I don't believe this is the standard.
On a second thought, a(t) is indeed reminiscent of the functional derivative defined as a(t)=\delta L/\delta z(t). It is very inviting to state that for z(t) satisfying \dot{z}=f(z,t), one has \dot{a}=-a \partial f/\partial z. Except for its variation the function z(t) is not fixed at both end points as per the definition of functional differential, therefore it one follows that path (which mostly should work), one must introduce some proper modifications.
Good job, very clear explanation ! However, it's sad that you didn't introduce some implementation of the function f. How can we design and implement such continuous function ?