  We propose the difference discrete variational principle in discrete
mechanics and symplectic algorithm with variable step-length of time in finite
duration based upon a noncommutative differential calculus established in this
paper. This approach keeps both symplicticity and energy conservation
discretely. We show that there exists the discrete version of the
Euler-Lagrange cohomology in these discrete systems. We also discuss the
solution existence in finite time-length and its site density in continuous
limit, and apply our approach to the pendulum with periodic perturbation. The
numerical results are satisfactory.
