solve linear equations with fractions