In this paper, by using techniques from fractional variational calculus and some critical point theorems, we prove the existence of weak solution and then deduce the existence of solution for the following fractional boundary value problem: where tDα T and 0Dtα are the right and left Riemann-Liouville fractional derivatives of order n − 1 < α < n which is a generalization of previous results and f : [0,T ] × R → R is a continuous function satisfying some assumptions. We propose two examples to illustrate our results.