#### Abstract

He's variational approach is modified for nonlinear oscillator with discontinuity for which the elastic force term is proportional to sgn(u). Three levels of approximation have been used. We obtained 1.6% relative error for the first approximate period, 0.3% relative error for the second-order approximate period. The third approximate solution has the accuracy as high as 0.1%.

#### 1. Introduction

Considerableattention has been directed toward the solution of nonlinear equations since they play crucial role in applied mathematics, physics, and engineering problems. In general, the analytical approximationto solution of a given nonlinear problem ismoredifficult than the numerical solution approximation. During the past decades, several types of methods are proposed to obtain approximate solution of nonlinear equations of various types. Among them are variational iteration methods [1–7], homotopy perturbation method [8–15], modified Lindstedt-Poincare method [16], parameter expansion method [17, 18], and variational methods [19–21]. The variational method is different from any other variational methods in open literature, and it is only valid for nonlinear oscillators [22]. Paper [23] is an example of use of variational approach method in nonlinear oscillator problem.

When we examine the frequency amplitude relations of some nonlinear oscillators, it is seen that paper [24] focuses on only the first-order solutions.

Variational methods combine the following two advantages: (1) they provide physical insight into the nature of the solution of the problem; (2) the obtained solutions are the best among all the possible trial functions [20].

In the present study, we have investigated the application of variational approach to nonlinear oscillator with discontinuity.

#### 2. A Variational Method

Let us consider a general nonlinear oscillator in the form

He proposed a variational principle for (2.1) as follows [20]:

where is period of the nonlinear oscillator, . Actually, the upper limit is originally instead of . Normally, it works in most of the cases. Let us suppose that such

therefore

But this form is not suitable for discontinuity equation. Therefore, we propose the equation in the form of

Assume that its solution can be expressed as

where is the frequency of the oscillator.

Inserting (2.6) into (2.5) yields

Let us define . Then (2.7) becomes

Using the Ritz method, we require

By a careful inspectation, we find that

Thus, the conditions in (2.9) reduce to

#### 3. Application

Consider the following nonlinear oscillator with discontinuity:

with initial conditions

Its variational formulation can be written as follows:

For the first approximation assume that is in the following form:

Substitute this first approximation into (3.3):

The stationary condition with respect to *A* reads

which leads to the result

and the approximate period can be obtained as follows:

This solution agrees with Liu’s solution obtained by He’s modified Lindsted-Poincaré method [16], Rafei et al.’s solution obtained by He’s variational iteration method [2], Wu et al.’s solution obtained by the low-order harmonic balance method [25], and A. Belendéz et al.’s solution obtained by He’s homotopy perturbation method [9].

Secondly, to obtain a more accurate result, define as follows:

Notice that (3.9) satisfies the initial conditions (3.2).

Substituting (3.9) into (3.3), we obtain

The in (3.10) can be obtained as follows:

The stationary condition with respect to *A* and *B* reads

from which the relationship between oscillator frequency and amplitude can be determined.

From (3.12) we have

and the approximate period can be obtained as follows:

In this study, we obtained the relative error as 1.6% for the first-order approximation while the other researchers [2, 16] obtained the relative error as 1.8%. The reason for the difference in the relative error is that the other researchers take less precision in the decimal numbers during calculations. In [9], the frequency and the period were found for the same problem by second-order approximation and the relative error was calculated as %0.30.

Equation (3.1) was approximately solved in [25] using an improved harmonic balance method that incorporates salient features of both Newtons’s method and the harmonic balance method. In [25], the following results for the first and second-order approximations were obtained:

To obtain a more accurate result, define as follows:

Notice that (3.17) satisfies the initial conditions (3.2).

Substituting (3.17) into (3.3) gives

The stationary condition with respect to *A*, *B,* and *C* reads

Hence the approximate frequency is

Therefore, approximate period of the nonlinear oscillator can be obtained as follows:

For this nonlinear problem in (3.1), the exact period is given as follows [25]:

The period values and these relative errors obtained in this method for nonlinear oscillator with discontinuity are the following:

Equation (3.1) was approximately solved in [25] using an improved harmonic balance method that incorporates salient features of both Newtons’s method and the harmonic balance method. In [25], the following result for the third-order approximations was obtained:

Equation (3.1) was approximately solved in [9] using a homotopy perturbation method. In [9], the following result for the third-order approximations was obtained:

By using above values, the periodic function can be written for three levels of approximation as follows:

The normalized exact periodic solution has been obtained by numerically integrating (3.1) and (3.2) and compared with approximate solutions (3.26) in Figure 1. Here nondimensional time *h* is defined as follows:

**(a)**

**(b)**

**(c)**

#### 4. Conclusions

He’s variational approach is modified for nonlinear oscillator with discontinuities. The method has been applied to obtain three levels of approximation of a nonlinear oscillator with discontinuities for which the elastic force term is proportional to sgn(u). We reached 1.6%, 0.31%, and 0.1% relative errors for the first, second, and third approximate periods, respectively. One can obtain higher-order accuracy by extending the idea given in this paper.