This paper mainly discusses the problems of fractional variational problems and fractional diffusion problems using fractional difference and summation.Through the Euler finite difference method we get a variational formulation of the variation problem and the discrete solution to the time-fractional and space-fractional difference equation using separating variables method and two-side Z-transform method.