# Study on Stability of Elastic Compression Bending Bar in Viscoelastic Medium
## 2 Methods
### Deflection Function for an Elastic Compression-Bending Bar within an Elastic Medium
#### 2.1.3 Mechanical Model of an Elastic Compression-Bending Bar in an Elastic Medium
A Comprehensive Solution Formula for the Deflection of an Elastic Slender Bar within an Elastic Medium  
Based on the law of conservation of energy, the total potential energy of both the bar and the surrounding soil \(\Pi_{p}\) can be calculated when subjected to an axial force \(P\) and a horizontal additional load \(q(x)\) as shown in Equation (9) which is detailed introduced in Appendix B:  
\[\Pi_{p}=\frac{EI}{2}\int_{0}^{L}{(w^{\prime\prime})^{2}dx}+\frac{b_{1}}{2}\int _{0}^{L}{kw^{2}dx}-P\Delta x-b_{1}\int_{0}^{L}{qwdx} \tag{9}\]  
where: \(\Pi_{p}\) is total potential energy of both the bar and the surrounding soil  
\(E\) is elastic modulus of elastic bar  
\(I\) is moment of inertia of the cross section of elastic bar  
\(k\) is reaction force coefficient of elastic medium  
\(w\) is deflection of elastic bar as \(w(x)\)  
\(\Delta x\) is a small displacement caused by constant load \(p\)  
\(P\) is an axial force as shown in Figure 5  
As per the mechanical model depicted in Figure 5, the boundary conditions for the compressed bar are defined as follows: \(  
In accordance with the principle of minimum potential energy, for a system in a stable equilibrium state, \(\Pi_{p}\) must be minimized, which means the first-order derivative of \(\Pi_{p}\) is 0. This can be expressed as follows:  
\[ \begin{array}{ll}\frac{\partial\Pi_{p}}{\partial w_{r}}=&\sum\limits_{n=1}^{i }w_{n}\int_{0}^{L}\biggl{(}EI\frac{(2n-1)^{2}(2r-1)^{2}\pi^{4}}{16L^{4}}\cos \frac{(2n-1)\pi x}{2L}\cos\frac{(2r-1)\pi x}{2L}\\ &+b_{1}k\Bigl{(}1-\cos\frac{(2n-1)\pi x}{2L}\Bigr{)}\Bigl{(}1-\cos\frac{(2r-1) \pi x}{2L}\Bigr{)}\\ &-P\frac{(2n-1)(2r-1)\pi^{2}}{4L^{2}}\sin\frac{(2n-1)\pi x}{2L}\sin\frac{(2r-1 )\pi x}{2L}\biggr{)}dx\\ &-b_{1}\int_{0}^{L}q\Bigl{(}1-\cos\frac{(2r-1)\pi x}{2L}\Bigr{)}dx=0,r=1,2,3, \ldots,i\end{array}  \tag{12}\]  
Take:  
\[ \begin{array}{ll}W_{nr}=&\int_{0}^{L}\biggl{(}EI\frac{(2n-1)^{2}(2r-1)^{2} \pi^{4}}{16L^{4}}\cos\frac{(2n-1)\pi x}{2L}\cos\frac{(2r-1)\pi x}{2L}\\ &+b_{1}k\Bigl{(}1-\cos\frac{(2n-1)\pi x}{2L}\Bigr{)}\Bigl{(}1-\cos\frac{(2r-1 )\pi x}{2L}\Bigr{)}\\ &-P\frac{(2n-1)(2r-1)\pi^{2}}{4L^{2}}\sin\frac{(2n-1)\pi x}{2L}\sin\frac{(2r- 1)\pi x}{2L}\biggr{)}dx\\ \\ &Q_{r}=b_{1}\int_{0}^{L}q\biggl{(}1-\cos\frac{(2r-1)\pi x}{2L}\biggr{)}dx\\ \end{array}  \tag{13}\]  
Then Equation (11) can be transformed into Equation (14):  
\[\sum\limits_{r=1}^{i}\sum\limits_{n=1}^{i}(w_{n}W_{nr}-Q_{r})= \begin{bmatrix} W_{11}&W_{12}&\cdots&W_{1i}\\ W_{21}&W_{12}&\cdots&W_{2i}\\ \vdots&\vdots&\cdots&\vdots\\ W_{i1}&W_{i2}&\cdots&W_{ii}\end{bmatrix}\begin{bmatrix}w_{1}\\ w_{2}\\ \vdots\\ w_{i}\end{bmatrix} - \begin{bmatrix}Q_{1}\\ Q_{2}\\ \vdots\\ Q_{i}\end{bmatrix} =0 \tag{15}\]  
Equation (15) delineates the phase space formulation representation of an elastic bar within an elastic medium by the Laplace transform, which is prepared for viscoelastic medium illustrated in Equation (23). The time-dependency and spatial-dependency of the viscoelastic medium are transposed into a phase space via the Laplace transform. This process effectively decouples the time-dependency from the deformation process inherent in the viscoelastic medium. Consequently, the deformation issue concerning the elastic bar within the viscoelastic medium, as referenced in this study, is reduced to a problem devoid of time-dependency. Upon completion of the solution, the Laplace inverse transformation is employed. This reconfigures the deformation function of the bar from the resolved phase space formulation back to a general solution exhibiting both time-dependency and spatial-dependency. The outcome is a universal function capable of predicting terminal deformations of the bar. By solving Equation (15), the coefficients \(w_{n}\) of the deflection curve test function for the bar body can be obtained. This yields an approximate solution \(w(x)\) for the true displacement curve of the bar under varying axial loads \(P\). For instance, when \(i=2\) and \(k=m(L-x)\), solving Equation (15) results in:  
\[