Solving equations using arithmetic operations