Condition for Differentiable Functional to have Extremum

Theorem
A necessary condition for the differentiable functional $J[y;h]$ to have an extremum for $y=\hat{y}$ is

$\displaystyle\delta J[y;h]\bigg\rvert_{y=\hat{y}}=0$

for all allowed $h$.

Proof
Let $J[y]$ be a differentiable functional.

Suppose $J[y;h]$ has a minimum for $y=\hat{y}$.

By definition,

$\Delta J[y;h]=\delta J[y;h]+\epsilon \left\vert{h}\right\vert$

where $\epsilon\to 0$ as $ \left\vert{h}\right\vert\to 0$.

Hence, there exists $\left\vert{h}\right\vert$ so small, that signs of $\Delta J[y;h]$ and $\delta J[y;h]$ match.

For example, at $y=\hat{y}$ we have $\Delta J[\hat{y};h]\ge 0$ and $\delta J[\hat{y};h]\ge 0$.

Now, suppose $\delta J[y;h_0]\ne 0$ for some allowed $h_0$.

Then for any $\alpha>0$

$\displaystyle \delta J[y;-\alpha h_0]=-\delta J[y;\alpha h_0]$

Therefore, for $\left\vert{h}\right\vert$ however small $\Delta J[y;h]$ can be made to have any sign.

However, by assumption that $J[y;h]$ has a minimum it holds that for sufficiently small $\left\vert{h}\right\vert$

$\displaystyle \Delta J[\hat{y};h]=J[\hat{y}+h]-J[\hat{y}]\ge 0$

which automatically fixes the sign of $\delta J[y;h]$.

This is a contradiction.

Hence

$\displaystyle\delta J[y;h]\bigg\rvert_{y=\hat{y}}=0$

for all allowed $h$.