\(f''(a) > 0 \), convex and at a relative minimum 

Canonical Hamiltonian

Defined as:
\(H[x(t), y(t), \lambda(t), t] = f[x(t), y(t), t] + \lambda(t) g[x(t), y(t), t]\)
Where \(\lambda (t)\) is the costate variable (similar to Lagrangian). The necessary conditions for maximization are:
  1. \(\frac{\partial H}{\partial y} = 0\)
  2. \(\frac{\partial \lambda}{\partial t} = \dot \lambda = - \frac{\partial H}{\partial x}\) and \(\frac{\partial x}{\partial t} = \dot x = \frac{\partial H}{\partial \lambda}\)
  3. \(x(0) = x_0\) and \(x(T) = x_T\). If \(x(T)\) is free, then \(\lambda(T) = 0\)
*For example, max \(\int_0 ^2 (3x - 2y^2) dt\). S.t. \(\dot x = 8y ; x(0) = 5 ; x(2) = free\)
\(H = 3x - 2y^2 + \lambda (8y)\)
\(\frac{\partial H}{\partial y} = 0 = -4y + 8 \lambda \Longrightarrow y = 2 \lambda\)
\(- \frac{\partial H}{\partial x} = \dot \lambda = -3\)
\(\frac{\partial H}{\partial \lambda} = \dot x = 8 y\) and given the first equation, \(\dot x = 16 \lambda\)
\(\int \dot \lambda dt = \int -3 dt = -3t + c_1 = \lambda\)
\(\dot x = 16(-3t + c_1) = \int -48t + 16t c_1 dt \Longrightarrow x(t) = -24t^2 + 16c_1 t + c_2\)
With transversality condition we know \(\lambda (T) = 0\), so here,
\(0 = -3(2) + c_1 \Longrightarrow c_1 = 6\) and therefore the costate variable: \(\lambda = -3t + 6\)
Now substituting for state variable and applying initial boundary \(x(0) = 5\):
\(x(t) = -24t^2 + 96t + 5\)
Finally evaluating \(y(t) = 2 \lambda\) and plugging in end points:
\(y(t) = -6t + 12 \Longrightarrow y(0) = 12 ; y(2) = 0\)
\(\therefore\) optimal path is a line from (0, 12) to (2, 0) with slope of -6.

The Delightful Taylor Series 

For the purpose of expansion around a point (\(x_0\)) we interpret a deviation: \(x = x_0 + \delta\), where the delta represents the deviation. Taylor's formula is as follows:
 \(f(x) = \frac{f(x_0)}{0!} + \frac{f'(x_0)}{1!} (x - x_0) +\frac{f''(x_0)}{2!} (x - x_0)^2 +... \frac{f^{n}(x_0)}{n!} (x - x_0)^n\)
*For example, \(f(x) = y = \ln x\). Using the Taylor approximation: