Derivatives: chain rule and other advanced topics