Analysis of Pile Foundations Subject to Static and Dynamic Loading