Theorem 5.3(a,b) — the derivative of a sum and of a product
ProvedRudin.ch05_deriv_sum_productLet and be real functions of a real variable and let be a point at which both and are differentiable. Then the sum and the product are differentiable at , and their derivatives are
These are the first two parts of the elementary algebra of derivatives. Together with the quotient rule and the chain rule they reduce the differentiation of any expression built from differentiable functions to the derivatives of its constituents, and they are used silently throughout the rest of the chapter — for instance in forming the auxiliary function of the generalized mean value theorem and the remainder function of Taylor's theorem.
Formalization Note Differentiability is asserted explicitly alongside each 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.3 (a), (b): if `f` and `g` are differentiable at `x`, then so are `f + g`
and `f * g`, and `(f + g)'(x) = f'(x) + g'(x)`, `(f g)'(x) = f'(x) g(x) + f(x) g'(x)`. -/
theorem ch05_deriv_sum_product (f g : ℝ → ℝ) (x : ℝ)
(hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) :
DifferentiableAt ℝ (fun t => f t + g t) x ∧
deriv (fun t => f t + g t) x = deriv f x + deriv g x ∧
DifferentiableAt ℝ (fun t => f t * g t) x ∧
deriv (fun t => f t * g t) x = deriv f x * g x + f x * deriv g x := by sorry
end Rudin