In this case and
Then we have:
The rest is just simplifying.
The second one is similar to the first one. You can do this problem using the quotient rule.
(Note also: )
The third one is a combination of the chain rule and the product rule or by changing it a little bit can avoid the chain rule. (I assume that you know these two rules?)