How do I combine the product rule and the chain rule in the simplest way possible?