The Galerkin Method for Solving Strongly Nonlinear Oscillators

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.


Introduction
e nonlinear equation describing an oscillator with a cubic nonlinearity is called the Duffing equation. is 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][5][6], chaos [7], and many areas of physics.
ere 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. is method is due to Galerkin, a Russian engineer and scientist. We also derive formulas for solving a wide class of nonlinear oscillators. e Galerkin solutions are compared with the solutions obtained using the Runge-Kutta numerical method.

Finite Element Method or Galerkin Hat Method
Let us consider a polynomial second-order damped and forced ode: where x ≡ x(t) and P ≡ P(x) is a polynomial whose coefficients depend on t, say Given the i.v.p.
us, the problem reduces to (1). Some particular cases to i.v.p. (1) are We will use the same idea as for the linear case that is, we will assume an approximate analytical solution in the ansatz form x � x(t) � n k�1 c k φ k (t), (8) where the functions φ k (t) are the so-called linear Galerkin hats. Let 0 ≤ t ≤ T. Choose some positive integer n ≥ 2 and define the step h � T/n and let ξ j � jh � jT/n for j � 0, 1, 2, . . . e functions φ k (t) are defined as follows.
For an illustration, see Figure 1. Some properties of these functions can be illustrated as follows.

(12)
Using the formula and assuming that a j (t) ≡ a j � const, we may evaluate easily the following integral: us, for example, if a 0 , a 1 , . . .are independent of t, where In general, if a r does not depend on t, where A s � T n(s + 1)(s + 2)  Let us consider the forced and damped oscillator (1). Following are useful expressions for different forces: ,

e Scientific World Journal
Other useful formulas when the a j depend on time are Other formulas for calculating are given in the Appendix.

Linear Oscillator.
is is the ode e exact solution is given by Assume the ansatz is is a linear recurrence that may be solved in closed form: In Figure 2, we compare the exact solution with the approximate solution (pairs (2π/nj, c j ), j � 1, 2, 3, . . . , n) for n � 30.

Undamped and Unforced Helmholtz Oscillator.
is is the ode € y + α + βy + cy 2 � 0, e exact solution to (22) may be expressed in any of the following equivalent forms: 6 e Scientific World Journal en, Assume the ansatz Observe that the equation R j � 0 is a quadratic equation in z � c j+1 . It is clear that the system R 0 � R 1 � . . . � R n− 1 � 0 may be solved recursively. We first find c 2 letting j � 1 in (29): We choose the value of c 2 that is closest to c 1 � T/n _ x 0 . Next, we set j � 2 in (37) and then we will find z � c 3 . We choose the closest to c 2 solution to the quadratic equation in (29). We continue this procedure and then we will find all values of c j (j � 1, 2, 3, . . . n). Since x(ξ j ) � x(T/nj) � c j , all pairs (ξ j , c j ) will lie on the graph of the solution for sufficiently large n. Plotting these points, we obtain the graph of the solution.
On the other hand, if n is large enough, the values of c j and c j+1 will be close to each other. We may use the following approximate expression for c j+1 in terms of c j− 1 and c j : (40) 8 e Scientific World Journal e solution is periodic and its period equals T � 4.737423705838371 (see Figure 3).

Duffing-Helmholtz Oscillator. Let
e exact solution to i.v.p. (34) is given by where is solution is valid even if α � c � 0. e solution is periodic and its period equals where a is the greatest real root to the cubic en, the period may be evaluated using the formulas e Scientific World Journal 9 Another expression for the exact solution is given by where Let q 0 � 0. Assume the ansatz for j � 1, 2, 3, . . . .n.
Observe that algebraic system (39) may be solved recursively using the Tartaglia formula for the cubic. Indeed, we may write 1 20 3, and T � 20 (see Figure 4 for a comparison between the exact solution and the Galerkin method for different values of n ).

Duffing Equation with Damping and Forcing. Let
Assume the ansatz e Scientific World Journal 11 We may solve this system recursively using the Tartaglia formula for the cubic. e initial data are

Forced Van der Pol-Duffing Equation.
Let Assume the ansatz Define c 0 � c n+1 � 0. We have

e Scientific World Journal
We may solve this system recursively using the Tartaglia formula for the cubic. e initial data are 3.6. Conservative Nonlinear Oscillators. Conservative singledegree-of-freedom nonlinear oscillators are modelled by secondorder autonomous ordinary differential equations of the form Using Chebyshev polynomials or minimization techniques, we may approximate the function F(x) by means of a cubic polynomial, say F(x) � α + βx + cx 2 + δx 3 , 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 F(x) has the form en, the problem reduces to that of solving a Duffing equation.

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 F(x) 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.

Conclusions
e Galerkin method offers a way to obtain semianalytical solution to a given nonlinear oscillator of special form (1). e exact solution to it is not known in general. ere 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. e advantage of the proposed method consists of the possibility to solve the Galerkin equations iteratively using an algebraic equation. e 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][9][10].