In this work, we consider boundary value problems involving either Caputo or Riemann-Liouville fractional derivatives of order
on the unit interval
. These fractional derivatives lead to nonsymmetric boundary value problems, which are investigated from a variational point of view. The variational problem for the Riemann-Liouville case is coercive on the space
but the solutions are less regular, whereas that for the Caputo case involves different test and trial spaces. The numerical analysis of these problems requires the so-called shift theorems which show that the solutions of the variational problem are more regular. The regularity pickup enables one to establish convergence rates of the finite element approximations. The analytical theory is then applied to the Sturm-Liouville problem involving a fractional derivative in the leading term. Finally, extensive numerical results are presented to illustrate the error estimates for the source problem and eigenvalue problem.