Composite Function Differentiation via Chain Rule - Coding problem | OneNoughtOne