Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap04.section02

def RelativeMaxOn (S : Set ) (f : ) (c : ) :

Definition 4.2.1: A function f : S → ℝ has a relative maximum at c ∈ S if some δ > 0 satisfies f x ≤ f c whenever x ∈ S and |x - c| < δ. The notion of relative minimum reverses the inequality.

Equations
Instances For
    def RelativeMinOn (S : Set ) (f : ) (c : ) :
    Equations
    Instances For
      theorem relativeMaxOn_iff_isLocalMaxOn {S : Set } {f : } {c : } :

      The relative maximum defined via punctured-δ neighborhoods matches IsLocalMaxOn from mathlib.

      theorem relativeMinOn_iff_isLocalMinOn {S : Set } {f : } {c : } :

      The relative minimum defined via punctured-δ neighborhoods matches IsLocalMinOn from mathlib.

      theorem deriv_eq_zero_of_relative_extremum {f : } {a b c : } (hc : c Set.Ioo a b) (hf : DifferentiableAt f c) (hExt : RelativeMaxOn (Set.Ioo a b) f c RelativeMinOn (Set.Ioo a b) f c) :
      deriv f c = 0

      Lemma 4.2.2: If f : (a, b) → ℝ is differentiable at c ∈ (a, b) and has a relative minimum or maximum at c, then deriv f c = 0.

      theorem rolle {f : } {a b : } (h₁ : a < b) (hcont : ContinuousOn f (Set.Icc a b)) (hdiff : DifferentiableOn f (Set.Ioo a b)) (hend : f a = f b) :
      cSet.Ioo a b, deriv f c = 0

      Theorem 4.2.3 (Rolle): If f : [a, b] → ℝ is continuous on the closed interval, differentiable on the open interval, and satisfies f a = f b, then there exists some c ∈ (a, b) with deriv f c = 0.

      theorem mean_value_theorem {f : } {a b : } (h₁ : a < b) (hcont : ContinuousOn f (Set.Icc a b)) (hdiff : DifferentiableOn f (Set.Ioo a b)) :
      cSet.Ioo a b, f b - f a = deriv f c * (b - a)

      Theorem 4.2.4 (Mean value theorem): If f : [a, b] → ℝ is continuous on the closed interval and differentiable on the open interval, then some c ∈ (a, b) satisfies f b - f a = deriv f c * (b - a).

      theorem cauchy_mean_value_theorem {f φ : } {a b : } (hab : a < b) (hcont_f : ContinuousOn f (Set.Icc a b)) (hcont_φ : ContinuousOn φ (Set.Icc a b)) (hdiff_f : DifferentiableOn f (Set.Ioo a b)) (hdiff_φ : DifferentiableOn φ (Set.Ioo a b)) :
      cSet.Ioo a b, (f b - f a) * deriv φ c = deriv f c * (φ b - φ a)

      Theorem 4.2.5 (Cauchy's mean value theorem): If f, φ : [a, b] → ℝ are continuous on the closed interval and differentiable on the open interval, then some c ∈ (a, b) satisfies (f b - f a) * deriv φ c = deriv f c * (φ b - φ a).

      theorem deriv_zero_on_interval_const {I : Set } (hI : I.OrdConnected) {f : } (hdiff : DifferentiableOn f I) (hderiv : xI, deriv f x = 0) {x y : } :
      x Iy If x = f y

      Proposition 4.2.6: If I is an interval and f : I → ℝ is differentiable with deriv f x = 0 for every x ∈ I, then f is constant on I.

      theorem increasingOn_iff_deriv_nonneg {I : Set } (hI : I.OrdConnected) (hInt : (interior I).Nonempty) {f : } (hdiff : DifferentiableOn f I) :
      MonotoneOn f I xI, 0 deriv f x

      Proposition 4.2.7: For a differentiable real function on a nondegenerate interval, the derivative is nonnegative everywhere exactly when the function is increasing, and nonpositive everywhere exactly when the function is decreasing.

      theorem decreasingOn_iff_deriv_nonpos {I : Set } (hI : I.OrdConnected) (hInt : (interior I).Nonempty) {f : } (hdiff : DifferentiableOn f I) :
      AntitoneOn f I xI, deriv f x 0
      theorem strictMonoOn_of_deriv_pos' {I : Set } (hI : I.OrdConnected) {f : } (hdiff : DifferentiableOn f I) (hpos : xI, 0 < deriv f x) :

      Proposition 4.2.8:

      • (i) If I is an interval and f : I → ℝ is differentiable with deriv f x > 0 for every x ∈ I, then f is strictly increasing.
      • (ii) If I is an interval and f : I → ℝ is differentiable with deriv f x < 0 for every x ∈ I, then f is strictly decreasing.
      theorem strictAntiOn_of_deriv_neg' {I : Set } (hI : I.OrdConnected) {f : } (hdiff : DifferentiableOn f I) (hneg : xI, deriv f x < 0) :
      theorem mvt_le_of_deriv_nonpos {f : } {x y : } (hxy : x < y) (hcont : ContinuousOn f (Set.Icc x y)) (hdiff : DifferentiableOn f (Set.Ioo x y)) (hderiv : zSet.Ioo x y, deriv f z 0) :
      f y f x
      theorem mvt_ge_of_deriv_nonneg {f : } {x y : } (hxy : x < y) (hcont : ContinuousOn f (Set.Icc x y)) (hdiff : DifferentiableOn f (Set.Ioo x y)) (hderiv : zSet.Ioo x y, 0 deriv f z) :
      f x f y
      theorem absMinOf_deriv_nonpos_left_nonneg_right {f : } {a b c : } (hc : c Set.Ioo a b) (hcont : ContinuousOn f (Set.Ioo a b)) (hdiff₁ : DifferentiableOn f (Set.Ioo a c)) (hdiff₂ : DifferentiableOn f (Set.Ioo c b)) (hle : xSet.Ioo a c, deriv f x 0) (hge : xSet.Ioo c b, 0 deriv f x) :
      IsMinOn f (Set.Ioo a b) c

      Proposition 4.2.9: Let f : (a, b) → ℝ be continuous, let c ∈ (a, b), and assume f is differentiable on (a, c) and (c, b).

      • (i) If deriv f x ≤ 0 for x ∈ (a, c) and deriv f x ≥ 0 for x ∈ (c, b), then f has an absolute minimum at c.
      • (ii) If deriv f x ≥ 0 for x ∈ (a, c) and deriv f x ≤ 0 for x ∈ (c, b), then f has an absolute maximum at c.
      theorem absMaxOf_deriv_nonneg_left_nonpos_right {f : } {a b c : } (hc : c Set.Ioo a b) (hcont : ContinuousOn f (Set.Ioo a b)) (hdiff₁ : DifferentiableOn f (Set.Ioo a c)) (hdiff₂ : DifferentiableOn f (Set.Ioo c b)) (hge : xSet.Ioo a c, 0 deriv f x) (hle : xSet.Ioo c b, deriv f x 0) :
      IsMaxOn f (Set.Ioo a b) c
      theorem deriv_at_left_endpoint_of_tendsto {f : } {a b L : } (hab : a < b) (hcont : ContinuousOn f (Set.Icc a b)) (hdiff : DifferentiableOn f (Set.Ioo a b)) (hlim : Filter.Tendsto (fun (x : ) => deriv f x) (nhdsWithin a (Set.Ioi a)) (nhds L)) :

      Proposition 4.2.10:

      • (i) If f : [a, b) → ℝ is continuous, differentiable on (a, b), and lim_{x → a} f' x = L, then f is differentiable at a with deriv f a = L.
      • (ii) If f : (a, b] → ℝ is continuous, differentiable on (a, b), and lim_{x → b} f' x = L, then f is differentiable at b with deriv f b = L.
      theorem deriv_at_right_endpoint_of_tendsto {f : } {a b L : } (hab : a < b) (hcont : ContinuousOn f (Set.Icc a b)) (hdiff : DifferentiableOn f (Set.Ioo a b)) (hlim : Filter.Tendsto (fun (x : ) => deriv f x) (nhdsWithin b (Set.Iio b)) (nhds L)) :
      theorem derivWithin_left_eq_deriv {f : } {a b : } (hfa : DifferentiableAt f a) (h₁ : a < b) :
      derivWithin f (Set.Icc a b) a = deriv f a

      The derivative within the closed interval at the left endpoint equals the usual derivative when f is differentiable there.

      theorem derivWithin_right_eq_deriv {f : } {a b : } (hfb : DifferentiableAt f b) (h₁ : a < b) :
      derivWithin f (Set.Icc a b) b = deriv f b

      The derivative within the closed interval at the right endpoint equals the usual derivative when f is differentiable there.

      theorem darboux_deriv {f : } {a b y : } (h₁ : a < b) (hdiff : DifferentiableOn f (Set.Icc a b)) (ha : DifferentiableAt f a) (hb : DifferentiableAt f b) (hy : deriv f a < y y < deriv f b deriv f a > y y > deriv f b) :
      cSet.Ioo a b, deriv f c = y

      Theorem 4.2.11 (Darboux): If f : [a, b] → ℝ is differentiable and y lies strictly between deriv f a and deriv f b, then some c ∈ (a, b) has deriv f c = y.

      noncomputable def oscillatorySquared (x : ) :

      Example 4.2.12: the function x ↦ (x * sin (1/x))^2 is differentiable on , has derivative 0 at the origin, but its derivative is not continuous there.

      Equations
      Instances For
        noncomputable def oscSeq₁ (n : ) :
        Equations
        Instances For
          noncomputable def oscSeq₂ (n : ) :
          Equations
          Instances For
            theorem oscSeq₁_pos (n : ) :
            theorem oscSeq₂_pos (n : ) :
            theorem tendsto_nat_mul_add_const_atTop {a b : } (ha : 0 < a) :
            Filter.Tendsto (fun (n : ) => n * a + b) Filter.atTop Filter.atTop
            theorem deriv_oscillatorySquared_sign_changes (ε : ) :
            ε > 0∃ (x₁ : ) (x₂ : ), x₁ Set.Ioo (-ε) ε x₂ Set.Ioo (-ε) ε deriv oscillatorySquared x₁ < 0 deriv oscillatorySquared x₂ > 0