how to solve a log equation