# Dynamic Lateral Response of the Partially-Embedded Single Piles in Layered Soil
## 2 Solving Equations of Motion
### Finite Difference Method  
By ignoring the effect of external load and damping, Equation (19) can be rewritten as:  
\[u_{1}{}^{\prime\prime\prime\prime}+\omega^{2}(\frac{-m_{1}}{E_{p}I_{p}}u_{1 })=0,\;0\leq z\leq l_{1} \tag{34}\]  
\[u_{i}{}^{\prime\prime\prime\prime}-\frac{2t_{i}}{E_{p}I_{p}}u_{i}{}^{\prime \prime}+\frac{k_{i}}{E_{p}I_{p}}u_{i}+\omega^{2}(\frac{-m_{i}}{E_{p}I_{p}}u_{ i})=0,-(i=2,3,4),\;l_{1}<z\leq L \tag{35}\]  
Taking free-free pile as an example, the boundary conditions are:  
\[\text{Pile top}\left\{ \begin{array}{c}u_{1}{}^{\prime\prime}(0)=0\\ u_{1}{}^{\prime\prime\prime}(0)=0\end{array} \right. \tag{36}\]  
\[\text{Continuous}\left\{ \begin{array}{c}u_{i}(H_{i})=u_{i+1}(H_{i})\\ u_{i}{}^{\prime}(H_{i})=u_{i+1}{}^{\prime}(H_{i})\\ u_{i}{}^{\prime\prime}(H_{i})=u_{i+1}{}^{\prime\prime}(H_{i})\\ u_{i}{}^{\prime\prime\prime}(H_{i})=u_{i+1}{}^{\prime\prime\prime}(H_{i})\end{array} \right. \tag{37}\]  
\[\text{Pile end}\left\{ \begin{array}{c}u_{4}{}^{\prime\prime}(L)=0\\ u_{4}{}^{\prime\prime\prime}(L)=0\end{array} \right. \tag{38}\]  
The discretization of Equations (34) and (35) using the FDM is performed as [18]  
\[\delta_{z}^{4}u_{1,n}+\omega^{2}(\frac{-m_{1}}{E_{p}I_{p}}u_{1,n})=0,\;0\leq z \leq l_{1} \tag{39}\]  
\[\delta_{z}^{4}u_{i,n}-\frac{2t_{i}}{E_{p}I_{p}}\delta_{z}^{2}u_{i,n}+\frac{k_ {i}}{E_{p}I_{p}}u_{i,n}+\omega^{2}(\frac{-m_{i}}{E_{p}I_{p}}u_{i,n})=0,\;(i=2,3,4),\;l_{1}<z\leq L \tag{40}\]  
In Equations (39) and (40), the subscript \(i\) in \(u_{i,n}\) represents the displacements \(u_{1}\) and \(u_{2}\), \(u_{3}\), \(u_{4}\) of the non-embedded section and the embedded section of the pile and the subscript \(n\) represents the number of nodes in this section and \(\delta_{z}\) is the discretization expression of the mode shape function, which is derived using the Taylor series expansion [22]. In the range of \(l_{1}<z\leq L\), the second and fourth derivatives of \(u_{i}(i=2,3,4)\) can be written as:  
\[u_{i}^{{}^{\prime\prime\prime}}\approx\frac{u_{i,n-2}-4u_{i,n-1}+6u_{i,n}-4u_{i, n+1}+u_{i,n+2}}{\Delta z^{4}} \tag{41}\]  
\[u_{i}^{{}^{\prime\prime\prime}}\approx\frac{u_{i,n-1}-2u_{i,n}+u_{i,n+1}}{ \Delta z^{2}} \tag{42}\]  
Considering the virtual nodes \(u_{4,b+1}\) and \(u_{4,b+2}\), from the boundary condition (36)-(38) we have  
\[z=L:u^{{}^{\prime\prime}}_{4,b}=\frac{u_{4,b-1}-2u_{4,b}+u_{4,b+1}}{\Delta z^{ 2}}=0, \tag{43}\]  
\[u^{{}^{\prime\prime\prime}}_{4,b}=\frac{u_{4,b+2}-3u_{4,b+1}+3u_{4,b}-u_{4,b -1}}{\Delta z^{3}}=0 \tag{44}\]  
Substituting Equations (41)-(44) into Equation (40), we can obtain  
\[([\mathbf{A}]+\omega^{2}[\mathbf{B}])\{\mathbf{U}_{i}\}=0 \tag{45}\]  
In Equation (45), \(\mathbf{A}\) and \(\mathbf{B}\) are diagonal matrices and \(\{\mathbf{U}_{i}\}=[u_{i,a+1},u_{i,a+2},\ldots u_{i,b-1},u_{i,b}]^{\mathrm{T}}\)\((i=2,3,4)\), where the subscript \(a\) is the number of nodes in the non-embedded section, the subscript \(b\) is the total number of nodes in a pile. Substituting Equations (36)-(38) into Equation (45), the matrix formulation of Equation (45) can be written as:  
\[\left(\left[ \begin{array}{cccccc}BB_{i}&NN_{i}&1&0&\cdots&0\\ NN_{i}&BB_{i}&NN_{i}&1&\cdots&0\\ 1&NN_{i}&BB_{i}&NN_{i}&\ddots&0\\ \vdots&\ddots&\ddots&BB_{i}&NN_{i}&1\\ 0&0&1&NN_{i}&BB_{i}&NN_{i}\\ 0&0&0&4/3&NN_{i}-2&BB_{i}+6\end{array} \right]+\omega^{2}\left[ \begin{array}[] {cccccc}DD_{i}&0&0&0&\cdots&0\\ 0&DD_{i}&0&0&\cdots&0\\ 0&0&DD_{i}&0&\ddots&0\\ 0&0&0&DD_{i}&\ddots&0\\ \vdots&\vdots&\ddots&\ddots&\ddots&0\\ 0&0&0&0&DD_{i}\end{array} \right]\right)\left[ \begin{array}{c}u_{2,a+1}\\ u_{2,a+2}\\ u_{2,a+3}\\ \vdots\\ u_{2,b-1}\\ u_{2,b}\end{array} \right]=0 \tag{46}\]  
where \(BB_{i}=6+k_{i}\Delta z^{4}/EI+4t_{i}\Delta z^{2}/E_{p}I_{p}\), \(NN_{i}=-4-2t_{i}\Delta z^{2}/E_{p}I_{p}(i=2,3,4)\).