  We develop a simple and accurate method to solve fractional variational and
fractional optimal control problems with dependence on Caputo and
Riemann-Liouville operators. Using known formulas for computing fractional
derivatives of polynomials, we rewrite the fractional functional dynamical
optimization problem as a classical static optimization problem. The method for
classical optimal control problems is called Ritz's method. Examples show that
the proposed approach is more accurate than recent methods available in the
literature.
