Ion acoustic solitary waves in density and temperature gradients