Static and Dynamic Analysis of Piles in Inhomogeneous Soil