in this paper, boundary value problems of fractional order are converted into an optimal control problems. then an approximate solution is constructed from translations and dilations of a b-spline function such that the exact boundary conditions are satisfied. the fractional differential operators are taken in the riemann-liouville and caputo sense. several example are given and the optimal err...