The function is
.
The function is in the form of composite function
.
Assume
and
.
Consider
.
Differentiate on each side with respect to
.

Consider
.
Differentiate on each side with respect to
.

Quotient rule of derivatives:
.
.
Chain Rule of derivatives:
.
Substitute
and
in chain rule.

.