Solving equations that contain log terms