Abstract. In this paper we study the fractional differential equation, containing both the left and right fractional derivatives, with respect to various types of boundary conditions. We transform the fractional differential equation into equivalent integral form. Next, we develop a discrete form of the composition of the left and right fractional integrals, based on the trapezoidal rule of integration, and we obtain a numerical scheme for a fractional integral equation. The discrete form of integral equation is rewritten in the matrix form. Finally, several examples of computations are presented.