## 3 Almost Anti-Periodic Oscillation of the Mechanical System
### Stability of the Almost Anti-Periodic Solutions  
In this section, we will establish the stability of the general \(N\)-dimensional mechanical system and the underactuated Euler-Lagrange system under the almost anti-periodic discrete process. Through Equations (5) and (7), the systems (4) and (6) can be turned into the following nonhomogeneous linear system  
\[x(n+1)=M(n)x(n)+c(n),\ \ n\in\mathbb{Z}, \tag{8}\]  
which leads to the corresponding homogeneous linear system  
\[x(n+1)=M(n)x(n),\ \ n\in\mathbb{Z}, \tag{9}\]where  
\[M(n)=R= \begin{bmatrix}0&I\\ B^{-1}(C-B)&B^{-1}(2B-C)\end{bmatrix} \]  
and  
\[c(n)=b(n)= \begin{bmatrix}0\\ B^{-1}f(n)-B^{-1}S\big{(}q(n)\big{)}\end{bmatrix} \]  
in Equation (5),  
\[M(n)=H(n)= \begin{bmatrix}0&I\\ \gamma_{0}&\gamma_{1}\end{bmatrix} ,\] \[c(n)=a(n)= \begin{bmatrix}0\\ B^{-1}\big{(}q(n)\big{)}\big{[}L\omega-G\big{(}q(n)\big{)}\big{]}\end{bmatrix} \]  
in Equation (7), where  
\[\gamma_{0}=B^{-1}\big{(}q(n)\big{)}C(q(n),q(n+1)-q(n))-I,\] \[\gamma_{1}=2I-B^{-1}\big{(}q(n)\big{)}C(q(n),q(n+1)-q(n)).\]  
Next, we will establish the stability of Equation (8) to obtain the stability of Equations (4) and (6). For convenience, denote \(M_{*}:=\inf\{\|M(n)\|:n\in\mathbb{Z}\}\), \(M^{*}:=\sup\{\|M(n)\|:n\in\mathbb{Z}\}\). **Theorem 7** ([7]). : _Let \(n,s\in\mathbb{Z}\),_  
\[\Psi(n,s)= \begin{cases}\prod\limits_{j=1}^{n-s}M(n-j),\ \ n>s,\\ I,\ \ n=s,\\ 0,\ \ n<s.\end{cases} \]  
_Then, the following results hold._  
1. _The zero solution of Equation (_9_) is stable if and only if_ \[\big{\|}\Psi(n,s)\big{\|}\leq K(s),\] _where_ \(K(s)\) _is a positive constant dependent on_ \(s\)_._
2. _The zero solution of Equation (_9_) is uniformly stable if and only if_ \[\big{\|}\Psi(n,s)\big{\|}\leq K,\] _where_ \(K\) _is a positive constant independent of_ \(s\)_._
3. _The zero solution of Equation (_9_) is asymptotically stable if and only if_ \[\lim\limits_{n\to\infty}\big{\|}\Psi(n,s)\big{\|}=0.\]
4. _The zero solution of Equation (_9_) is uniformly asymptotically stable if and only if_ \[\big{\|}\Psi(n,s)\big{\|}\leq K\eta^{n-s}\] _for some constants_ \(K>0\) _and_ \(\eta\in(0,1)\)_,_ \(n\geq s\)_._  
**Theorem 8**. : _If all the conditions of Lemma 3 hold for \(M(n)=R\) and \(c(n)=b(n)\) (or all the conditions of Lemma 4 hold for \(M(n)=H(n)\) and \(c(n)=a(n)\)) and_  
\[\lambda_{0}=\lim_{n\to\infty}\left[\prod_{j=1}^{n}\|M(j)\|\right]^{\frac{1}{n}} <1. \tag{10}\]  
_Then, Equation (8) has a unique uniformly asymptotically stable almost anti-periodic solution_  
\[x_{0}(n)=\sum_{j=-\infty}^{n-2}\left[\prod_{i=1}^{n-j-1}M(n-i)\right]c(j)+c(n-1 )\ \ n\in\mathbb{Z}.\]  
_Moreover, Equation (4) (or Equation (6)) has an unique uniformly asymptotically stable almost anti-periodic solution._  
Proof. : Step 1. We will prove that \(x_{0}(n)\) is well-defined for all \(n\in\mathbb{Z}\). By Proposition 2 (ii) and Equation (10), we can obtain  
\[\lim_{n\to\infty}\frac{1}{n}\left[\sum_{j=-n}^{-1}\ln\|M(j)\|-\sum_{j=1}^{n} \ln\|M(j)\|\right]=0,\]  
i.e.,  
\[\lim_{n\to\infty}\frac{1}{n}\left[\sum_{j=-n}^{-1}\ln\|M(j)\|\right]=\ln \lambda_{0}.\]  
Hence,  
\[\lim_{n\to\infty}\left[\prod_{j=-n}^{-1}\|M(j)\|\right]^{\frac{1}{n}}=\lambda _{0},\]  
which implies that for \(\forall\varepsilon>0\), there exists \(N_{2}>0\) such that  
\[\left|\left[\prod_{j=-n}^{-1}\|M(j)\|\right]^{\frac{1}{n}}-\lambda_{0}\right|<\varepsilon\]  
for \(n>N_{2}\), i.e.,  
\[\big{\|}\Psi(n,s)\big{\|}\leq K,\]0  
i.e.,  
\[\big{\|}\Psi(n,s)\big{\|}\leq K,\]1  
Hence, there exist some \(\lambda_{1}\in(\lambda_{0},1)\) and \(\lambda_{2}\in(0,\lambda_{0})\) such that  
\[\big{\|}\Psi(n,s)\big{\|}\leq K,\]2Hence,  
\[