How could I have an object's Z axis align with the first derivative of is location F-Curve I want an object to follow a path in space (specified via F-Curves, or by clamping to a Bezier curve), but I want the Z axis of this object to always be tangent to this trajectory (the same way that the engine of a train is approximately tangent to the train tracks).

I've tried using constraints: having an empty move along the "train tracks", and my object following closely behind, using a track-to constraint (so the object's Z points to the empty). I've paired this with a limit distance constraint (target is again the empty), but the result is not visually convincing -- it looks like the object is short-cutting the turns, as opposed to staying on the "train tracks".
If the goal is for an object to move along a curve (e.g. Bezier) with one of its axis aligned with the curve's first derivative, as suggested by @atomicbezierslinger, you can use a follow path constraint. For example, if we want the object's Z axis to be aligned with the curve's tangent:


Set Follow  Curve to true.
Set the Forward axis to Z
Set the Up axis to either X or Y (setting to Z will not work, and the object might not move at all).