## Appendix A Transfer Matrix Coefficient for Piles in the Free Segment  
Notice that Equation (11) can be written in differential equation form as  
\[\left\{ \begin{array}{ll}\frac{dy_{fi}}{dz_{fi}}=\varphi_{fi}\\ \frac{d\varphi_{fi}}{dz_{fi}}=\frac{M_{fi}}{\mathbb{E}f_{f}}+\frac{b_{1} \overline{q}_{fi}}{\mathbb{A}c_{c}\mathbb{G}c}\\ \frac{dM_{fi}}{dz_{fi}}=Q_{fi}-\overline{N}_{fi}\Big{(}\varphi_{fi}-\varphi_{ IN}\Big{)}\\ \frac{dM_{fi}}{dz_{fi}}=b_{1}\overline{q}_{fi}\end{array} \right. \tag{13}\]  
where \(y_{fi},\varphi_{fi},\varphi_{IN},M_{fi},Q_{fi},N_{fi},z_{fi}\) are the horizontal deformation, axis rotation angle, initial inclination angle, bending moment, shear force and depth for \(i\)th discrete segment in the pile shaft. Equation (13) can be simplified as the following matrix function:  
\[\frac{dS_{fi}}{dz_{fi}}=A_{fi}S_{fi}+f_{fi} \tag{14}\]  
In which \(S_{fi}\), \(A_{fi}\) and \(f_{fi}\) are matrix variables as follows:  
\[S_{fi}= \begin{bmatrix}y_{fi}&\varphi_{fi}&M_{fi}&Q_{fi}\end{bmatrix} ^{T} \tag{15}\]\[A_{fi}= \begin{bmatrix}0&1&0&0\\ 0&0&1/EI_{f}&0\\ 0&0&0&1\\ 0&0&0&0\end{bmatrix}  \tag{10}\]  
\[f_{fi}= \begin{bmatrix}0&\frac{b_{i}\overline{q}_{fi}}{\kappa A_{i}c_{i}c_{i}}& \overline{N}_{fi}\varphi_{IN}&b_{1}\overline{q}_{fi}\end{bmatrix} ^{T} \tag{11}\]  
By assuming \(L\Big{[}S_{fi}\Big{(}z_{fi}\Big{)}\Big{]}=F_{fi}\Big{(}s_{fi}\Big{)}\) and \(L\Big{[}f_{fi}\Big{(}z_{fi}\Big{)}\Big{]}=g_{fi}\Big{(}s_{fi}\Big{)}\) (where the symbol \(L\) represents the Laplace transformation; \(F_{fi}\) and \(g_{fi}\) are the Laplace functions; and \(s_{fi}\) is the corresponding variable of Laplace function), Equation (10) can be converted to Laplace function as follows:  
\[L\Bigg{(}\frac{dS_{fi}}{dz_{fi}}\Bigg{)}=L\Big{(}A_{fi}S_{fi}+f_{fi}\Big{)} \tag{12}\]  
\[F_{fi}\Big{(}z_{fi}\Big{)}=\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}S_{f(i-1)} +\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}g_{fi}\Big{(}s_{fi}\Big{)} \tag{13}\]  
where \(I\) represents the four-order unit matrix; and \(g_{fi}\Big{(}s_{fi}\Big{)}\) is expressed as  
\[g_{fi}\Big{(}s_{fi}\Big{)}= \begin{bmatrix}0&\frac{b_{1}\overline{q}_{fi}}{ \kappa A_{i}c_{i}c_{i}c_{i}\overline{s}_{i}}&\frac{\overline{N}_{fi}\varphi_{IN }}{\overline{s}_{f}}&\frac{b_{1}\overline{q}_{fi}}{\overline{s}_{f}}\end{bmatrix}  ^{T} \tag{14}\]  
The Laplace inverse transformation of Equation (14) is expressed as  
\[S_{fi}\Big{(}z_{fi}\Big{)}=L^{-1}\bigg{[}\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{ -1}\bigg{]}S_{f(i-1)}+L^{-1}\bigg{[}\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}g_{ fi}\Big{(}s_{fi}\Big{)}\bigg{]} \tag{15}\]  
In which \(\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}\) is expressed as  
\[\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}= \begin{bmatrix}\frac{EI_{f}}{s_{fi}}& \frac{1}{EI_{f}}\\ 0&\frac{EI_{f}s_{fi}^{2}+\overline{N}_{fi}}{\overline{s}_{f}}&\frac{1}{EI_{f}s _{fi}^{2}+\overline{N}_{fi}}\end{bmatrix}  \tag{16}\]  
Let \(\alpha_{fi}^{2}=\overline{N}_{fi}/EI_{f}\), Equation (16) can be obtained as  
\[\Big{(}I\times s_{fi}-A_{fi}\Big{)}^{-1}= \begin{bmatrix}\frac{1}{s_{fi}}& \frac{1}{s_{fi}^{2}+\alpha_{fi}^{2}}&\frac{1}{\Big{(}s_{fi}^{2}+\alpha_{fi}^{2} \Big{)}s_{fi}}&\frac{s_{fi}^{2}}{\Big{(}s_{fi}^{2}+\alpha_{fi}^{2}\Big{)}s_{fi }^{2}}\\ 0&\frac{s_{fi}}{s_{fi}^{2}+\alpha_{fi}^{2}}&\frac{1}{s_{fi}^{2}+\alpha_{fi}^{2} }&\frac{1}{s_{fi}^{2}+\alpha_{fi}^{2}}\\ 0&0&0&\frac{1}{s_{fi}}\end{bmatrix}  \tag{17}\]Simultaneous Equations (A8) and (A11)  
\[\left(I\times s_{fi}-A_{fi}\right)^{-1}g_{fi}\Big{(}s_{fi}\Big{)}=\left[