solving algebraic equations with fractions