Abstract
In this paper, we make use of the Galerkin method for solving nonlinear second-order ODEs that are related to some strongly nonlinear oscillators arising in physics and engineering. We derive the iterative schemes for finding the coefficients that appear in the linear Galerkin hat combination in the ansatz form solution. These coefficients may be found iteratively by solving either a quadratic or a higher degree algebraic equation. Examples are presented to illustrate the obtained results. Some exact solutions are given, and they are compared with both the Runge–Kutta numerical solution and the solution obtained using the Galerkin finite element method.
1. Introduction
The nonlinear equation describing an oscillator with a cubic nonlinearity is called the Duffing equation. This equation has a variety of applications in science and engineering, early mechanical failure signal, nonlinear circuit design [1], image processing [2], vibration of buckled beams [3], solitons [4–6], chaos [7], and many areas of physics.
There are many methods for solving nonlinear differential equations. In this paper, we concentrate on the numerical solution to the Duffing equation by means of the finite element method. This method is due to Galerkin, a Russian engineer and scientist. We also derive formulas for solving a wide class of nonlinear oscillators. The Galerkin solutions are compared with the solutions obtained using the Runge–Kutta numerical method.
2. Finite Element Method or Galerkin Hat Method
Let us consider a polynomial second-order damped and forced ode:where and is a polynomial whose coefficients depend on , say
Given the i.v.p.we define
Then,
Thus, the problem reduces to (1). Some particular cases to i.v.p. (1) are
We will use the same idea as for the linear casethat is, we will assume an approximate analytical solution in the ansatz formwhere the functions are the so-called linear Galerkin hats. Let . Choose some positive integer and define the step and let for The functions are defined as follows.
For an illustration, see Figure 1.
Some properties of these functions can be illustrated as follows.for and , andfor and .
In general,
Using the formulaand assuming that const, we may evaluate easily the following integral:
Moreover,
Thus, for example, if , , …are independent of ,where
In general, if does not depend on ,where
Let us consider the forced and damped oscillator (1). Following are useful expressions for different forces:
Other useful formulas when the depend on time are
Other formulas for calculating are given in the Appendix.
3. Applications
3.1. Linear Oscillator
This is the ode
The exact solution is given by
Assume the ansatz
Define and
Then,
This is a linear recurrence that may be solved in closed form:
Example 1. Let , , , and . The exact solution to (14) is . From (19), we obtainIn Figure 2, we compare the exact solution with the approximate solution (pairs ) for .
3.2. Undamped and Unforced Helmholtz Oscillator
This is the ode
The exact solution to (22) may be expressed in any of the following equivalent forms:where
The period equals
In order to obtain approximate solution by means of the Galerkin method, let
Then,
Assume the ansatz
Define and
Then,
Observe that the equation is a quadratic equation in . It is clear that the system may be solved recursively. We first find letting in (29):
We choose the value of that is closest to . Next, we set in (37) and then we will find . We choose the closest to solution to the quadratic equation in (29). We continue this procedure and then we will find all values of . Since , all pairs will lie on the graph of the solution for sufficiently large . Plotting these points, we obtain the graph of the solution.
On the other hand, if is large enough, the values of and will be close to each other. We may use the following approximate expression for in terms of and :
Example 2. LetThe exact solution is obtained from (25) and (26):The solution is periodic and its period equals (see Figure 3).
3.3. Duffing–Helmholtz Oscillator
Let
The exact solution to i.v.p. (34) is given bywhere
This solution is valid even if . The solution is periodic and its period equalswhere is the greatest real root to the cubic . Assume that . Then, the period may be evaluated using the formulas
Another expression for the exact solution is given bywhere
Let . Assume the ansatz
Define . We have
This gives an algebraic system of nonlinear equations. The initial data are
Observe that algebraic system (39) may be solved recursively using the Tartaglia formula for the cubic. Indeed, we may write
Example 3. Let , , , , , , and (see Figure 4 for a comparison between the exact solution and the Galerkin method for different values of ).
3.4. Duffing Equation with Damping and Forcing
Let
Assume the ansatz
Define . We have
We may solve this system recursively using the Tartaglia formula for the cubic. The initial data are
3.5. Forced Van der Pol–Duffing Equation
Let
Assume the ansatz
Define . We have
We may solve this system recursively using the Tartaglia formula for the cubic. The initial data are
3.6. Conservative Nonlinear Oscillators
Conservative single-degree-of-freedom nonlinear oscillators are modelled by second-order autonomous ordinary differential equations of the form
Using Chebyshev polynomials or minimization techniques, we may approximate the function by means of a cubic polynomial, say , and this allows us to study i.v.p. (44) using the solution to the i.v.p.
For example, let us consider a mass attached to two stretched elastic springs [8]. For this problem, the function has the form
Suppose that . We have , where
Then, the problem reduces to that of solving a Duffing equation.
4. Analysis and Discussion
We have described the way to solve strongly nonlinear oscillators by means of the Galerkin method. In general, any second-order ordinary differential equation may be solved using the Runge–Kutta numerical method. In general, the Runge-Kutta numerical solution offers a more accurate than the Galerkin solution. On the other hand, the Galerkin method offers the possibility to write the solution as a linear combination of hat functions. In this sense, the Galerkin method is a kind of analytical method. For a given conservative oscillator (45), we may approximate the function by a cubic polynomial and then we replace the original problem with problem (45), which has exact analytical solution. However, the exact solution demands the evaluation of either a Jacobian or elliptic Weierstrass function, which has extra costs.
5. Conclusions
The Galerkin method offers a way to obtain semianalytical solution to a given nonlinear oscillator of special form (1). The exact solution to it is not known in general. There are other ways to solve it. Perturbative methods like the Lindstedt–Poincaré method or the Krylov–Bogoliubov–Mitropolsky method are also possible for this end. The advantage of the proposed method consists of the possibility to solve the Galerkin equations iteratively using an algebraic equation. The Galerkin hat method is usually used to solve second-order linear ODEs. In this work, we extended it to a class of nonlinear oscillators. Other methods for solving nonlinear differential equations may be found in [8–10].
Appendix
Formulas for Computing
Data Availability
No data were used to support this study.
Conflicts of Interest
The author declares that there are no conflicts of interest.