Computing derivatives using the chain rule.

Part of Computing derivatives using the chain rule.