Simplest Variational Problem

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

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


 * $y\paren a=A$


 * $y\paren b=B$

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


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

has a weak extremum.