how to solve log equations