# Dynamic Lateral Response of the Partially-Embedded Single Piles in Layered Soil
## 2 Solving Equations of Motion
### Finite Difference Method
From Equations (36)-(38), we can obtain:  
\[z=0:u_{1}^{{}^{\prime\prime}}=\frac{u_{1,0}-2u_{1,1}+u_{1,2}}{\Delta z^{2}}=0 \tag{47}\]  
\[u_{1}^{{}^{\prime\prime\prime}}=\frac{u_{1,2}-3u_{1,1}+3u_{1,0}-u_{1,-1}}{ \Delta z^{3}}=0 \tag{48}\]  
and so  
\[([\mathbf{C}]+\omega^{2}[\mathbf{D}])\{\mathbf{U}_{1}\}=0 \tag{49}\]  
where \(\mathbf{C}\) and \(\mathbf{D}\) are diagonal matrices and \(\{\mathbf{U}_{1}\}=[u_{1,1},u_{1,2},\ldots u_{a-1},u_{a}]^{\mathrm{T}}\). In the same way, substituting boundary condition Equations (36)-(38) into Equation (49), the matrix formulation of Equation (49) can be obtained as:  
\[\left(\left[ \begin{array}{cccccc}1&-2&1&0&\cdots&0\\ -2&5&-4&1&\cdots&0\\ 1&-4&6&-4&\ddots&0\\ 0&1&-4&6&\ddots&1\\ \vdots&\vdots&\ddots&\ddots&\ddots&-4\\ 0&0&0&1&-4&6\end{array} \right]+\omega^{2}\left[ \begin{array}{cccccc}DD_{1}&0&0& 0&\cdots&0\\ 0&DD_{1}&0&0&\cdots&0\\ 0&0&DD_{1}&0&\ddots&0\\ \vdots&\vdots&\ddots&\ddots&\ddots&0\\ 0&0&0&0&DD_{1}\end{array} \right]\right)\left[ \begin{array}{c}u_{1,1}\\ u_{1,2}\\ u_{1,3}\\ \vdots\\ u_{1,a-1}\\ u_{1,a}\end{array} \right]=0 \tag{50}\]  
where \(DD_{1}=-m_{1}\Delta z^{4}/E_{p}I_{p}\). Considering the continuity condition in Equations (36)-(38), the diagonal matrix of the system is given by  
\[([\mathbf{E}]+\omega^{2}[\mathbf{F}])\{\mathbf{U}\}=([\mathbf{E}]+ \omega^{2}[\mathbf{F}])\left( \begin{array}{c}u_{1,1}\\ u_{1,2}\\ u_{1,3}\\ \vdots\\ u_{1,a-1}\\ u_{1,a}\\ u_{i,a+1}\\ u_{i,a+2}\\ u_{i,a+3}\\ \vdots\\ u_{i,b-1}\\ u_{i,b}\end{array} \right)=0 \tag{51}\]  
\[\text{where }\{\mathbf{U}\}=[\mathbf{U}_{1},\mathbf{U}_{i}]^{\mathrm{T}}=[u_{1,1},u_{1,2}\cdots u_{a-1},u_{a},u_{i,a+1},u_{i,a+2},\cdots u_{i,b-1},u_{i,b}]^{ \mathrm{T}}\left(i=2,3,4\right)\]  
\[E=\left( \begin{array}{ccccccccccccc}1&-2&1&0&\cdots&0&\cdots&\cdots&\cdots& \cdots&0\\ -2&5&-4&1&\cdots&0&\ddots&\ddots&\ddots&\ddots&\vdots\\ 1&-4&6&-4&\ddots&0&\cdots&\ddots&\ddots&\ddots&\vdots\\ 0&1&-4&6&\ddots&1&0&\cdots&\ddots&\ddots&\ddots&\vdots\\ \vdots&\vdots&\ddots&\ddots&\ddots&-4&0&1&0&\ddots&\ddots&\vdots\\ 0&0&0&1&NN_{i}&BB_{i}&0&NN_{i}&1&0&\cdots&0\\ 0&\cdots&0&1&NN_{i}&0&BB_{i}&NN_{i}&1&0&\cdots&0\\ 0&\ddots&\cdots&0&1&0&NN_{i}&BB_{i}&NN_{i}&1&\cdots&0\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&1&NN_{i}&\ddots&\ddots&\ddots& \vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&BB_{i}&NN_{i} &1\\ \vdots&\vdots&\ddots&\ddots&\ddots&\ddots&\ddots&0&0&1&NN_{i}&BB_{i}&NN_{i}\\ 0&\cdots&\cdots&\cdots&\cdots&\cdots&0&0&0&4/3&NN_{i}-2&BB_{i}+6\\ \end{array} \right)\]  
\[F=\left( \begin{array}{ccccccccccccc}DD_{i}&0&0&\cdots&0&0&\cdots&\cdots&\cdots& \cdots&\cdots&0\\ 0&DD_{i}&0&\cdots&0&0&\ddots&\ddots&\ddots&\ddots&\ddots&\vdots\\ 0&\ddots&DD_{i}&\ddots&0&\vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\vdots\\ 0&\ddots&\ddots&\ddots&\ddots&0&\ddots&\ddots&\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&DD_{i}&0&0&\ddots&\ddots&\ddots&\ddots&0\\ 0&0&0&0&DD_{i}&0&0&0&\ddots&\ddots&0\\ 0&\ddots&\ddots&\ddots&0&0&DD_{i}&0&0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&0&DD_{i}&0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&0&\ddots&DD_{i}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&0&0\\ \vdots&\vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&\ddots&DD_{i} &0\\ 0&\cdots&\cdots&\cdots&\cdots&\cdots&0&\cdots&\cdots&0&0&DD_{i}\end{array} \right)\]  
Therefore, we can obtain the natural frequencies of each order of partially-embedded single piles by letting the matrix determinant Equation (51) be zero.