Analysis of solitary waves in inhomogeneous systems