Solving differential equations by separating the variables