There are numerous scientific and engineering phenomena encountering oscillations. The simplest oscillations are described by a generic linear differential equation, , where ξ(t) is the time-dependent quantity of interest. For instance, ξ(t) could describe the oscillation of the electric charge, q(t), in an LC series electric circuit, or it may describe oscillating coordinate, x(t), of a particle under the influence of a linear force. This equation modifies if one includes retarding, , term and external forces, f(t), resulting, , preserving its linearity. Motivation of considering Duffing type equation stems from the fact that the nonlinearity implicitly is embedded in the former equation. For instance, for a mechanical system one might encounter an equation such as, . Replacing the second term with its approximate form
yields, . Meaning Duffing equation is implicit to
oscillating motion. As in another instance a nonlinear force may result an equation of motion, . Solving these ODEs is a prime interest. Aside searching for their exact solutions  various approximation methods have been sought for  . Method introduced in   is the most updated approximation solution of the Duffing equation.
It is one of the objectives of our investigation to examine the validity of the method   solving modified Duffing equation. Modified Duffing equations are the ones that replace the cubic term with either quartic or quintic term.
With these motivations we craft this note; it is composed of four sections. Aside the Introduction, in Section 2 first we brief on the exact and Power Series solution of Duffing equation. Section 3 is the results. Section 4 is the conclusions embodying suggestions for extensions and modifications.
2. A Brief Review of Exact and Power Series Solution of Duffing Equation
To establish the basis, we begin with the standard Duffing equation,
Its exact solution with two initial conditions, and , is  ,
where, , with a2 and k subject to,
and , (3)
In Equation (2), , is the Jacobi elliptic function, , with , where, is subject to   ,
As one expects Duffing equation describes oscillations. The severity of deviation of the oscillations given by Duffing equation from the corresponding linear case (ϵ = 0) depends on the value of ϵ. The value of ϵ implicitly impacts the period
of the oscillations given by, .
Having established the fundamentals now we cross-examine the accuracy of the Power Series approximation Method outlined in   .
The fundamental underlying concept of the approximation method proposed in  stems from the fact that the Duffing equation describes oscillations. As such, it is intuitive to proposing an approximation solution composed of oscillating functions―e.g. a polynomial composed of sinusoidal functions. The proposed approach resembles the Fourier method―with two structural differences. 1) The solution is a polynomial in contrast to the Fourier method that is composed of sinusoidal orthogonal linear-basis, and 2) the frequencies of the sinusoidal functions of the polynomial are the same. The absence of dissipative term, , in Duffing equation warrants the conservativeness of energy of the system leading to a unique value for the frequency of the polynomial. As is true in general, the accuracy of the series method is being controlled by the order of the polynomial―for the case on hand the order depends implicitly to the coefficient of the nonlinear term, ϵ.
As is outlined in   a Power Series solves the Equation (1),
A change of variable, , replaces t, , with yielding Equation (1),
Noticing significant changes; e.g. Equation (6) gained a dissipative term with a τ-dependent coefficient.
Realizing, and , Equation (6) yields the recurrence relationship between the coefficients,
, for (7)
For the chosen initial conditions, and , Equation (7) gives the remaining coefficients yielding the solution of Equation (5). Because of the second initial condition all the even expansion coefficients are zero limiting the polynomial to even powers of the base only. More on this in Conclusion section.
The lack of dissipative term in Duffing equation signifies the conservation of energy. The energy of the system, , stays constant. The T and V for a point-like particle of mass m under the action of a nonlinear force, , respectively are,
and , (8)
Equation (8) for the generic case, is associated with the Lagrangian, . Applying Euler-Lagrange equation, , yields the equation of motion, Equation (1).
Utilizing the time independence of energy and implied initial conditions yields an equation conducive the needed, ω, in Equation (5).
The maximum potential energy occurs at t=0 when the particle is at maximum distance from the equilibrium, i.e. . The maximum kinetic energy occurs when the particle passes the equilibrium, , at . Equating these two gives the ω.
With these outlines we craft a Mathematica program leading the quantity of interest. For objectively chosen numeric values for initial displacement, A, stiffness, ϵ, we investigate the accuracy of the Power Series Method vs. the exact solution; these are given in Sect. 3.
3.1. Solutions of Duffing Equation: Power Series, Exact, and Numeric
For the chosen value of A and ϵ the number of terms, N, in Equation (5) ought to be determined warrants the convergence of series. To compare our CAS approach to  we set the values of . By trial and error and the CPU run-time limitations, we set N = 28. As we pointed out because other than the first term only the even powers of sin(ωt) are contributing, evaluation of x(t), Equation (5), requires determination of fourteen expansion coefficients. Recursive relationship between the coefficients, Equation (7), makes the symbolic expressions massive. For instance, a  , is,
Evaluation of the kinetic energy, Equation (8), calls for , i.e.,
169 symbolic expressions are to be called upon. Each term is a complicated ω-dependent, one of these terms is the squared of Equation (10)! Justifiably we suppressed writing it down. Display of the kinetic and potential energies vs. ω and their intersection is shown in Figure 1. Figure 1 helps guesstimating the abscissa of the intersection.
Applying the FindRoot utility of Mathematica at about the guesstimated abscissa gives the exact root value of Equation (9), ω = 0.7992207. Reference  uses eighty terms, e.g. N = 80 evaluating ω. In our case, N = 28, yields an acceptable value.
To further our investigation, we compare the expansion coefficients of our approach vs.  . Utilizing the recurrence relationship between the coefficients given by Equation (7) along with the initial conditions outlined in the text we tabulate the first fourteen expansion coefficients of the series in Equation (5). Table 1 is our values that ought to be compared to the “corrected notations” of Table 2  .
Having the values of expansion coefficients and ω we plot the t-dependent position x(t) given by Equation (5). This is shown in Figure 2 in Black.
Duffing equation, Equation (1) as discussed has an exact solution  . The
Figure 1. Display of the maximum potential (Red) and kinetic (Blue) energies vs. ω for with N = 28.
Table 1. The first fourteen expansion coefficients of Equation (5) for with N = 28.
Figure 2. Display of the exact/numeric (Green) and the Power Series Method (Black) of Equation (1) for with N = 28.
solution may be expressed in terms of the built in Mathematica library JacobiCN function,
. Figure 2 displays this function
in Green. Although our numeric computation applying Power Series includes “only” 14-terms its accuracy is as close as the exact solution. We further our investigation applying Mathematica NDSolve solving Equation (1) numerically. NDSolve uses one of the common numeric methods of Implicit Runge Kutta or StiffnessSwitching which is a combination of the explicit and implicit methods solving the equation. The numeric solution perfectly matches the exact solution. The Green curve is the exact solution, it indistinguishably overlaps with the numeric solution. The black curve is the Power Series solution.
Despite the fact that the number of terms in Equation (5) is limited to fourteen the agreement between the exact/numeric and approximate results are quite acceptable. As shown in Figure 2, within the long range of the t-axis the positive amplitude of the approximated method overlaps the exact amplitude and overestimates the negative ones. This can be rectified if a greater number of terms could be included in Equation (5). On the other hand, the period of all three methods is in very good agreements.
As shown in Figure 2, the oscillation has a period of about four. Applying the value of ω the period is . For the exact solution as pointed out in Sect. 2 the period is, , where ; these two are in good agreement.
3.2. Nonlinear Quartic Term
In this subsection we investigate the validity of the Power Series Method for a modified Duffing equation by replacing the ϵx3(t) with ϵx4(t). Being practical for the case on hand we consider . By trial and error, we set the number of the terms, N, in Equation (5) to 20. Based on what we have discussed the non-zero terms limits the contributing terms to eleven. For the quartic term
the maximum potential energy is, . Plotting the kinetic
and potential energies vs. ω their intersection abscissa according to Equation (9) yields ω. This is shown in Figure 3.
Numeric values of Table 2 are based on utilizing the recurrence relationship between the coefficients given by Equation (7).
Plot of Equation (5) is shown in Figure 4 (Black). Applying NDSolve of Mathematica, as in the previous section we display the numeric solution in Green. For chosen parameters the results are in good agreement; noting analytic solution for the case on hand is not available.
Figure 3. Display of the maximum potential (Red) and kinetic (Blue) energies vs. ω for for N = 20.
Table 2. The first ten expansion coefficients of Equation (5) for with N = 20.
Figure 4. Display of the numeric (Green) and Power Series Method (Black) of modified Duffing equation with ϵx4(t), for N = 20.
Figure 4 compares the numeric solution vs. the Power Series Method. Figure caption indicates the parameters. As shown plots are acceptably comparable. The accuracy of the Power Series Method could have been increased had we could include a greater number of terms. More on this in Conclusion section.
3.3. Nonlinear Quintic Term
In this subsection similar to Sect. 3.2 we investigate the validity of the Power Series Method for solving a modified Duffing equation with ϵx5(t). We consider, . With trial and error, we set the number of the terms, N, in Equation (5) to 20. The maximum potential energy for the case on hand is
. We skip displaying the kinetic and potential energies
The numeric solution is the output of NDSolve. The equation on hand likewise to the previous case, Sect. 3.2, has no exact solution.
Figure 5 compares the numeric solution vs. the Power Series Method. Figure caption indicates the parameters. As shown oscillations are acceptably comparable. The accuracy of the Power Series Method would increase if a greater number of terms could be included. More on this in Conclusion section.
4. Conclusions and Suggestions
We applied a Computer Algebra System (CAS), Mathematica examining its applicability to solving Duffing equation utilizing the Power Series Method. We have shown with Mathematica we are able producing the numeric results of  .
Figure 5. Display of the numeric (Green) and Power Series Method (Black) of modified Duffing equation with ϵx5(t), with N = 20.
Moreover, we extend the calculation to symbolic domain; this is not included in  . Applying Mathematica we then successfully explore its applicability to solving modified Duffing equations embodying nonlinear quartic and quintic terms.
For Duffing equation computation power of a laptop with a double processor prevents increasing the number of the terms evaluating Equation (5) to achieve accuracies beyond what is reported. Equation (7) is a recursive relationship between the expansion coefficients embodying b[n]. In general we write
, for ; for Duffing case, m = 3. We
notice replacing N = 28 with 30 drastically increases the number of b[n] greatly elongating the computation run-time crashing the computer. Number of terms in  is eighty, this is not achievable for our symbolic calculation approach.
Extension of the current investigation. A curious reader may inquire: “What are the implications to numeric and symbolic solutions of the Duffing, modified Duffing equations embodying quartic and quintic terms if the second initial condition is replaced with, ?” Quantification of the answer would require accessibility to a much more powerful computer as it would encounter lengthy symbolic calculation.
A note to the readers: Figures and calculations in this article are carried out utilizing Mathematica resources   . Readers may also find  resourceful addressing related issues.
Motivation of this investigation stems from the questions that the author put to the presenter of “Power Series solution for strongly non-linear conservative oscillators” at “6th International Physics Conference”, Athens/Greece, July 2018. One of the questions was “...has the Power Series Method been tested for nonlinear terms higher than three?” the answer was negative. The author initiated the investigation crafting this note. The author thanks Professor Mazen I. Qaisi for private communications and appreciates the support staff of Wolfram Research Inc. for consulting the issues concerning the numeric algorithm used in NDSolve.
 Sarafian, H. (2013) Linear, Cubic and Quintic Coordinate-Dependent Forces and Kinematic Characteristics of a Spring-Mass System. World Journal of Mechanics, 3, 265-269.