Simplest Variational Problem

Problem
Let $\map F {x, y, z}$ be a real-valued function of a differentiability class $C^2$ all its arguments.

Let $y: \R \to \R$ be a continuously differentiable real function for $x \in \sqbrk {a, b}$ such that


 * $\map y a = A$


 * $\map y b = B$

Then, among all real functions $y$, find the one for which the functional:


 * $\ds J \sqbrk y = \int_a^b \map F {x, y, y'} \rd x$

has a weak extremum.