Mechanical analysis of stem length in hip prostheses