Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap04.section03

noncomputable def taylorPolynomial (f : ) (x0 : ) (n : ) :

Definition 4.3.1: For an n-times differentiable function f near x0 ∈ ℝ, the nth-order Taylor polynomial at x0 is P_n^{x0}(x) = ∑_{k=0}^n f^(k)(x0) / k! * (x - x0)^k.

Equations
Instances For
    theorem iteratedDerivWithin_eq_iteratedDeriv_Icc {f : } {x0 x c : } {k n : } (hx0x : x0 < x) (hc : c Set.Ioo x0 x) (hcont : ContDiffOn (n + 1) f (Set.Icc x0 x)) (hk : k n + 1) :

    On an interior point of Icc x₀ x, within-iterated derivatives agree with ordinary ones.

    theorem taylorWithinEval_eq_taylorPolynomial {f : } {x0 x : } {n : } (hx0x : x0 < x) (hcontAt : ContDiffAt (n + 1) f x0) :

    Identify taylorWithinEval on an interval with the explicit Taylor polynomial.

    theorem taylor_with_remainder_pos {f : } {x0 x : } {n : } (hx0x : x0 < x) (hcont : ContDiffOn (n + 1) f (Set.Icc x0 x)) (hcontAt : ContDiffAt (n + 1) f x0) :
    cSet.Icc x0 x, f x = Polynomial.eval x (taylorPolynomial f x0 n) + iteratedDeriv (n + 1) f c / (n + 1).factorial * (x - x0) ^ (n + 1)

    Taylor's theorem on a positively oriented interval.

    theorem taylor_with_remainder_neg {f : } {x0 x : } {n : } (hx0x : x < x0) (hcont : ContDiffOn (n + 1) f (Set.Icc x x0)) (hcontAt : ContDiffAt (n + 1) f x0) :
    cSet.Icc x x0, f x = Polynomial.eval x (taylorPolynomial f x0 n) + iteratedDeriv (n + 1) f c / (n + 1).factorial * (x - x0) ^ (n + 1)

    Taylor's theorem on a negatively oriented interval, obtained by reflection.

    theorem taylor_with_remainder {f : } {a b x0 x : } {n : } (hx0 : x0 Set.Ioo a b) (hx : x Set.Icc a b) (hx0x : x0 x) (hcont : ContDiffOn (n + 1) f (Set.Icc a b)) :
    cSet.Icc (min x0 x) (max x0 x), f x = Polynomial.eval x (taylorPolynomial f x0 n) + iteratedDeriv (n + 1) f c / (n + 1).factorial * (x - x0) ^ (n + 1)

    Theorem 4.3.2 (Taylor): If f : ℝ → ℝ has n continuous derivatives on [a, b] and the (n+1)st derivative exists on (a, b), then for distinct points x₀, x ∈ [a, b] there is a point c between them such that f x = Pₙ^{x₀}(x) + f^{(n+1)}(c) / (n+1)! * (x - x₀)^{n+1}.

    theorem abs_sub_le_of_mem_interval {x x0 y : } (hy : y Set.Icc (min x x0) (max x x0)) :
    |y - x0| |x - x0|

    If y lies between x and x₀, then the distance from y to x₀ is bounded by the distance from x to x₀.

    theorem interval_subset_Ioo_of_abs_sub_lt {a b x0 x : } (hx0 : x0 Set.Ioo a b) (hx : |x - x0| < min (x0 - a) (b - x0)) :
    Set.Icc (min x x0) (max x x0) Set.Ioo a b

    Points sufficiently close to x₀ stay inside (a, b), and the whole interval between them and x₀ also lies in (a, b).

    theorem second_derivative_test {f : } {a b x0 : } (hx0 : x0 Set.Ioo a b) (hcont : ContDiffOn 2 f (Set.Ioo a b)) (hderiv_zero : deriv f x0 = 0) (hpos : deriv (deriv f) x0 > 0) :
    ε > 0, ∀ {x : }, x Set.Ioo a bx x0|x - x0| < εf x0 < f x

    Proposition 4.3.3 (Second derivative test). If f : (a, b) → ℝ is twice continuously differentiable, x0 ∈ (a, b), f' x0 = 0, and f'' x0 > 0, then x0 is a strict relative minimum of f.