Introduction

Most of the dynamical systems facing engineers, physicists and applied mathematicians today exhibit certain essential features which preclude exact analytical solutions. Some of these features are nonlinearities, variable coefficients, complex boundary shapes, and nonlinear boundary conditions at known or, in some cases, unknown boundaries. Even if the exact solution of a problem can be found explicitly, it may be useless for mathematical and physical interpretation or numerical evaluation. Examples of such problems are Bessel functions of large argument and large-order and doubly periodic functions. Therefore, to obtain information about solutions of equations, we are forced to resort to approximate and numerical solutions, or combinations of both.

Recently, considerable attention has been directed toward the analytical approximate solutions for the strongly nonlinear differential equations of dynamical systems. The traditional perturbation methods have many shortcomings, and they are not valid for strongly nonlinear dynamical systems.

To overcome the shortcomings, many techniques have appeared in open literature, for example, parameter-expanding method [13], variational iteration method [47], energy balance method [814], variational approach method [1519], amplitude–frequency formulation [2022], homotopy perturbation method [2329], and the other analytical approximate solutions [30].

The solution of differential equations in physics and engineering, especially some oscillation equations are nonlinear, and in most cases it is difficult to solve such equations, especially analytically. Previously, He had introduced the energy balance method based on collocation and the Hamiltonian. This method can be seen as a Ritz method and leads to a very rapid convergence of the solution, and can be easily extended to other nonlinear oscillations.

This approach is very simple but strongly depends upon the chosen location point. Recently, He [31] has proposed the Hamiltonian approach to overcome the shortcomings of the energy balance method. This approach is a kind of energy method with a vast application in conservative oscillatory systems. Application of this method can be found in many literatures [3135].

The Hamiltonian approach method is the subject of this article, as one of the analytical approximate techniques. In this article, we present two examples to illustrate the applicability, accuracy and effectiveness of the Hamiltonian approach method as one of the analytical approximate techniques.

As the first example in this paper, we investigate the nonlinear differential equation of the motion of a rigid rod rocking back on the circular surface without slipping [36]. In the second example, we investigate the nonlinear differential equation of the free vibrations of an autonomous conservative oscillator with inertia and static-type fifth-order nonlinearities [37].

To illustrate the accuracy of the Hamiltonian approach method, in first example, we compare the approximate solution result with exact solution. In second example, because there is no exact solution, we compare the approximate solution result with Runge–Kutta method as one of the known numerical methods.

The description of Hamiltonian approach method

To descript the He’s Hamiltonian approach method, we consider the following general oscillator [31]:

d 2 d t 2 u ( t ) + f ( u ( t ) ) = 0
(1)

with initial conditions:

u ( 0 ) = A , d d t u ( 0 ) = 0 .
(2)

It is easy to establish a variational principle for Eq. (1), which reads [31]:

J u ( t ) = 0 T / 4 - 1 2 d d t u ( t ) 2 + F u ( t ) d t
(3)

where T is the period of the oscillator ∂F/∂u = f(u).

In the functional (3), - 1 2 d d t u ( t ) 2 is kinetic energy, and F(u(t)) is potential energy, so the functional (3) is the least Lagrangian action, from which we can immediately obtain its Hamiltonian, which reads:

H = 1 2 d d t u ( t ) 2 + F u ( t ) = constant = H 0
(4)

or:

R ( t ) = 1 2 d d t u ( t ) 2 + F ( u ( t ) ) - F ( A )
(5)

Equation (4) implies that the total energy keeps unchanged during the oscillation.

We use the following trial function to determine the angular frequency ω.

u ( t ) = A cos ω t
(6)

where ω is the frequency. Submitting Eq. (6) into Eq. (5) results in a residual:

R ( t ) = 1 2 A 2 ω 2 sin 2 ω t + F ( A cos ω t ) - F ( A )
(7)

If, by chance, the exact solution had been chosen as the trial function, then it would be possible to make R zero for all values of t by appropriate choice of ω. Since u(t) = A cos ωt is an approximation to the exact solution, R cannot be made zero everywhere. According to the energy balance method [2], locating at some a special point, that is, ωt = π/4 and setting R(t = π/4ω) = 0, we can obtain an approximate frequency–amplitude relationship of the studied nonlinear oscillator. Such treatment is much simple and has been widely used by engineers [37]. The accuracy of such location method, however, strongly depends upon the chosen location point. To overcome the shortcoming of the energy balance method, in this paper, we apply a new approach based on Hamiltonian [8, 9].

From Eq. (7), we have:

H A = 0 .
(8)

Introducing a new function, H ¯ ( u ( t ) ) , defined as:

H ¯ u ( t ) = 0 T / 4 1 2 d d t u ( t ) 2 + F u ( t ) d t = 1 4 T H
(9)

It is obvious that:

H ¯ T = 1 4 H
(10)

Equation (10) is, then, equivalent to the following one:

A H ¯ T = 0
(11)

or

A H ¯ ( 1 / ω ) = 0 .
(12)

From Eq. (12), we can obtain approximate frequency–amplitude relationship of a nonlinear oscillators.

The application of Hamiltonian approach method for nonlinear dynamical systems

The motion of a rigid rod rocking back on the circular surface without slipping

In this section, we consider the motion of a rigid rod rocking back on the circular surface without slipping. The governing equation of this motion is in the following form [36]:

d 2 d t 2 u ( t ) + 3 4 u ( t ) 2 d 2 d t 2 u ( t ) + 3 4 u ( t ) d d t u ( t ) 2 + 3 g l u ( t ) cos u ( t ) = 0
(13)

with the following initial conditions [36]:

u ( 0 ) = A , d d t u ( 0 ) = 0
(14)

where g and l are the positive constants. For this problem, we have:

f u ( t ) = 3 4 u ( t ) 2 d 2 d t 2 u ( t ) + 3 4 u ( t ) d d t u ( t ) 2 + 3 g l u ( t ) cos u ( t )
(15)

and:

F u ( t ) = 3 8 u ( t ) 2 d d t u ( t ) 2 + 3 g ( cos u ( t ) + u ( t ) sin u ( t ) ) l .
(16)

Its Hamiltonian can be easily obtained, which reads:

H = 1 2 d d t u ( t ) 2 + 3 8 u ( t ) 2 d d t u ( t ) 2 + 3 g ( cos u ( t ) + u ( t ) sin u ( t ) ) l .
(17)

Integrating Eq. (17) with respect to t from 0 to T/4, we have:

H ¯ u ( t ) = 0 T / 4 1 2 d d t u ( t ) 2 + 3 8 u ( t ) 2 d d t u ( t ) 2 + 3 g cos u ( t ) + u ( t ) sin u ( t ) l d t .
(18)

Assuming that the solution can be expressed as u(t) = A cos ωt and substituting it to Eq. (18), we obtain:

H ¯ ( u ( t ) ) = 0 T / 4 1 2 A 2 ω 2 sin 2 ω t + 3 8 A 4 ω 2 cos 2 ω t sin 2 ω t + 3 g cos ( A cos ω t ) + A cos ω t · sin ( A cos ω t ) l d t = 0 π / 2 1 2 A 2 ω sin 2 t + 1 ω 3 8 A 4 ω 2 cos 2 t sin 2 t + 3 g cos ( A cos t ) + A cos t · sin ( A cos t ) l = 1 2 A 2 ω · π 4 + 1 ω 3 8 A 4 ω 2 · π 16 + π 2 · 3 g Bessel J(0,A) + A · Bessel J(1,A) l .
(19)

In Eq. (19), we have two Bessel functions of the first kind. The Bessel functions are one of the special functions in mathematics. We can expand these Bessel functions of the first kind in the following form:

Bessel J(0, A ) = 1 - 1 4 A 2 + 1 64 A 4
(20)

and:

Bessel J(1, A ) = 1 2 A - 1 16 A 3 + 1 384 A 5
(21)

By substituting Eqs. (20) and (21) into Eq. (19), we obtain:

H ¯ u ( t ) = 1 2 A 2 ω · π 4 + 1 ω 3 8 A 4 ω 2 · π 16 + π 2 · 3 g l 1 - 1 4 A 2 + 1 64 A 4 + A · 1 2 A - 1 16 A 3 + 1 384 A 5
(22)

Setting:

A H ¯ ( 1 / ω ) = - A ω 2 · π 4 - 3 8 A 3 ω 2 · π 4 + 3 g l · π 2 - 1 2 A + 1 16 A 3 + A - 1 4 A 3 + 1 64 A 5 = 0
(23)

We obtain the following frequency–amplitude relationship:

ω HAM = 3 g / l 32 + 12 A 2 32 - 12 A 2 + A 4 32 + 12 A 2 .
(24)

Its period can be written in the following form:

T HAM = 2 π 3 g / l 32 + 12 A 2 32 - 12 A 2 + A 4 32 + 12 A 2 .
(25)

To illustrate the accuracy of the Hamiltonian approach method, we compare the approximate solution results with exact solution. For this dynamical system, the exact period is in the following form [36]:

T Exact = 4 l 3 g 1 / 2 0 π / 2 4 + 3 A 2 sin 2 φ A 2 cos 2 φ 8 A sin A + cos A - A sin φ sin A sin φ - cos A sin φ 1 / 2 d φ .
(26)

A comparison of obtained results from the approximate period and the exact one is tabulated in Table 1 for g = 1.00, l = 1.00 and different values of A. From Table 1, the maximum relative error of the approximate periods is 1.9344 % for g = 1.00, l = 1.00 and A = 0.45π.

Table 1 Comparison of approximate periods with exact periods for g = 1.00, l = 1.00 and different values of A

Also, we present the comparison results of analytical approximate solution of u(t) based on t with exact solution with g = 1.00, l = 1.00 and different values of A in Figs. 1 and 2.

Fig. 1
figure 1

Comparison of Hamiltonian approach method solution of u(t) based on t with exact solution for g = 1.00, l = 1.00, A = 0.05π

Fig. 2
figure 2

Comparison of Hamiltonian approach method solution of u(t) based on t with exact solution for g = 1.00, l = 1.00, A = 0.45π

Also, to investigate on the behavior of this dynamical system, the effect of parameters g and l on the frequency corresponding to different values of amplitude (A) has been studied in Figs. 3 and 4.

Fig. 3
figure 3

Comparison of frequency corresponding to different values of amplitude (A) and l = 1.00

Fig. 4
figure 4

Comparison of frequency corresponding to different values of amplitude (A) and g = 1.00

The free vibrations of an autonomous conservative oscillator with inertia and static-type fifth-order nonlinearities

In this section, we consider the free vibrations of an autonomous conservative oscillator with inertia and static-type fifth-order nonlinearities. The differential equation of this dynamical system is the following form [37]:

d 2 d t 2 u ( t ) + ε 1 u ( t ) 2 d 2 d t 2 u ( t ) + ε 2 u ( t ) 4 d 2 d t 2 u ( t ) + ε 1 u ( t ) d d t u ( t ) 2 + 2 ε 2 u ( t ) 3 d d t u ( t ) 2 + λ u ( t ) + ε 3 u ( t ) 3 + ε 4 u ( t ) 5 = 0 , - 1 λ 1
(27)

with the following initial conditions [37]:

u ( 0 ) = A , d d t u ( 0 ) = 0
(28)

where ε1, ε2, ε3 and ε4 are positive parameters and λ is an integer which may take values of −1, 0 and 1 [37]. For this problem, we have:

f u ( t ) = ε 1 u ( t ) 2 d 2 d t 2 u ( t ) + ε 2 u ( t ) 4 d 2 d t 2 u ( t ) + ε 1 u ( t ) d d t u ( t ) 2 + 2 ε 2 u ( t ) 3 d d t u ( t ) 2 + λ u ( t ) + ε 3 u ( t ) 3 + ε 4 u ( t ) 5
(29)

and:

F u ( t ) = 1 2 d d t u ( t ) 2 ε 1 u ( t ) 2 + 1 2 d d t u ( t ) 2 ε 2 u ( t ) 4 + 1 2 λ u ( t ) 2 + 1 4 ε 3 u ( t ) 4 + 1 6 ε 4 u ( t ) 6 .
(30)

Its Hamiltonian can be easily obtained, which reads:

H = 1 2 d d t u ( t ) 2 + 1 2 d d t u ( t ) 2 ε 1 u ( t ) 2 + 1 2 d d t u ( t ) 2 ε 2 u ( t ) 4 + 1 2 λ u ( t ) 2 + 1 4 ε 3 u ( t ) 4 + 1 6 ε 4 u ( t ) 6 .
(31)

Integrating Eq. (31) with respect to t from 0 to T/4, we have:

H ¯ u ( t ) = 0 T / 4 1 2 d d t u ( t ) 2 + 1 2 d d t u ( t ) 2 ε 1 u ( t ) 2 + 1 2 d d t u ( t ) 2 ε 2 u ( t ) 4 + 1 2 λ u ( t ) 2 + 1 4 ε 3 u ( t ) 4 + 1 6 ε 4 u ( t ) 6 d t
(32)

Assuming that the solution can be expressed as u(t) = A cos ωt and substituting it to Eq. (32), we obtain:

H ¯ u ( t ) = 0 T / 4 1 2 A 2 ω 2 sin 2 ω t + 1 2 ε 1 A 4 ω 2 sin 2 ω t cos 2 ω t + 1 2 ε 2 A 6 ω 2 sin 2 ω t cos 4 ω t + 1 2 λ A 2 cos 2 ω t + 1 4 ε 3 A 4 cos 4 ω t + 1 6 ε 4 A 6 cos 6 ω t d t = 0 π / 2 1 2 A 2 ω sin 2 t + 1 ω 1 2 ε 1 A 4 ω 2 sin 2 t cos 2 t + 1 2 ε 2 A 6 ω 2 sin 2 t cos 4 t + 1 2 λ A 2 cos 2 t + 1 4 ε 3 A 4 cos 4 t + 1 6 ε 4 A 6 cos 6 t d t = 1 2 A 2 ω · π 4 + 1 ω 1 2 ε 1 A 4 ω 2 · π 16 + 1 2 ε 2 A 6 ω 2 · π 32 + 1 2 λ A 2 · π 4 + 1 4 ε 3 A 4 · 3 π 16 + 1 6 ε 4 A 6 · 5 π 32 .
(33)

Setting:

A H ¯ ( 1 / ω ) = - A ω 2 · π 4 - 2 ε 1 A 3 ω 2 · π 16 - 3 ε 2 A 5 ω 2 · π 32 + λ A · π 4 + ε 3 A 3 · 3 π 16 + ε 4 A 5 · 5 π 32 = 0 .
(34)

We obtain the following frequency–amplitude relationship:

ω HAM = 6 ε 3 A 2 + 5 ε 4 A 4 + 8 λ 8 + 4 ε 1 A 2 + 3 ε 2 A 4
(35)

Its period can be written in the following form:

T HAM = 2 π 6 ε 3 A 2 + 5 ε 4 A 4 + 8 λ 8 + 4 ε 1 A 2 + 3 ε 2 A 4
(36)

For this dynamical system, because there is no exact solution, we compare the approximate solution results with Runge–Kutta method, as one of the known numerical methods. The numerical solution with Runge–Kutta method for this nonlinear differential equation is:

d d t u 1 ( t ) = u 2 ( t ) , u 1 ( 0 ) = A
(37)

and

d d t u 2 ( t ) = - 1 1 + ε 1 u 1 ( t ) 2 + ε 2 u 1 ( t ) 4 λ u 1 ( t ) + ε 1 u 1 ( t ) u 2 ( t ) 2 + 2 ε 2 u 1 ( t ) 3 u 2 ( t ) 2 + ε 3 u 1 ( t ) 3 + ε 4 u 1 ( t ) 5 .
(38)

Motion is assumed to start from the position of maximum displacement with zero initial velocity. λ is an integer which may take values of −1, 0 and 1, and ε1, ε2, ε3 and ε4 are positive parameters. The values of parameters ε1, ε2, ε3 and ε4 associated for a mode are shown in Table 2.

Table 2 Values of dimensionless parameters ε i for a mode

To illustrate the accuracy of the Hamiltonian approach method solution, we present the comparison results of analytical approximate solution of u(t) based on t with the numerical solution which solved by Runge–Kutta method as one of the known numerical methods in Figs. 5 and 6 for λ = 1.00, A = 1.00 and various modes (mode-1 and mode-3).

Fig. 5
figure 5

Comparison of Hamiltonian approach method solution of u(t) based on t with numerical solution (Runge–Kutta method) for λ = 1.00, A = 1.00in mode-1

Fig. 6
figure 6

Comparison of Hamiltonian approach method solution of u(t) based on t with numerical solution (Runge–Kutta method) for λ = 1.00, A = 1.00 in mode-3

Figures 7 and 8 present the high accuracy of Hamiltonian approach method solution in comparison with numerical solution for different values of ε1, ε2, ε3 and ε4, and show the phase–space curves (du/dt versus u(t) curve) for amplitude A = 1.00 and λ = 1.00.

Fig. 7
figure 7

Comparison of analytical approximate solution of du/dt based on u(t) with the with numerical solution (Runge–Kutta method) for λ = 1.00, A = 1.00 in mode-1

Fig. 8
figure 8

Comparison of analytical approximate solution of du/dt based on u(t) with the with numerical solution (Runge–Kutta method) for λ = 1.00, A = 1.00 in mode-3

It can be observed that the phase–space curves generated from approximate solution are close to that of the numerical curves. The phase plots show the behavior of the dynamical system in modes 1 and 3. It is periodic with a center at (0, 0).

Also, to investigate on the behavior of this dynamical system, the effect of parameters ε1, ε2, ε3 and ε4 on the frequency corresponding to different values of amplitude (A) has been studied in Fig. 9.

Fig. 9
figure 9

Comparison of frequency corresponding to different values of amplitude (A) and various modes, mode-1, mode-2 and mode-3

It is evident that Hamiltonian approach method shows excellent agreement with the exact and numerical solutions and is quickly convergent and valid for a wide range of vibration amplitudes and initial conditions. The accuracy of the results shows that the Hamiltonian approach method can be potentiality used for the analysis of strongly nonlinear oscillation problems accurately.

Conclusion

In this article, we applied Hamiltonian approach method as one of the analytical approximate techniques, for studying the strongly nonlinear dynamical systems such as the motion of a rigid rod rocking back on the circular surface without slipping and the free vibrations of an autonomous conservative oscillator with inertia and static-type fifth-order nonlinearities.

Comparison of the results which are obtained by this method with the obtained result by the exact and numerical solutions reveal that the Hamiltonian approach method is very effective and convenient and does not require linearization or small perturbation and can be easily extended to other nonlinear dynamical systems and can therefore be found widely applicable in engineering and other sciences.

Authors contributions

MH conceived the study and participated in its design and coordination. MS carried out the numerical solution of equations and participated in drafting the manuscript. HEK carried out the software work and the solution of equations using analytical approximate methods. All authors read and approved the final manuscript.