take derivative on a logarithm