Any physical process in which the dissipation is negligible can in some way be represented as a Hamiltonian system. Hamiltonian systems [
1,
2,
3,
4] have the important property of having an inner symplectic structure. This property is also called area-preserving. Area-preserving means that given some pairs of canonical variable, the sum of the areas of the variable pairs is invariant across time. A canonical Hamiltonian system has the following form:
with
where
H is the Hamiltonian function. The symplectic structure of the canonical Hamiltonian system can be expressed in the following 2-form:
For the canonical Hamiltonian system, obtaining analytical solutions is often a formidable task. Therefore, it is essential to construct numerical methods that have good properties. Numerical methods having good properties can obtain better numerical simulation [
5,
6] results than other methods. Thus, symplectic methods [
1,
7] are constructed to solve the dynamics of the Hamiltonian system. The advantage of the symplectic methods is that they exactly preserve the inner symplectic structure of the canonical Hamiltonian system. It has been shown that the symplectic methods have the near energy conservation property and long-term stability by conducting various numerical experiments in diverse disciplines, such as celestial mechanics, biology, and plasma physics [
2,
3,
8,
9,
10,
11]. Furthermore, symplectic methods have been found to exhibit superior long-term behavior compared to standard integrators such as explicit and implicit Runge–Kutta methods. This long-term behavior includes the near preservation of invariants without secular drift and slower error growth. Invariants that symplectic methods can effectively preserve include the Hamiltonian function, momentum, angular momentum, and others. Symplectic methods can be categorized into explicit symplectic methods and implicit ones. Explicit symplectic methods are not only effective in preserving invariants but also demonstrate better computational efficiency compared to implicit Runge–Kutta methods. Symplectic methods are applied to the Kepler problem [
12,
13], the restricted three-body problem [
14,
15], and the charged particle system [
10,
11], and they are compared with other numerical methods. Symplectic methods that are a generalization of the commutator-free quasi-Magnus exponential integrators were built for the Kepler problem, and they are shown to be more efficient than the Runge-Kutta methods [
12]. A family of adaptive symplectic conservative numerical methods for the Kepler problem were constructed, and the methods preserved all the global properties of the exact solution of the problem [
13]. The force gradient symplectic methods were constructed for the circular restricted three-body problem, and the numerical results showed that the fourth-order force gradient symplectic method always exhibits better numerical accuracy than the non-gradient Forest–Ruth algorithm [
14]. Symplectic algorithms for solving the restricted three-body problem were constructed, and their advantages have been shown in phase portrait and energy conservation compared with the fourth-order Runge–Kutta method [
15]. Explicit symplectic methods were constructed for the non-relativistic and relativistic charged particle dynamics, and the numerical results showed that the symplectic methods behave better in long-term energy conservation and numerical efficiency than the Runge–Kutta methods [
10,
11]. Blanes and Moan developed several higher-order symplectic methods using the splitting method for the Hamiltonian system, and these methods had higher precision than the Runge–Kutta methods [
16]. A non-canonical Hamiltonian system [
2,
9,
17,
18] is the generalization of a canonical Hamiltonian system. Many systems, including the Lotka–Volterra model [
2], the nonlinear Schrödinger equation [
19,
20], and the guiding center system [
17,
21], can be expressed as non-canonical Hamiltonian systems. They have the same form as canonical Hamiltonian systems, where the matrix
J is represented by a skew-symmetric matrix
which depends on the variable
y. The non-canonical Hamiltonian system also possesses a K-symplectic structure which is exactly preserved by the K-symplectic method [
22,
23,
24]. Explicit K-symplectic methods have been widely constructed for non-canonical Hamiltonian systems [
22,
24,
25]. Explicit K-symplectic methods are constructed using the splitting method for the charged particle system, and the numerical results showed that they behave better in phase portrait than the Runge–Kutta method and they are more stable than the Boris method in numerical calculation [
22]. Explicit K-symplectic methods were constructed for the bright and dark soliton motion of the nonlinear Schrödinger equation, and they were found to be more efficient than the canonical symplectic methods [
24,
25].
Symplectic and K-symplectic methods belong to a class of structure-preserving methods which aim to maintain the inherit structure of a system throughout numerical simulations. The other notable structure-preserving methods encompass the energy-preserving methods [
26,
27,
28] and the volume-preserving methods [
29,
30,
31]. Volume-preserving methods are tailored for source-free systems, where their volumes remain invariant over time, ensuring the preservation of system volume. On the other hand, energy-preserving methods are usually constructed for canonical and non-canonical Hamiltonian systems. In contrast to conventional numerical approaches, which can suffer from energy dissipation issues, energy-preserving methods offer a numerical solution that exactly preserves the system’s energy. This enhancement is crucial in ensuring the reliability of simulation results. For example, standard Runge–Kutta methods are prone to energy dissipation, leading to inaccuracies in phase portraits [
10,
11,
22]. Therefore, the development of energy-preserving methods addresses this challenge and enables the exact preservation of energy. Consequently, the application of energy-preserving methods extends to any system possessing invariants—quantities that remain constant over time. The Hamiltonian function of the both canonical and non-canonical Hamiltonian system is one invariant of the corresponding system. The Hamiltonian function is also called the energy of the system. Energy-preserving methods exactly preserve the Hamiltonian function of the system. There are several approaches to constructing energy-preserving methods, such as the discrete gradient method [
32], the averaged vector field method [
33,
34], the line integral method [
26,
35], the projection method [
2], and so on. Recently, energy-preserving methods were constructed for charged particle systems [
35,
36,
37,
38,
39] and guiding center systems [
17,
18,
40]. Both charged particle systems [
10,
11,
23] and the guiding center systems [
17,
21] can be expressed as non-canonical Hamiltonian systems. Thus, energy-preserving methods are developed for these two systems. Li and Wang constructed a second-order energy-preserving method using the discrete line integral method for the charged particle system [
36]. The Boris method is a well-known symmetric numerical method for the charged particle system. It is shown that the discrete line method behaves better in energy conservation than the Boris method [
36]. Within the framework of the line integral method, Brugnano et al. constructed higher-order energy-preserving methods using orthogonal polynomials and quadrature rules [
35] for a charged particle system. The numerical results show that the higher-order energy-preserving methods exhibit much better energy conservation than the Boris method and implicit midpoint method, and they are also more effective than the Boris method [
35]. Li and Wang constructed several efficient energy-preserving methods for charged particle systems [
38,
39]. The energy errors of energy-preserving methods are much smaller than the Boris method [
38,
39]. Zhang et al. constructed energy-preserving methods based on the Ito–Abe discrete gradient for guiding center systems [
40]. Zhu et al. constructed a family of energy-preserving methods for guiding center systems based on the averaged vector field [
17,
18]. The energy-preserving methods are shown to have excellent energy conservation behavior [
17,
18].
A family of energy-preserving methods has been constructed for guiding center systems; however, these methods based on the averaged vector field exhibit an energy drift over a long time [
17]. We aim to construct adaptive higher-order energy-preserving methods based on the averaged vector field that can overcome the energy drift problem. The higher-order energy-preserving methods are constructed by composing the second-order energy-preserving methods proposed in Reference [
17]. Thus, we can obtain a family of fourth-order and sixth-order energy-preserving methods. The higher-order energy-preserving methods can have higher numerical accuracy which means that the error in the variable is smaller than the lower-order methods. However, since the second-order energy-preserving methods exhibit energy drift, it is expected that the higher-order methods composed of these second-order methods will also display the same issue. In order to overcome the energy drift problem, for the higher order energy-preserving methods based on composition, we provide two adaptive strategies and develop two adaptive algorithms. The main idea of the first adaptive algorithm is to increase the number of points of the Guass Legendre’s quadrature rule used in the energy-preserving methods if the energy error is larger than the tolerance error. And if we use three different points of the Gaussian quadrature, the energy errors are all larger than the tolerance error, then we prefer the Gaussian quadrature with least error. The idea of the second-order adaptive algorithms is to use two different time stepsizes (
h and
) for the same energy-preserving method, and we choose the stepsize with smaller error. To evaluate the effectiveness of the adaptive algorithms, we compare them with standard Runge–Kutta methods and energy-preserving methods that do not employ any adaptive strategies. The numerical results show that the two adaptive algorithms do not show energy drifts, and their energy errors can be bounded to the machine’s precision.