Solving equations for unknown variables