Solving logarithmic expressions