The function is .
Take logarithm of each side.
Power property of logarithms : .
Apply derivative on each side with respect to .
Product property of derivatives : .
Substitute in the above equation.