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