Theorem 5.5 — the chain rule
ProvedRudin.ch05_chain_ruleLet be a real function differentiable at a point , and let be a real function differentiable at the point . Then the composite is differentiable at and
This is the chain rule. It is the rule that makes differentiation compatible with substitution, and in the chapter it is used to differentiate the compositions that arise in changes of variable and in the vector-valued theory at the end of the chapter.
Formalization Note Rudin states the theorem for continuous on and defined on an interval containing the range of ; here both functions are defined on all of , so those domain hypotheses are automatic and only the two differentiability hypotheses remain. Differentiability of the composite is asserted explicitly alongside the derivative formula, because the derivative operator used here is a total function that returns at points where the function is not differentiable.
import Mathlib open Filter Topology
namespace Rudin
/-- Rudin, Theorem 5.5 (chain rule): if `f` is differentiable at `x` and `g` is differentiable
at `f x`, then `t ↦ g (f t)` is differentiable at `x` with derivative `g'(f x) * f'(x)`. -/
theorem ch05_chain_rule (f g : ℝ → ℝ) (x : ℝ)
(hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g (f x)) :
DifferentiableAt ℝ (fun t => g (f t)) x ∧
deriv (fun t => g (f t)) x = deriv g (f x) * deriv f x := by sorry
end Rudin