Scientific Research

An Academic Publisher

Sinusoidal Time-Dependent Power Series Solution to Modified Duffing Equation

**Author(s)**Leave a comment

*n*= 4 and 5. Symbolic manipulative utilities of a Computer Algebra System (CAS) specifically

*Mathematica*[5] extensively is used investigating the results.

KEYWORDS

1. Introduction

There are numerous scientific and engineering phenomena encountering oscillations. The simplest oscillations are described by a generic linear differential equation, $\stackrel{\xa8}{\xi}\left(t\right)+\xi \left(t\right)=0$ , 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, $\stackrel{\dot{}}{\xi}\left(t\right)$ , term and external forces, f(t), resulting, $\stackrel{\xa8}{\xi}\left(t\right)+\stackrel{\dot{}}{\xi}\left(t\right)+\xi \left(t\right)=f\left(t\right)$ , 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, $\stackrel{\xa8}{\theta}\left(t\right)+\mathrm{sin}\left[\theta \left(t\right)\right]=0$. Replacing the second term with its approximate form

yields, $\stackrel{\xa8}{\theta}\left(t\right)+\theta \left(t\right)-\frac{1}{6}{\theta}^{3}\left(t\right)\simeq 0$. Meaning Duffing equation is implicit to

oscillating motion. As in another instance a nonlinear force may result an equation of motion, $\stackrel{\xa8}{x}\left(t\right)+x\left(t\right)+\u03f5{x}^{3}\left(t\right)=0$. Solving these ODEs is a prime interest. Aside searching for their exact solutions [1] various approximation methods have been sought for [2] . Method introduced in [3] [4] 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 [3] [4] 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,

$\stackrel{\xa8}{x}\left(t\right)+x\left(t\right)+\u03f5{x}^{3}\left(t\right)=0$ , (1)

Its exact solution with two initial conditions, $x\left(0\right)={a}_{1}$ and $\stackrel{\dot{}}{x}\left(0\right)=0$ , is [1] ,

$x\left(t\right)={a}_{1}cn\left[u,k\right]$ , (2)

where,
$u={a}_{2}t$ , with a_{2} and k subject to,

${a}_{2}=\sqrt{1+{a}_{1}{}^{2}\u03f5}$ and $k=\sqrt{\frac{{a}_{1}^{2}\u03f5}{2\left(1+{a}_{1}^{2}\u03f5\right)}}$ , (3)

In Equation (2), $cn\left[\zeta ,m\right]$ , is the Jacobi elliptic function, $cn\left[\zeta ,m\right]=\mathrm{cos}\phi $ , with $\phi ={F}^{-1}\left[F\left[\phi ,m\right],m\right]$ , where, $F\left[\phi ,m\right]$ is subject to [6] [7] ,

$F\left[\phi ,m\right]=\underset{0}{\overset{\phi}{{\displaystyle \int}}}\frac{\text{d}\vartheta}{\sqrt{1-{m}^{2}{\mathrm{sin}}^{2}\vartheta}}$ , (4)

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, $T=\frac{4}{{a}_{2}}F\left[\frac{\text{\pi}}{2},k\right]$.

Having established the fundamentals now we cross-examine the accuracy of the Power Series approximation Method outlined in [3] [4] .

The fundamental underlying concept of the approximation method proposed in [3] 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, $\stackrel{\dot{}}{x}\left(t\right)$ , 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 [3] [4] a Power Series solves the Equation (1),

$x\left(t\right)=\underset{n=1}{\overset{N}{{\displaystyle \sum}}}\text{\hspace{0.05em}}a\left[n\right]{\left[\mathrm{sin}\left(\omega t\right)\right]}^{n-1}$ , (5)

A change of variable, $\tau =\mathrm{sin}\left(\omega t\right)$ , replaces t, $t\ge 0$ , with $-1\le \tau \le +1$ yielding Equation (1),

${\omega}^{2}\left(1-{\tau}^{2}\right)\frac{{\text{d}}^{2}}{\text{d}{\tau}^{2}}x\left(\tau \right)-{\omega}^{2}\tau \frac{\text{d}}{\text{d}\tau}x\left(\tau \right)+x\left(\tau \right)+\u03f5{x}^{3}\left(\tau \right)=0$ , (6)

Noticing significant changes; e.g. Equation (6) gained a dissipative term with a τ-dependent coefficient.

Realizing, $x\left(\tau \right)=\underset{n=1}{\overset{N}{{\displaystyle \sum}}}\text{\hspace{0.05em}}a\left[n\right]{\tau}^{n-1}$ and ${x}^{3}\left(\tau \right)=\underset{n=1}{\overset{N}{{\displaystyle \sum}}}\text{\hspace{0.05em}}b\left[n\right]{\tau}^{n-1}$ , Equation (6) yields the recurrence relationship between the coefficients,

$a\left[n+2\right]=\frac{a\left[n\right]\left[{\omega}^{2}{\left(n-1\right)}^{2}-1\right]-\u03f5b\left[n\right]}{{\omega}^{2}n\left(n+1\right)}$ , for $n=1,2,3,\cdots $ (7)

For the chosen initial conditions, $x\left[t=0\right]=A=a\left[1\right]$ and $\stackrel{\dot{}}{x}\left[t=0\right]=0=a\left[2\right]$ , 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, $E=T+V$ , stays constant. The T and V for a point-like particle of mass m under the action of a nonlinear force, $F=k\u03f5{x}^{3}$ , respectively are,

$T=\frac{1}{2}m{\stackrel{\dot{}}{x}}^{2}\left(t\right)$ and $V=\frac{1}{2}k{x}^{2}\left(t\right)+\frac{1}{4}k\u03f5{x}^{4}\left(t\right)$ , (8)

Equation (8) for the generic case, $m=k=1$ is associated with the Lagrangian, $L\left(x,\stackrel{\dot{}}{x}\right)=T-V$. Applying Euler-Lagrange equation, $\frac{\text{d}}{\text{d}t}\frac{\partial L}{\partial \stackrel{\dot{}}{x}}-\frac{\partial L}{\partial x}=0$ , 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. ${V}_{\mathrm{max}}\left(t=0\right)=\frac{1}{2}{A}^{2}+\frac{1}{4}\u03f5{A}^{4}$. The maximum kinetic energy occurs when the particle passes the equilibrium, ${T}_{\mathrm{max}}=\frac{1}{2}{\omega}^{2}\left(1-{\tau}^{2}\right){\left[\frac{\text{d}}{\text{d}\tau}x\left(\tau \right)\right]}^{2}$ , at $\tau =\pm \frac{1}{\sqrt{2}}$. Equating these two gives the ω.

${T}_{\mathrm{max}}={V}_{\mathrm{max}}$ , (9)

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. Results

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 [4] we set the values of $\left\{A,\u03f5\right\}=\left\{1.0,2.0\right\}$. 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 [7] , is,

$\begin{array}{l}30{\omega}^{2}a\left[7\right]=\frac{\left(-1+16{\omega}^{2}\right)\left(-\frac{3{A}^{2}\u03f5\left(-A-{A}^{3}\u03f5\right)}{2{\omega}^{2}}+\frac{\left(-A-{A}^{3}\u03f5\right)\left(-1+4{\omega}^{2}\right)}{2{\omega}^{2}}\right)}{12{\omega}^{2}}\\ \text{\hspace{0.05em}}-\u03f5\left(\frac{3A{\left(-A-{A}^{3}\u03f5\right)}^{2}}{4{\omega}^{4}}+\frac{{A}^{2}\left(-\frac{3{A}^{2}\u03f5\left(-A-{A}^{3}\u03f5\right)}{2{\omega}^{2}}+\frac{\left(-A-{A}^{3}\u03f5\right)\left(-1+4{\omega}^{2}\right)}{2{\omega}^{2}}\right)}{4{\omega}^{2}}\right)\end{array}$ (10)

Evaluation of the kinetic energy, Equation (8), calls for $T\sim {\left[\frac{\text{d}}{\text{d}\tau}x\left(\tau \right)\right]}^{2}$ , 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 [4] 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. [4] . 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 [4] .

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 [1] . The

Figure 1. Display of the maximum potential (Red) and kinetic (Blue) energies vs. ω for $\left\{A,\u03f5\right\}=\left\{1.0,2.0\right\}$ with N = 28.

Table 1. The first fourteen expansion coefficients of Equation (5) for $\left\{A,\u03f5\right\}=\left\{1.0,2.0\right\}$ with N = 28.

Figure 2. Display of the exact/numeric (Green) and the Power Series Method (Black) of Equation (1) for $\left\{A,\u03f5\right\}=\left\{1.0,2.0\right\}$ with N = 28.

solution may be expressed in terms of the built in Mathematica library JacobiCN function,

$x\left(t\right)=AJacobiCN\left[\sqrt{1+\u03f5{A}^{2}}t,{\left(\sqrt{\frac{\u03f5{A}^{2}}{2\left(1+\u03f5{A}^{2}\right)}}\right)}^{2}\right]$. 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 $\left(2\text{\pi}\right)/\left(2\times 0.799227\right)=3.92$. For the exact solution as pointed out in Sect. 2 the period is, $T=\frac{4}{3}K\left[\frac{1}{\sqrt{3}}\right]=4$ , where $K\left[m\right]=\underset{0}{\overset{\frac{\text{\pi}}{2}}{{\displaystyle \int}}}\frac{1}{\sqrt{1-{m}^{2}{\mathrm{sin}}^{2}\vartheta}}\text{d}\vartheta $ ; 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 ϵx^{3}(t) with ϵx^{4}(t). Being practical for the case on hand we consider
$\left\{x\left[0\right],\u03f5\right\}=\left\{0.5,0.5\right\}$. 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, ${V}_{\mathrm{max}}\left(t=0\right)=\frac{1}{2}{A}^{2}+\frac{1}{5}\u03f5{A}^{5}$. Plotting the kinetic

and potential energies vs. ω their intersection abscissa according to Equation (9) yields ω. This is shown in Figure 3.

Figure 3 assists evaluating the exact abscissa of the intersection; ω = 0.510225. Utilizing ω, we tabulate the expansion coefficients; these are given in Table 2.

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 $\left\{A,\u03f5\right\}=\left\{0.5,0.5\right\}$ for N = 20.

Table 2. The first ten expansion coefficients of Equation (5) for $\left\{A,\u03f5\right\}=\left\{0.5,0.5\right\}$ with N = 20.

Figure 4. Display of the numeric (Green) and Power Series Method (Black) of modified Duffing equation with ϵx^{4}(t),
$\left\{A,\u03f5\right\}=\left\{0.5,0.5\right\}$ 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 ϵx^{5}(t). We consider,
$\left\{A,\u03f5\right\}=\left\{0.5,0.5\right\}$. 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

${V}_{\mathrm{max}}\left(t=0\right)=\frac{1}{2}{A}^{2}+\frac{1}{6}\u03f5{A}^{6}$. We skip displaying the kinetic and potential energies

vs. ω as is similar to Figure 1 and Figure 3. Suffices noting the intersection of these two curves yields, ω = 0.506614.

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 [4] .

Figure 5. Display of the numeric (Green) and Power Series Method (Black) of modified Duffing equation with ϵx^{5}(t),
$\left\{A,\u03f5\right\}=\left\{0.5,0.5\right\}$ with N = 20.

Moreover, we extend the calculation to symbolic domain; this is not included in [4] . 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

${\left\{\underset{n=1}{\overset{N}{{\displaystyle \sum}}}\text{\hspace{0.05em}}a\left[n\right]{\tau}^{n-1}\right\}}^{m}=\underset{n=1}{\overset{N}{{\displaystyle \sum}}}\text{\hspace{0.05em}}b\left[n\right]{\tau}^{n-1}$ , for $m=2,3,4,\cdots $ ; 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 [4] 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, $\stackrel{\dot{}}{x}\left[t=0\right]\ne 0$ ?” 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 [5] [8] . Readers may also find [9] resourceful addressing related issues.

Acknowledgements

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 “6^{th} 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.

Conflicts of Interest

The authors declare no conflicts of interest.

Cite this paper

*American Journal of Computational Mathematics*,

**8**, 259-268. doi: 10.4236/ajcm.2018.83021.

[1] | Salas, A. and Castillo, J. (2014) Exact Solution to Duffing Equation and the Pendulum Equation. Exact Mathematical Sciences, 8, 8781-8789. |

[2] |
Rand, R. (2005) Lecture Notes on Nonlinear Vibrations. http://www.tam.cornell.edu/randdocs/ |

[3] |
Qaisi, I. (1996) A Power Series Approach for the Study of Periodic Motion. Journal of Sound and Vibration, 196, 401-406. https://doi.org/10.1006/jsvi.1996.0491 |

[4] | Qaisi, I. (2018) Presented Note at “6th International Physics Conference”. 6th International Physics Conference, Athens, July 2018. |

[5] | Wolfram, S. (1996) Mathematica Book. 3rd Edition, Cambridge University Press, Cambridge. |

[6] |
Mathworld. http://mathworld.wolfram.com/JacobiEllipticFunctions.html |

[7] | Abramowitz, M. and Stegun, I. (1970) Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. Dover Publications, Inc., New York. |

[8] | Sarafian, H. (2015) Mathematica Graphics Example Book for Beginners. Scientific Research Publishing, Wuhan. |

[9] |
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. https://doi.org/10.4236/wjm.2013.36027 |

Copyright © 2020 by authors and Scientific Research Publishing Inc.

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.