How to differentiate cos 8x using the Chain Rule