  In the first part of the paper, we prove a fractional fundamental (du
Bois-Reymond) lemma and a fractional variant of the integration by parts
formula. The proof of the second result is based on an integral representation
of functions possessing Riemann-Liouville fractional derivatives, derived in
this paper too.
  In the second part of the paper, we use the previous results to give
necessary optimality conditions of Euler-Lagrange type (with boundary
conditions) for fractional Bolza functionals and to prove an existence result
for solutions of linear fractional boundary value problems. In the last case we
use a Hilbert structure and the Stampacchia theorem.
