solve an equation with algebraic fractions