This is an example from optimal control. It is called the Brachistochrone Problem.
The differential equations are shown on the right. In the lanuage of functionals, it is a minimum final time problem. There are three state variables. Two control variables. There is also a non-differential constraint on the controls to keep it bounded. Again, as in typical trajectory optimization problem, the boundary conditions are specified at two points. The problem has an analytical solution
Fig. 1. The System Dynamics
Three solutions are compared. The analytical solution, a numerical solution and , the Bezier solution. A Cubic Bezier curve is used to model the problem. The Bezier curve indicates a small error in the middle portion of the curve.
Figure 2. The Brachistochrone solution