Proposed in 1931, the Zermelo's navigation problem is a classic optimal control problem.
Without considering external forces such as current and wind, the optimal control is for the boat to always head towards D. Its path then is a line segment from O to D, which is trivially optimal.