## 3 Solution Process  
The general solution for the displacement of the pile foundation in the \(i\)-th layer foundation is as follows:  
\[{w_{i}}^{*}(z^{*})=C_{i1}f_{i1}+C_{i2}f_{i2}+C_{i3}f_{i3}+C_{i4}f_{i4} \tag{17}\]  
where \(C_{i1}\), \(C_{i2}\), \(C_{i3}\), and \(C_{i4}\) are undetermined coefficients. The expressions of \(f_{i1}\), \(f_{i2}\), \(f_{i3}\), and \(f_{i4}\) are shown in Table 1[45]. To simplify the formulation process, the dimensionless notation superscript is omitted in the subsequent derivations. The first-order derivative with respect to the variable \(z\) is denoted in a simplified manner. Taking a rock-socketed pile as an example, the boundary conditions can be reduced to a free-fixed support configuration, where the pile head is free and the pile base is fixed. This simplification accurately reflects the behavior of embedded piles in lateral loading in practical engineering scenarios and provides a clear basis for deriving analytical solutions. \[{w_{1}}^{\prime\prime}(0)=-M_{0};{w_{1}}^{\prime\prime\prime}(0)-2t_{1}{w_{1}}^ {\prime}(0){=}R_{0};{w_{3}}(L)=0;{w_{3}}^{\prime}(L)=0. \tag{18}\]  
By substituting Equation (17) into Equations (12) and (18), the following is obtained:  
\[[\mathbf{M}]\{\mathbf{C}_{i}\}=\{\mathbf{N}\} \tag{19}\]  
where \(\{\mathbf{C}_{i}\}\) is the undetermined coefficient matrix and \([\mathbf{M}]\) is the solution function matrix, \(\{\mathbf{N}\}=\left(-M_{0}\quad P_{0}\quad 0\quad 0\right)^{\text{T}}\),  
\[[M]=\left[ \begin{array}{cccc}A(0)&B&B\\ D_{1}(H_{1})&-D_{2}(H_{1})&B\\ B&D_{2}(H_{2})&-D_{3}(H_{2})\\ B&B&E_{3}(L)\\ \end{array} \right] \tag{20}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & \(k_{i}<t_{i}\)2 & \(k_{i}>t_{i}\)2 \\ \hline \(a_{i}\) & \(\sqrt{t_{i}+\sqrt{(t_{i}^{2}-k_{i})}}\) & \(\sqrt{1/2(\sqrt{k_{i}}+t_{i})}\) \\ \(b_{i}\) & \(\sqrt{t_{i}-\sqrt{(t_{i}^{2}-k_{i})}}\) & \(\sqrt{1/2(\sqrt{k_{i}}-t_{i})}\) \\ \(f_{i1}\) & \(\sinh a_{i2}\) & \(\sinh a_{i2}\cos b_{i2}z\) \\ \(f_{i2}\) & \(\cosh a_{i2}\) & \(\cosh a_{i2}\cos b_{i2}z\) \\ \(f_{i3}\) & \(\sinh b_{i2}\) & \(\cosh a_{i2}\sin b_{i2}z\) \\ \(f_{i4}\) & \(\cosh b_{i2}\) & \(\sinh a_{i2}\sin b_{i2}z\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Solution function. \(\mathbf{B}\) is a zero matrix, and \(\mathbf{A}_{1}(0)\), \(\mathbf{D}_{i}(H_{j})\) (\(i=1,2,3\); \(j=1,2\)), and \(\mathbf{E}_{3}(L)\) are expressed by the following formula:  
\[\mathbf{A}_{1}(0)=\left[ \begin{array}{ccc}{f_{11}}^{\prime\prime}(0)&{f_{11}} ^{\prime\prime\prime}(0)-2t_{1}{f_{11}}^{\prime}(0)\\ {f_{12}}^{\prime\prime}(0)&{f_{12}}^{\prime\prime\prime}(0)-2t_{1}{f_{12}}^{ \prime}(0)\\ {f_{13}}^{\prime\prime}(0)&{f_{13}}^{\prime\prime\prime}(0)-2t_{1}{f_{13}}^{ \prime}(0)\\ {f_{14}}^{\prime\prime}(0)&{f_{14}}^{\prime\prime\prime}(0)-2t_{1}{f_{14}}^{ \prime}(0)\\ \end{array} \right]^{\mathsf{T}} \tag{21a}\] \[\mathbf{D}_{i}(H_{j})=\left[ \begin{array}{ccc}{f_{11}}(H_{j})&{f_{11}}^{ \prime}(H_{j})&{f_{11}}^{\prime\prime}(H_{j})&{f_{11}}^{\prime\prime\prime}(H_ {j})-2t_{i}{f_{11}}^{\prime}(H_{j})\\ {f_{21}}(H_{j})&{f_{2}}^{\prime}(H_{j})&{f_{22}}^{\prime\prime}(H_{j})&{f_{22}} ^{\prime\prime\prime}(H_{j})-2t_{i}{f_{2}}^{\prime}(H_{j})\\ {f_{31}}(H_{j})&{f_{3}}^{\prime}(H_{j})&{f_{3}}^{\prime\prime}(H_{j})&{f_{3}} ^{\prime\prime}(H_{j})-2t_{i}{f_{3}}^{\prime}(H_{j})\\ {f_{4}}(H_{j})&{f_{4}}^{\prime}(H_{j})&{f_{4}}^{\prime\prime}(H_{j})&{f_{4}} ^{\prime\prime\prime}(H_{j})-2t_{i}{f_{4}}^{\prime}(H_{j})\\ \end{array} \right]^{\mathsf{T}}\] (21b) \[\mathbf{E}_{3}(L)=\left[ \begin{array}{ccc}{f_{31}}(L)&{f_{32}}(L)&{f_{33}}(L) &{f_{34}}(L)\\ {f_{31}}^{\prime}(L)&{f_{32}}^{\prime}(L)&{f_{33}}^{\prime}(L)&{f_{34}}^{ \prime}(L)\\ \end{array} \right] \tag{21c}\]  
To calculate \(w_{i}(z)\), the parameter \(\gamma\) value needs to be determined [46]. When calculating, the approximate value of the parameter \(\gamma\) can be set (for example, \(\gamma=1.0\)). Furthermore, the values of parameters \(t_{i}\) and \(k_{i}\) are determined by Equations (8) and (15).