Finding the sum of rational expressions