solve differential equation with substitution