Chain Rule for Composite Functions

Calculus & Optimization DS practice problem on Onlearn.

Difficulty: medium.

Topics: Understanding the application of the Chain Rule in backpropagation, Chain Rule Formula, Derivative of Composite Functions, Forward-mode AD, Dual Numbers, Jacobian Matrix Computation, Calculus, Numerical Analysis, Optimization, Linear Algebra, Computational Graph Theory, Differential Calculus, Gradient Descent, Function Composition, Backpropagation Principles, Taylor Series Expansion.

Implement a forward mode automatic differentiation helper that computes the derivative of a composite function f(g(x)) at a point x, given the value and derivative of both inner and outer functions at the relevant points.