The variational integrators of autonomous Birkhoff systems are obtained by the discrete variational principle. The geometric structure of the discrete autonomous Birkhoff system is formulated. The discretization of ma...The variational integrators of autonomous Birkhoff systems are obtained by the discrete variational principle. The geometric structure of the discrete autonomous Birkhoff system is formulated. The discretization of mathematical pendulum shows that the discrete variational method is as effective as symplectic scheme for the autonomous Birkhoff systems.展开更多
Integrator based model is used to describe a wide range of systems in robotics. In this paper, we present an axis-coupled trajectory generation algorithm for chains of integrators with an arbitrary order. Special noti...Integrator based model is used to describe a wide range of systems in robotics. In this paper, we present an axis-coupled trajectory generation algorithm for chains of integrators with an arbitrary order. Special notice has been given to problems with pre-existing nominal plans, which are common in robotic applications. It also handles various type of constraints that can be satisfied on an entire time interval, including non-convex ones which can be transformed into a series of convex constraints through time segmentation. The proposed approach results in a linearly constrained quadratic programming problem, which can be solved effectively with off-the-shelf solvers. A closed-form solution is achievable with only the boundary constraints considered. Finally, the proposed method is tested in real experiments using quadrotors which represent high-order integrator systems.展开更多
In this paper, we propose a variational integrator for nonlinear Schrodinger equations with variable coefficients. It is shown that our variational integrator is naturally multi-symplectic. The discrete multi-symplect...In this paper, we propose a variational integrator for nonlinear Schrodinger equations with variable coefficients. It is shown that our variational integrator is naturally multi-symplectic. The discrete multi-symplectic structure of the integrator is presented by a multi-symplectic form formula that can be derived from the discrete Lagrangian boundary function. As two examples of nonlinear Schrodinger equations with variable coefficients, cubic nonlinear Schrodinger equations and Gross-Pitaevskii equations are extensively studied by the proposed integrator. Our numerical simulations demonstrate that the integrator is capable of preserving the mass, momentum, and energy conservation during time evolutions. Convergence tests are presented to verify that our integrator has second-order accuracy both in time and space.展开更多
This paper studies a distributed optimal consensus problem for multiple double integrators under bounded velocity and acceleration. Assigned with an in dividual and private convex cost which is dependent on the positi...This paper studies a distributed optimal consensus problem for multiple double integrators under bounded velocity and acceleration. Assigned with an in dividual and private convex cost which is dependent on the position, each age nt n eeds to achieve consensus at the optimum of the aggregate cost under bounded velocity and acceleration. Based on relative positions and velocities to neighbor agents, we design a distributed control law by including the integration feedback of position and velocity errors. By employing quadratic Lyapunov functions, we solve the optimal consensus problem of double-integrators when the fixed topology is strongly connected and weight-balanced. Furthermore, if an initial estimate of the optimum can be known, then control gains can be properly selected to achieve an exponentially fast convergence under bounded velocity and acceleration. The result still holds when the relative velocity is not available, and we also discuss an extension for heterogeneous Euler-Lagrange systems by in verse dynamics control. A nu meric example is provided to illustrate the result.展开更多
A discrete total variation calculus with variable time steps is presented for mechanico-electrical systems where there exist non-potential and dissipative forces. By using this discrete variation calculus, the symplec...A discrete total variation calculus with variable time steps is presented for mechanico-electrical systems where there exist non-potential and dissipative forces. By using this discrete variation calculus, the symplectic-energy-first integrators for mechanico-electrical systems are derived. To do this, the time step adaptation is employed. The discrete variational principle and the Euler-Lagrange equation are derived for the systems. By using this discrete algorithm it is shown that mechanico-electrical systems are not symplectic and their energies are not conserved unless they are Lagrange mechanico-electrical systems. A practical example is presented to illustrate these results.展开更多
Two new fourth-order three-stage symplectic integrators are specifically designed for a family of Hamiltonian systems,such as the harmonic oscillator,mathematical pendulum and latticeφ4 model.When the nonintegrable l...Two new fourth-order three-stage symplectic integrators are specifically designed for a family of Hamiltonian systems,such as the harmonic oscillator,mathematical pendulum and latticeφ4 model.When the nonintegrable latticeφ4 system is taken as a test model,numerical comparisons show that the new methods have a great advantage over the second-order Verlet symplectic integrators in the accuracy of energy,become explicitly better than the usual non-gradient fourth-order seven-stage symplectic integrator of Forest and Ruth,and are almost equivalent to a fourth-order seven-stage force gradient symplectic integrator of Chin.As the most important advantage,the new integrators are convenient for solving the variational equations of many Hamiltonian systems so as to save a great deal of the computational cost when scanning a lot of orbits for chaos.展开更多
N-body simulations of the Sun, the planets, and small celestial bodies are frequently used to model the evolution of the Solar System. Large numbers of numerical integrators for performing such simulations have been d...N-body simulations of the Sun, the planets, and small celestial bodies are frequently used to model the evolution of the Solar System. Large numbers of numerical integrators for performing such simulations have been developed and used;see, for example, [1,2]. The primary objective of this paper is to analyse and compare the efficiency and the error growth for different numerical integrators. Throughout the paper, the error growth is examined in terms of the global errors in the positions and velocities, and the relative errors in the energy and angular momentum of the system. We performed numerical experiments for the different integrators applied to the Jovian problem over a long interval of duration, as long as one million years, with the local error tolerance ranging from 10-16 to 10-18.展开更多
Based on the Magnus integrator method established in linear dynamic systems, an efficiently improved modified Magnus integrator method was proposed for the second-order dynamic systems with time-dependent high frequen...Based on the Magnus integrator method established in linear dynamic systems, an efficiently improved modified Magnus integrator method was proposed for the second-order dynamic systems with time-dependent high frequencies. Firstly, the secondorder dynamic system was reformulated as the first-order system and the frame of reference was transfered by introducing new variables so that highly oscillatory behaviour inherits from the entries in the meantime. Then the modified Magnus integrator method based on local linearization was appropriately designed for solving the above new form and some improved also were presented. Finally, numerical examples show that the proposed methods appear to be quite adequate for integration for highly oscillatory dynamic systems including Hamiltonian systems problem with long time and effectiveness.展开更多
ZTE Corporation has signed strategic telecommunications software agreement with two leading providers in Europe and Latin America to optimize its offerings for target customers in
This paper develops a new approach to construct variational integrators. A simplified unconventional Hamilton's variational principle corresponding to initial value problems is proposed, which is convenient for appli...This paper develops a new approach to construct variational integrators. A simplified unconventional Hamilton's variational principle corresponding to initial value problems is proposed, which is convenient for applications. The displacement and mo- mentum are approximated with the same Lagrange interpolation. After the numerical integration and variational operation, the original problems are expressed as algebraic equations with the displacement and momentum at the interpolation points as unknown variables. Some particular variational integrators are derived. An optimal scheme of choosing initial values for the Newton-Raphson method is presented for the nonlinear dynamic system. In addition, specific examples show that the proposed integrators are symplectic when the interpolation point coincides with the numerical integration point, and both are Gaussian quadrature points. Meanwhile, compared with the same order symplectic Runge-Kutta methods, although the accuracy of the two methods is almost the same, the proposed integrators are much simpler and less computationally expensive.展开更多
In this paper, we study the persistence of invariant tori of integrable Hamiltonian systems satisfying Rssmann's non-degeneracy condition when symplectic integrators are applied to them. Meanwhile, we give an es...In this paper, we study the persistence of invariant tori of integrable Hamiltonian systems satisfying Rssmann's non-degeneracy condition when symplectic integrators are applied to them. Meanwhile, we give an estimate of the measure of the set occupied by the invariant tori in the phase space. On an invariant torus,numerical solutions are quasi-periodic with a diophantine frequency vector of time step size dependence. These results generalize Shang's previous ones(1999, 2000), where the non-degeneracy condition is assumed in the sense of Kolmogorov.展开更多
We study an explicit exponential scheme for the time discretisation of stochastic SchrS- dinger Equations Driven by additive or Multiplicative It6 Noise. The numerical scheme is shown to converge with strong order 1 i...We study an explicit exponential scheme for the time discretisation of stochastic SchrS- dinger Equations Driven by additive or Multiplicative It6 Noise. The numerical scheme is shown to converge with strong order 1 if the noise is additive and with strong order 1/2 for multiplicative noise. In addition, if the noise is additive, we show that the exact solutions of the linear stochastic Sehr6dinger equations satisfy trace formulas for the expected mass, energy, and momentum (i. e., linear drifts in these quantities). Furthermore, we inspect the behaviour of the numerical solutions with respect to these trace formulas. Several numerical simulations are presented and confirm our theoretical results.展开更多
A multisymplectic Fourier pseudo-spectral scheme, which exactly preserves the discrete multisym- plectic conservation law, is presented to solve the Klein-Gordon-SchrSdinger equations. The scheme is of spectral accura...A multisymplectic Fourier pseudo-spectral scheme, which exactly preserves the discrete multisym- plectic conservation law, is presented to solve the Klein-Gordon-SchrSdinger equations. The scheme is of spectral accuracy in space and of second order in time. The scheme preserves the discrete multisymplectic conservation law and the charge conservation law. Moreover, the residuals of some other conservation laws are derived for the geometric numerical integrator. Extensive numerical simulations illustrate the numerical behavior of the multisymplectic scheme, and demonstrate the correctness of the theoretical analysis.展开更多
A composition method for constructing high order multisymplectic integrators is presented in this paper. The basic idea is to apply composition method to both the time and the space directions. We also obtain a genera...A composition method for constructing high order multisymplectic integrators is presented in this paper. The basic idea is to apply composition method to both the time and the space directions. We also obtain a general formula for composition method.展开更多
Presents a study that analyzed the symplecticness, stability and asymptotic of Runge-Kutta, partitioned Runge-Kutta, and Runge-Kutta-Nystr ? m methods applied to linear Hamiltonian systems. Numerical representation of...Presents a study that analyzed the symplecticness, stability and asymptotic of Runge-Kutta, partitioned Runge-Kutta, and Runge-Kutta-Nystr ? m methods applied to linear Hamiltonian systems. Numerical representation of the problem; Results in connection to P-stability; Details of the application of backward error analysis in the study.展开更多
The numerical analysis of variational integrators relies on variational error analysis,which relates the order of accuracy of a variational integrator with the order of approximation of the exact discrete Lagrangian b...The numerical analysis of variational integrators relies on variational error analysis,which relates the order of accuracy of a variational integrator with the order of approximation of the exact discrete Lagrangian by a computable discrete Lagrangian.The exact discrete Lagrangian can either be characterized variationally,or in terms of Jacobi's solution of the Hamilton-Jacobi equation.These two characterizations lead to the Galerkin and shooting constructions for discrete Lagrangians,which depend on a choice of a numerical quadrature formula,together with either a finite-dimensional function space or a one-step method.We prove that the properties of the quadrature formula,finite-dimensional function space,and underlying one-step method determine the order of accuracy and momentum-conservation properties of the associated variational integrators We also illustrate these systematic methods for constructing variational integrators with numerical examples.展开更多
Discusses the symplectic integration of separable Hamiltonian ordinary and partial differential equations (PDE). Results of a von Neumann analysis; Spectra of linearized Hamiltonian PDEs.
We analyze three one parameter families of approximations and show that they are symplectic in Lagrangian sence and can be related to symplectic schemes in Hamiltonian sense by different symplectic mappings. We also g...We analyze three one parameter families of approximations and show that they are symplectic in Lagrangian sence and can be related to symplectic schemes in Hamiltonian sense by different symplectic mappings. We also give a direct generalization of Veselov variational principle for construction of scheme of higher order differential equations. At last, we present numerical experiments.展开更多
We investigate the multisymplectic Euler box scheme for the Korteweg-de Vries (KdV) equation. A new completely explicit six-point scheme is derived. Numerical experiments of the new scheme with comparisons to the Za...We investigate the multisymplectic Euler box scheme for the Korteweg-de Vries (KdV) equation. A new completely explicit six-point scheme is derived. Numerical experiments of the new scheme with comparisons to the Zabusky-Kruskal scheme, the multisymplectic 12-point scheme, the narrow box scheme and the spectral method are made to show nice numerical stability and ability to preserve the integral invariant for long-time integration.展开更多
We present a numerical simulation method of Noether and Lie symmetries for discrete Hamiltonian systems. The Noether and Lie symmetries for the systems are proposed by investigating the invariance properties of discre...We present a numerical simulation method of Noether and Lie symmetries for discrete Hamiltonian systems. The Noether and Lie symmetries for the systems are proposed by investigating the invariance properties of discrete Lagrangian in phase space. The numerical calculations of a two-degree-of-freedom nonlinear harmonic oscillator show that the difference discrete variational method preserves the exactness and the invariant quantity.展开更多
基金supported by the National Natural Science Foundation of China (Grant Nos. 10872084 and 10932002)the Research Program of Higher Education of Liaoning Province,China (Grant No. 2008S098)+3 种基金the Program of Supporting Elitists of Higher Education of Liaoning Province,China (Grant No. 2008RC20)the Program of Constructing Liaoning Provincial Key Laboratory,China (Grant No. 2008403009)the Foundation Research Plan of Liaoning educational Bureau,China (Grant No. L2010147)the Youth fund of Liaoning University,China (Grant No. 2008LDQN04)
文摘The variational integrators of autonomous Birkhoff systems are obtained by the discrete variational principle. The geometric structure of the discrete autonomous Birkhoff system is formulated. The discretization of mathematical pendulum shows that the discrete variational method is as effective as symplectic scheme for the autonomous Birkhoff systems.
文摘Integrator based model is used to describe a wide range of systems in robotics. In this paper, we present an axis-coupled trajectory generation algorithm for chains of integrators with an arbitrary order. Special notice has been given to problems with pre-existing nominal plans, which are common in robotic applications. It also handles various type of constraints that can be satisfied on an entire time interval, including non-convex ones which can be transformed into a series of convex constraints through time segmentation. The proposed approach results in a linearly constrained quadratic programming problem, which can be solved effectively with off-the-shelf solvers. A closed-form solution is achievable with only the boundary constraints considered. Finally, the proposed method is tested in real experiments using quadrotors which represent high-order integrator systems.
基金supported by the National Natural Science Foundation of China(Grant No.11401259)the Fundamental Research Funds for the Central Universities,China(Grant No.JUSRR11407)
文摘In this paper, we propose a variational integrator for nonlinear Schrodinger equations with variable coefficients. It is shown that our variational integrator is naturally multi-symplectic. The discrete multi-symplectic structure of the integrator is presented by a multi-symplectic form formula that can be derived from the discrete Lagrangian boundary function. As two examples of nonlinear Schrodinger equations with variable coefficients, cubic nonlinear Schrodinger equations and Gross-Pitaevskii equations are extensively studied by the proposed integrator. Our numerical simulations demonstrate that the integrator is capable of preserving the mass, momentum, and energy conservation during time evolutions. Convergence tests are presented to verify that our integrator has second-order accuracy both in time and space.
文摘This paper studies a distributed optimal consensus problem for multiple double integrators under bounded velocity and acceleration. Assigned with an in dividual and private convex cost which is dependent on the position, each age nt n eeds to achieve consensus at the optimum of the aggregate cost under bounded velocity and acceleration. Based on relative positions and velocities to neighbor agents, we design a distributed control law by including the integration feedback of position and velocity errors. By employing quadratic Lyapunov functions, we solve the optimal consensus problem of double-integrators when the fixed topology is strongly connected and weight-balanced. Furthermore, if an initial estimate of the optimum can be known, then control gains can be properly selected to achieve an exponentially fast convergence under bounded velocity and acceleration. The result still holds when the relative velocity is not available, and we also discuss an extension for heterogeneous Euler-Lagrange systems by in verse dynamics control. A nu meric example is provided to illustrate the result.
基金Project supported by the National Natural Science Foundation of China (Grant Nos 10672143 and 60575055)the State Key Laboratory of Scientific and Engineering Computing, Chinese Academy of Sciencesthe Natural Science Foundation of Henan Province Government, China (Grant No 0511022200)
文摘A discrete total variation calculus with variable time steps is presented for mechanico-electrical systems where there exist non-potential and dissipative forces. By using this discrete variation calculus, the symplectic-energy-first integrators for mechanico-electrical systems are derived. To do this, the time step adaptation is employed. The discrete variational principle and the Euler-Lagrange equation are derived for the systems. By using this discrete algorithm it is shown that mechanico-electrical systems are not symplectic and their energies are not conserved unless they are Lagrange mechanico-electrical systems. A practical example is presented to illustrate these results.
基金by the National Natural Science Foundation of China under Grant No 10873007.
文摘Two new fourth-order three-stage symplectic integrators are specifically designed for a family of Hamiltonian systems,such as the harmonic oscillator,mathematical pendulum and latticeφ4 model.When the nonintegrable latticeφ4 system is taken as a test model,numerical comparisons show that the new methods have a great advantage over the second-order Verlet symplectic integrators in the accuracy of energy,become explicitly better than the usual non-gradient fourth-order seven-stage symplectic integrator of Forest and Ruth,and are almost equivalent to a fourth-order seven-stage force gradient symplectic integrator of Chin.As the most important advantage,the new integrators are convenient for solving the variational equations of many Hamiltonian systems so as to save a great deal of the computational cost when scanning a lot of orbits for chaos.
文摘N-body simulations of the Sun, the planets, and small celestial bodies are frequently used to model the evolution of the Solar System. Large numbers of numerical integrators for performing such simulations have been developed and used;see, for example, [1,2]. The primary objective of this paper is to analyse and compare the efficiency and the error growth for different numerical integrators. Throughout the paper, the error growth is examined in terms of the global errors in the positions and velocities, and the relative errors in the energy and angular momentum of the system. We performed numerical experiments for the different integrators applied to the Jovian problem over a long interval of duration, as long as one million years, with the local error tolerance ranging from 10-16 to 10-18.
基金Project supported by the National Natural Science Foundation of China (No.10572119)Program for New Century Excellent Talent of Ministry of Education of China (No.NCET-04-0958)the Open Foundation of State Key Laboratory of Structural Analysis of Industrial Equipmentthe Doctorate Foundation of Northwestern Polytechnical University
文摘Based on the Magnus integrator method established in linear dynamic systems, an efficiently improved modified Magnus integrator method was proposed for the second-order dynamic systems with time-dependent high frequencies. Firstly, the secondorder dynamic system was reformulated as the first-order system and the frame of reference was transfered by introducing new variables so that highly oscillatory behaviour inherits from the entries in the meantime. Then the modified Magnus integrator method based on local linearization was appropriately designed for solving the above new form and some improved also were presented. Finally, numerical examples show that the proposed methods appear to be quite adequate for integration for highly oscillatory dynamic systems including Hamiltonian systems problem with long time and effectiveness.
文摘ZTE Corporation has signed strategic telecommunications software agreement with two leading providers in Europe and Latin America to optimize its offerings for target customers in
基金Project supported by the National Natural Science Foundation of China(Nos.11172334 and11202247)the Fundamental Research Funds for the Central Universities(No.2013390003161292)
文摘This paper develops a new approach to construct variational integrators. A simplified unconventional Hamilton's variational principle corresponding to initial value problems is proposed, which is convenient for applications. The displacement and mo- mentum are approximated with the same Lagrange interpolation. After the numerical integration and variational operation, the original problems are expressed as algebraic equations with the displacement and momentum at the interpolation points as unknown variables. Some particular variational integrators are derived. An optimal scheme of choosing initial values for the Newton-Raphson method is presented for the nonlinear dynamic system. In addition, specific examples show that the proposed integrators are symplectic when the interpolation point coincides with the numerical integration point, and both are Gaussian quadrature points. Meanwhile, compared with the same order symplectic Runge-Kutta methods, although the accuracy of the two methods is almost the same, the proposed integrators are much simpler and less computationally expensive.
基金supported by National Natural Science Foundation of China(Grant No.11671392)
文摘In this paper, we study the persistence of invariant tori of integrable Hamiltonian systems satisfying Rssmann's non-degeneracy condition when symplectic integrators are applied to them. Meanwhile, we give an estimate of the measure of the set occupied by the invariant tori in the phase space. On an invariant torus,numerical solutions are quasi-periodic with a diophantine frequency vector of time step size dependence. These results generalize Shang's previous ones(1999, 2000), where the non-degeneracy condition is assumed in the sense of Kolmogorov.
文摘We study an explicit exponential scheme for the time discretisation of stochastic SchrS- dinger Equations Driven by additive or Multiplicative It6 Noise. The numerical scheme is shown to converge with strong order 1 if the noise is additive and with strong order 1/2 for multiplicative noise. In addition, if the noise is additive, we show that the exact solutions of the linear stochastic Sehr6dinger equations satisfy trace formulas for the expected mass, energy, and momentum (i. e., linear drifts in these quantities). Furthermore, we inspect the behaviour of the numerical solutions with respect to these trace formulas. Several numerical simulations are presented and confirm our theoretical results.
基金supported by National Natural Science Foundation of China(Grant Nos.10901074,11271171,91130003,11001009 and 11101399)the Province Natural Science Foundation of Jiangxi(Grant No. 20114BAB201011)+2 种基金the Foundation of Department of Education of Jiangxi Province(Grant No.GJJ12174)the State Key Laboratory of Scientific and Engineering Computing,CASsupported by the Youth Growing Foundation of Jiangxi Normal University in 2010
文摘A multisymplectic Fourier pseudo-spectral scheme, which exactly preserves the discrete multisym- plectic conservation law, is presented to solve the Klein-Gordon-SchrSdinger equations. The scheme is of spectral accuracy in space and of second order in time. The scheme preserves the discrete multisymplectic conservation law and the charge conservation law. Moreover, the residuals of some other conservation laws are derived for the geometric numerical integrator. Extensive numerical simulations illustrate the numerical behavior of the multisymplectic scheme, and demonstrate the correctness of the theoretical analysis.
基金This work is subsidized by the special funds for major state basic research projects (No.1999032800).
文摘A composition method for constructing high order multisymplectic integrators is presented in this paper. The basic idea is to apply composition method to both the time and the space directions. We also obtain a general formula for composition method.
文摘Presents a study that analyzed the symplecticness, stability and asymptotic of Runge-Kutta, partitioned Runge-Kutta, and Runge-Kutta-Nystr ? m methods applied to linear Hamiltonian systems. Numerical representation of the problem; Results in connection to P-stability; Details of the application of backward error analysis in the study.
基金supported in part by the NSFGrantDMS-1001521 and the NSF CAREER Award DMS-1010687.
文摘The numerical analysis of variational integrators relies on variational error analysis,which relates the order of accuracy of a variational integrator with the order of approximation of the exact discrete Lagrangian by a computable discrete Lagrangian.The exact discrete Lagrangian can either be characterized variationally,or in terms of Jacobi's solution of the Hamilton-Jacobi equation.These two characterizations lead to the Galerkin and shooting constructions for discrete Lagrangians,which depend on a choice of a numerical quadrature formula,together with either a finite-dimensional function space or a one-step method.We prove that the properties of the quadrature formula,finite-dimensional function space,and underlying one-step method determine the order of accuracy and momentum-conservation properties of the associated variational integrators We also illustrate these systematic methods for constructing variational integrators with numerical examples.
文摘Discusses the symplectic integration of separable Hamiltonian ordinary and partial differential equations (PDE). Results of a von Neumann analysis; Spectra of linearized Hamiltonian PDEs.
基金Supported by the special founds for Major State Basic Reserch Project, G1999, 023800.
文摘We analyze three one parameter families of approximations and show that they are symplectic in Lagrangian sence and can be related to symplectic schemes in Hamiltonian sense by different symplectic mappings. We also give a direct generalization of Veselov variational principle for construction of scheme of higher order differential equations. At last, we present numerical experiments.
基金Supported by the National Baslc Research Programme under Grant No 2005CB321703, and the National Natural Science Foundation of China under Grant Nos 40221503, 10471067 and 40405019.
文摘We investigate the multisymplectic Euler box scheme for the Korteweg-de Vries (KdV) equation. A new completely explicit six-point scheme is derived. Numerical experiments of the new scheme with comparisons to the Zabusky-Kruskal scheme, the multisymplectic 12-point scheme, the narrow box scheme and the spectral method are made to show nice numerical stability and ability to preserve the integral invariant for long-time integration.
基金supported by the Key Program of National Natural Science Foundation of China(Grant No.11232009)the National Natural Science Foundation ofChina(Grant Nos.11072218,11272287,and 11102060)+2 种基金the Shanghai Leading Academic Discipline Project,China(Grant No.S30106)the Natural ScienceFoundation of Henan Province,China(Grant No.132300410051)the Educational Commission of Henan Province,China(Grant No.13A140224)
文摘We present a numerical simulation method of Noether and Lie symmetries for discrete Hamiltonian systems. The Noether and Lie symmetries for the systems are proposed by investigating the invariance properties of discrete Lagrangian in phase space. The numerical calculations of a two-degree-of-freedom nonlinear harmonic oscillator show that the difference discrete variational method preserves the exactness and the invariant quantity.