The function is .
Let .
Apply derivative on each side with respect to .
.
Substitute in .
Substitute .
Chain rule of derivatives : .
Substitute and in the chain rule.