I've been stuck on this one for quite awhile and it'd be nice if someone can help me out.

I'm told to use the product and quotient rule, but that took me forever and I ended up getting a very long expression. Is there anyway that I can simplify the above expression first or can I use the chain rule? Because I think that's what the question is asking me to do.

Thanks in advance.

Also: I'm also stuck on y=xsinx/(1+cosx). If you can help me out on either one, you are a saviour. Thanks.