Example 1 - Using one-term approximation, find the solution of the pendulum equation using Ritz-Galerkin method, and one-term approximation. The pendulum equation can be written as:
\begin{eqnarray}
\ddot{x} + \omega_0^2x-\frac{\omega_0^2}{6}x^3 &=& 0\nonumber
\end{eqnarray}
Solution: The one term approximation of function \(x(t)\) can be written as:
\begin{eqnarray}
x(t) &=& A_0 \sin \omega t.\nonumber
\end{eqnarray}
Before substituting one term approximation function \(x(t)\) into pendulum differential equation it is necessary to determine second derivative of one term approximation with respect to variable \(t\).
\begin{eqnarray}
\dot{x}(t) &=& A_0\omega \cos \omega t\nonumber\\
\ddot{x}(t) &=& -A_0\omega^2\cos \omega t\nonumber
\end{eqnarray}
By substitution of one term approximation into pendulum equation the following expression is obtained.
\begin{eqnarray}
-A_0\omega^2 \sin \omega t + \omega_0^2 A_0 \sin \omega t - \frac{\omega_0^2}{6}A_0^3\sin^3\omega t &=& 0\nonumber\\
-A_0\omega^2 \sin \omega t + \omega_0^2 \left(A_0\sin\omega t - \frac{A_0^3}{6}\sin^3\omega t\right) &=& 0 \nonumber\\
-A_0\omega^2 \sin \omega t + \omega^2 A_0 \sin\omega t - \frac{A_0^3}{6}\frac{3}{4}\sin\omega t + \frac{A_0^3}{24}\sin 3\omega t &=& 0\nonumber\\
-A_0\omega^2 \sin \omega t + \omega_0^2 A_0 \sin\omega t - \frac{A_0^3}{8}\sin\omega t + \frac{A_0^3}{24}\sin 3\omega t &=& 0\nonumber\\
\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right) A_0 \sin \omega t + \frac{\omega_0^2}{24} A_0^3 \sin 3\omega t &=& 0\nonumber
\end{eqnarray}
To find the \(A_0\) using Ritz-Galerkin method the expression
\begin{equation}
\int_0^{\tau} \left(\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right) A_0 \sin \omega t + \frac{\omega_0^2}{24} A_0^3 \sin 3\omega t\right)^2 \mathrm{dt}
\end{equation}
must be minimized. The minimization of the previous expression requires:
\begin{eqnarray}
\int_0^{\tau}&& \left(\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right) A_0 \sin \omega t + \frac{\omega_0^2}{24} A_0^3 \sin 3\omega t\right)\nonumber\\
&&\frac{\partial}{\partial A_0}\left(\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right) A_0 \sin \omega t + \frac{\omega_0^2}{24} A_0^3 \sin 3\omega t\right)\mathrm{dt} = 0\nonumber\\
\int_0^{\tau}&& \left(\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right) A_0 \sin \omega t + \frac{\omega_0^2}{24} A_0^3 \sin 3\omega t\right)\nonumber\\
&&\left(\left(\omega_0^2 - \omega^ˇ - \frac{3}{8}\omega A_0^2\right)\sin \omega t + \frac{1}{8}\omega_0^2 A_0^2\sin 3\omega t\right) \mathrm{dt} = 0\nonumber\\
&A_0&\left(\omega^2 - \omega^2 - \frac{1}{8}\omega_0^2 A_0^2\right)\left(\omega^2 - \omega^2 - \frac{3}{8}\omega_0^2 A_0^2\right) \int_0^\tau \sin^2 \omega t \mathrm{dt}\nonumber\\
&+& \frac{\omega_0^2 A_0^3}{24}\left(\omega_0^2 - \omega^2 - \frac{3}{8}\omega_0^2A_0^2\right)\int_0^\tau \sin\omega t \sin 3\omega t\mathrm{dt}\nonumber\\
&+& \frac{1}{8}\omega_0^2A_0^2\left(\omega_0^2 -\omega^2 -\frac{1}{8}\omega_0^2 A_0^2\right) \int_0^\tau \sin \omega t \sin 3\omega t \mathrm{dt}\nonumber\\
&+& \frac{\omega_0^4A_0^5}{192} \int_0^\tau \sin^2 3\omega t \mathrm{dt} = 0\nonumber
\end{eqnarray}
The previous expression is reduced to:
\begin{eqnarray}
A_0\left(\left(\omega_0^2 - \omega^2 - \frac{1}{8}\omega_0^2A_0^2\right)\left(\omega_0^2 -\omega - \frac{3}{8}\omega_0^2 A_0^2\right) + \frac{\omega_0^4 A_0^4}{192}\right) &=& 0\nonumber
\end{eqnarray}
For a nontrivial solution, \(A_0 \neq = 0\) and the previous expression can be written as:
\begin{eqnarray}
\omega^4 + \omega^2 \omega_0^2 \left(\frac{1}{2}A_0^2 - 2\right) + \omega_0^4 \left(1-\frac{1}{2}A_0^2 + \frac{5}{96}A_0^4\right) &=& 0.\nonumber
\end{eqnarray}
The roots of the quadratic equations are:
\begin{eqnarray}
\omega^2 &=& \omega_0^2(1-0.14A_0^2)\nonumber\\
\omega^2 &=& \omega_0^2(1-0.35A_0^2)\nonumber
\end{eqnarray}
Example 2Using three-term expansion in Lindstedt's perturbation method, find the solution of the pendulum equation: \begin{eqnarray} \ddot{x} + \omega_0^2x + \alpha x^3 &=& 0\nonumber \end{eqnarray} Solution The functions \(x(t)\), and \(\omega_0\) are assumed as: \begin{eqnarray} x(t) &=& x_0(t) + \alpha x_1(t) + \alpha^2 x_2 (t)\nonumber\\ \omega_0^2 &=& \omega^2 -\alpha \omega_1(A_0) -\alpha^2 \omega_2(A_0)\nonumber \end{eqnarray} In previous expressions the \(A_0\) represents the amplitude, \(\omega\) fundamental frequency. Substituting previous two equations into initial differential equation the following expression is obtained. \begin{eqnarray} &&\ddot{x}_0 + \alpha \ddot{x}_1 + \alpha^2 \ddot{x}_2 + \omega^2 c_0 - \alpha \omega_1 x_0 -\alpha^2 \omega_2 x_0 + \omega^2 \alpha x_1\nonumber\\ &-& \alpha^2 \omega_1 x - \alpha^3\omega_2 x_1 + \alpha^2\omega^2 x_2 - \alpha^3\omega_1x_2 - \alpha^4 \omega_2 x_2 + \alpha x_0^3\nonumber\\ &+& \alpha^4 x_1^3 + \alpha^7 x_2^3 +3 \alpha^2 x_0^2 x_1 + 3\alpha^3 x_0x_1^2 +3\alpha^3 x_0^2 x_2 \nonumber\\ &+& 3\alpha^5 x_0x_2^2 + 3\alpha^5 x_1^2 x_2 + 3\alpha^6 x_1x_2^2 + 6\alpha^4 x_0x_1x_2 = 0\nonumber \end{eqnarray} Neglecting higher terms of \(\alpha\) such as \(\alpha^3, \alpha^4,...\). \begin{eqnarray} &&\alpha^0(\ddot{x}_0 + \omega x_0) + \alpha^1 (\ddot{x}_1 - \omega_1 x_0 + \omega^2 x_1 + x_0^3)\nonumber\\ &+& \alpha^2(\ddot{x}_2 - \omega_2 x_0 - \omega_1 x_1 + \omega^2 x_2 +3x_0^2 x_1) = 0\nonumber \end{eqnarray} Setting the \(\alpha^0 = 0, \alpha^1 = 0,\) and \(\alpha^2 = 0\) in previous expression the following differential equations are obtained. \begin{eqnarray} \ddot{x}_0 + \omega^2 x_0 &=& 0\nonumber\\ \ddot{x}_1 - \omega_1 x_0 + \omega^2 x_1 + x_0^3 &=& 0\nonumber\\ \ddot{x}_2 - \omega_2 x_0 - \omega_1 x_1 + \omega^2 x_2 +3x_0^2 x_1 &=& 0\nonumber \end{eqnarray} The solution of the first differential equation is equal to: \begin{eqnarray} x_0(t) &=& D_1\cos\omega t + D_2\sin \omega t\nonumber \end{eqnarray} The first derivation of previous expression is equal to: \begin{eqnarray} \dot{x}_0(t) &=& -D_1\omega \sin \omega t + D_2 \omega \cos \omega t\nonumber \end{eqnarray} The initial conditions of the system, for example are: \begin{eqnarray} x_0(t=0) &=& A_0\nonumber\\ \ddot{x}_0(t=0) = 0\nonumber \end{eqnarray} With application of initial conditions to the solution the coefficients \(D_1\) and \(D_2\) are determined. \begin{eqnarray} D_1 \cos \omega\cdot 0 + D_2 \sin \omega\cdot 0 &=& A_0\nonumber\\ D_1 &=& A_0\nonumber\\ -D_1 \omega \sin \omega 0 + D_2 \omega \cos \omega 0 &=& 0\nonumber\\ D_2 &=& 0 \nonumber \end{eqnarray} The solution of function \(x_0(t)\) can be written as: \begin{eqnarray} x_0(t) &=& A_0\cos \omega t \end{eqnarray} In case \(\alpha = 0 \) the previous solution can be written as: \begin{eqnarray} x_0(t) &=& A_0\cos\omega t,\quad \omega = \omega_0\nonumber \end{eqnarray} The second differential equation with solution for \(x_0\) can be written as: \begin{eqnarray} \ddot{x}_1 +\omega^2 x_1 &=& \left(\omega_1 A_0 -\frac{3}{4}A_0^3\right) \cos\omega t - \frac{1}{4}A_0^3 \cos 3 \omega t\nonumber \end{eqnarray} The solution of previous differential equation can be written as: \begin{eqnarray} x_1 (t) &=& D_!\cos\omega t + D_2\sin \omega t + (\omega_1 A_0 - \frac{3}{4}A_0^3)\frac{1}{2}\omega t \sin \omega t + \frac{1}{32}\frac{1}{\omega^2}A_0^3 \cos 3 \omega t\nonumber \end{eqnarray} The third term in previous expression on the right hand side is a secular term which can be eliminated by setting: \begin{eqnarray} \omega_1 A_0 - \frac{3}{4}A_0^3 &=& 0\Rightarrow A_0 = 0, \quad \omega_1 =\frac{3}{4}A_0^2\nonumber \end{eqnarray} Since \(A_0 \neq 0\) the \(\omega_1 = \frac{3}{4}A_0^2\). With initial condtions the coefficient \(D_1\) and \(D_2\) are equal to: \begin{eqnarray} D_1 &=& -\frac{1}{32\omega^2}A_0^3\quad D_2 = 0\nonumber \end{eqnarray} The function \(x_1(t)\) is equal to: \begin{eqnarray} x_1(t)&=& -\frac{A_0^3}{32\omega^2} (\cos\omega t - \cos 3\omega t)\nonumber\\ \omega_1 &=& \frac{3}{4}A_0^2\nonumber \end{eqnarray} The last differential equation can be written as: \begin{eqnarray} \ddot{x}_2 + \omega^2x_2 &=& \left(\omega_2A_0 - \frac{3}{128}\frac{A_0^5}{\omega^2}\right)\cos\omega t + (\frac{3}{128}\frac{A_0^5}{\omega^2})\cos 3\omega t \nonumber\\ &+& \frac{3}{32} \frac{A_0^5}{\omega^2}\left(\cos^3\omega t - \cos^2 \omega t \cos 3\omega t\right)\nonumber \end{eqnarray} The final form of \(x_2(t)\) can be written as: \begin{eqnarray} x_2(t) &=& -\frac{A_0^5}{1024 \omega^4} ( \cos \omega t - \cos 5\omega t)\nonumber\\ \omega_2 &=& -\frac{3}{128}\frac{A_0^4}{\omega^2}\nonumber \end{eqnarray} The entire solution can now be written as: \begin{eqnarray} x(t) &=& A_0\cos \omega t - \frac{1}{32} \frac{A_0^3\alpha}{\omega^2} (\cos \omega t - \cos 3\omega t)\nonumber\\ &-&\frac{1}{1024}\frac{A_0^5\alpha^2}{\omega^4}(\cos \omega t - \cos 5\omega t)\nonumber \end{eqnarray} and \begin{eqnarray} \omega^2 &=& \omega_0^2 + \frac{3}{4}A_0^2\alpha - \frac{3}{128}\frac{A_0^4}{\omega^2}\alpha^2\nonumber \end{eqnarray}
Example 2Using three-term expansion in Lindstedt's perturbation method, find the solution of the pendulum equation: \begin{eqnarray} \ddot{x} + \omega_0^2x + \alpha x^3 &=& 0\nonumber \end{eqnarray} Solution The functions \(x(t)\), and \(\omega_0\) are assumed as: \begin{eqnarray} x(t) &=& x_0(t) + \alpha x_1(t) + \alpha^2 x_2 (t)\nonumber\\ \omega_0^2 &=& \omega^2 -\alpha \omega_1(A_0) -\alpha^2 \omega_2(A_0)\nonumber \end{eqnarray} In previous expressions the \(A_0\) represents the amplitude, \(\omega\) fundamental frequency. Substituting previous two equations into initial differential equation the following expression is obtained. \begin{eqnarray} &&\ddot{x}_0 + \alpha \ddot{x}_1 + \alpha^2 \ddot{x}_2 + \omega^2 c_0 - \alpha \omega_1 x_0 -\alpha^2 \omega_2 x_0 + \omega^2 \alpha x_1\nonumber\\ &-& \alpha^2 \omega_1 x - \alpha^3\omega_2 x_1 + \alpha^2\omega^2 x_2 - \alpha^3\omega_1x_2 - \alpha^4 \omega_2 x_2 + \alpha x_0^3\nonumber\\ &+& \alpha^4 x_1^3 + \alpha^7 x_2^3 +3 \alpha^2 x_0^2 x_1 + 3\alpha^3 x_0x_1^2 +3\alpha^3 x_0^2 x_2 \nonumber\\ &+& 3\alpha^5 x_0x_2^2 + 3\alpha^5 x_1^2 x_2 + 3\alpha^6 x_1x_2^2 + 6\alpha^4 x_0x_1x_2 = 0\nonumber \end{eqnarray} Neglecting higher terms of \(\alpha\) such as \(\alpha^3, \alpha^4,...\). \begin{eqnarray} &&\alpha^0(\ddot{x}_0 + \omega x_0) + \alpha^1 (\ddot{x}_1 - \omega_1 x_0 + \omega^2 x_1 + x_0^3)\nonumber\\ &+& \alpha^2(\ddot{x}_2 - \omega_2 x_0 - \omega_1 x_1 + \omega^2 x_2 +3x_0^2 x_1) = 0\nonumber \end{eqnarray} Setting the \(\alpha^0 = 0, \alpha^1 = 0,\) and \(\alpha^2 = 0\) in previous expression the following differential equations are obtained. \begin{eqnarray} \ddot{x}_0 + \omega^2 x_0 &=& 0\nonumber\\ \ddot{x}_1 - \omega_1 x_0 + \omega^2 x_1 + x_0^3 &=& 0\nonumber\\ \ddot{x}_2 - \omega_2 x_0 - \omega_1 x_1 + \omega^2 x_2 +3x_0^2 x_1 &=& 0\nonumber \end{eqnarray} The solution of the first differential equation is equal to: \begin{eqnarray} x_0(t) &=& D_1\cos\omega t + D_2\sin \omega t\nonumber \end{eqnarray} The first derivation of previous expression is equal to: \begin{eqnarray} \dot{x}_0(t) &=& -D_1\omega \sin \omega t + D_2 \omega \cos \omega t\nonumber \end{eqnarray} The initial conditions of the system, for example are: \begin{eqnarray} x_0(t=0) &=& A_0\nonumber\\ \ddot{x}_0(t=0) = 0\nonumber \end{eqnarray} With application of initial conditions to the solution the coefficients \(D_1\) and \(D_2\) are determined. \begin{eqnarray} D_1 \cos \omega\cdot 0 + D_2 \sin \omega\cdot 0 &=& A_0\nonumber\\ D_1 &=& A_0\nonumber\\ -D_1 \omega \sin \omega 0 + D_2 \omega \cos \omega 0 &=& 0\nonumber\\ D_2 &=& 0 \nonumber \end{eqnarray} The solution of function \(x_0(t)\) can be written as: \begin{eqnarray} x_0(t) &=& A_0\cos \omega t \end{eqnarray} In case \(\alpha = 0 \) the previous solution can be written as: \begin{eqnarray} x_0(t) &=& A_0\cos\omega t,\quad \omega = \omega_0\nonumber \end{eqnarray} The second differential equation with solution for \(x_0\) can be written as: \begin{eqnarray} \ddot{x}_1 +\omega^2 x_1 &=& \left(\omega_1 A_0 -\frac{3}{4}A_0^3\right) \cos\omega t - \frac{1}{4}A_0^3 \cos 3 \omega t\nonumber \end{eqnarray} The solution of previous differential equation can be written as: \begin{eqnarray} x_1 (t) &=& D_!\cos\omega t + D_2\sin \omega t + (\omega_1 A_0 - \frac{3}{4}A_0^3)\frac{1}{2}\omega t \sin \omega t + \frac{1}{32}\frac{1}{\omega^2}A_0^3 \cos 3 \omega t\nonumber \end{eqnarray} The third term in previous expression on the right hand side is a secular term which can be eliminated by setting: \begin{eqnarray} \omega_1 A_0 - \frac{3}{4}A_0^3 &=& 0\Rightarrow A_0 = 0, \quad \omega_1 =\frac{3}{4}A_0^2\nonumber \end{eqnarray} Since \(A_0 \neq 0\) the \(\omega_1 = \frac{3}{4}A_0^2\). With initial condtions the coefficient \(D_1\) and \(D_2\) are equal to: \begin{eqnarray} D_1 &=& -\frac{1}{32\omega^2}A_0^3\quad D_2 = 0\nonumber \end{eqnarray} The function \(x_1(t)\) is equal to: \begin{eqnarray} x_1(t)&=& -\frac{A_0^3}{32\omega^2} (\cos\omega t - \cos 3\omega t)\nonumber\\ \omega_1 &=& \frac{3}{4}A_0^2\nonumber \end{eqnarray} The last differential equation can be written as: \begin{eqnarray} \ddot{x}_2 + \omega^2x_2 &=& \left(\omega_2A_0 - \frac{3}{128}\frac{A_0^5}{\omega^2}\right)\cos\omega t + (\frac{3}{128}\frac{A_0^5}{\omega^2})\cos 3\omega t \nonumber\\ &+& \frac{3}{32} \frac{A_0^5}{\omega^2}\left(\cos^3\omega t - \cos^2 \omega t \cos 3\omega t\right)\nonumber \end{eqnarray} The final form of \(x_2(t)\) can be written as: \begin{eqnarray} x_2(t) &=& -\frac{A_0^5}{1024 \omega^4} ( \cos \omega t - \cos 5\omega t)\nonumber\\ \omega_2 &=& -\frac{3}{128}\frac{A_0^4}{\omega^2}\nonumber \end{eqnarray} The entire solution can now be written as: \begin{eqnarray} x(t) &=& A_0\cos \omega t - \frac{1}{32} \frac{A_0^3\alpha}{\omega^2} (\cos \omega t - \cos 3\omega t)\nonumber\\ &-&\frac{1}{1024}\frac{A_0^5\alpha^2}{\omega^4}(\cos \omega t - \cos 5\omega t)\nonumber \end{eqnarray} and \begin{eqnarray} \omega^2 &=& \omega_0^2 + \frac{3}{4}A_0^2\alpha - \frac{3}{128}\frac{A_0^4}{\omega^2}\alpha^2\nonumber \end{eqnarray}