Documentation

TauCeti.Analysis.Calculus.SecondDerivative

The second derivative as a derivative #

The second derivative fderiv ๐•œ (fderiv ๐•œ g) x of a map between normed spaces is, by definition, the derivative at x of the map fderiv ๐•œ g. Mathlib supplies the differentiability of fderiv ๐•œ g at a twice continuously differentiable point through ContDiffAt.fderiv_right; this file packages that into the single HasFDerivAt statement that second-order arguments use, so that the identification is made once rather than at each use.

An invertible second derivative therefore lets the differential avoid any prescribed value c on some punctured neighbourhood of the point, the neighbourhood being allowed to depend on c. That fixed-value avoidance is the local rigidity behind the isolation of nondegenerate critical points, and it asks nothing of the value taken.

The file also records that on an open set the second directional derivative x โ†ฆ D(Dg(ยท) v)(x) v of a Cยฒ map is continuous, and the second-order chain rule Dยฒ(f โˆ˜ ฯ†)(v, w) = Dยฒf(Dฯ† v, Dฯ† w) + Df(Dยฒฯ†(v, w)). At a point where the differential of the outer function vanishes the first-order term drops out, so the second derivative of a composition is the second derivative of the outer function evaluated on the images of the differential of the inner one, i.e. the second derivative transforms as a bilinear form. The second derivative of a separated sum ฯ† โˆ˜ Prod.fst + ฯˆ โˆ˜ Prod.snd on a product is the block-diagonal map built from the second derivatives of the summands. Finally, the second derivative of a directional derivative y โ†ฆ Dg(y) v is the third derivative of g evaluated at v, and differentiating the symmetry of the second derivative shows that the third derivative is symmetric in its last two directions. No statement here mentions critical points as such, so all of them belong here rather than with the Morse theory that uses them.

Main results #

theorem ContDiffAt.hasFDerivAt_fderiv {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] {n : WithTop โ„•โˆž} {g : E โ†’ F} {x : E} (h : ContDiffAt ๐•œ n g x) (hn : 2 โ‰ค n) :
HasFDerivAt (fderiv ๐•œ g) (fderiv ๐•œ (fderiv ๐•œ g) x) x

At a twice continuously differentiable point, fderiv ๐•œ g is differentiable, with derivative the second derivative of g.

theorem ContDiffOn.continuousOn_fderiv_fderiv_apply {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] {g : E โ†’ F} {s : Set E} (hg : ContDiffOn ๐•œ 2 g s) (hs : IsOpen s) (v : E) :
ContinuousOn (fun (x : E) => (fderiv ๐•œ (fun (y : E) => (fderiv ๐•œ g y) v) x) v) s

On an open set s, the second directional derivative x โ†ฆ D(Dg(ยท) v)(x) v of a Cยฒ map g in a fixed direction v is continuous.

theorem TauCeti.eventually_fderiv_ne {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] {g : E โ†’ F} {x : E} {c : E โ†’L[๐•œ] F} (hg : ContDiffAt ๐•œ 2 g x) (hinv : (fderiv ๐•œ (fderiv ๐•œ g) x).IsInvertible) :

Where the second derivative is invertible, the differential avoids any prescribed value near the point. Nothing is assumed about the value c, and in particular the differential need not vanish at x. The punctured neighbourhood on which c is avoided may depend on c, so this is avoidance of one fixed value rather than local injectivity of fderiv ๐•œ g.

theorem TauCeti.fderiv_fderiv_comp_apply {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} {G : Type u_4} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] [NormedAddCommGroup G] [NormedSpace ๐•œ G] {f : E โ†’ G} {ฯ† : F โ†’ E} {b : F} (hf : ContDiffAt ๐•œ 2 f (ฯ† b)) (hฯ† : ContDiffAt ๐•œ 2 ฯ† b) (v w : F) :
((fderiv ๐•œ (fderiv ๐•œ (f โˆ˜ ฯ†)) b) v) w = ((fderiv ๐•œ (fderiv ๐•œ f) (ฯ† b)) ((fderiv ๐•œ ฯ† b) v)) ((fderiv ๐•œ ฯ† b) w) + (fderiv ๐•œ f (ฯ† b)) (((fderiv ๐•œ (fderiv ๐•œ ฯ†) b) v) w)

The second-order chain rule. If f is Cยฒ at ฯ† b and ฯ† is Cยฒ at b, then the second derivative of f โˆ˜ ฯ† at b is Dยฒf(ฯ† b)(Dฯ† v, Dฯ† w) + Df(ฯ† b)(Dยฒฯ†(v, w)).

theorem TauCeti.fderiv_fderiv_comp_apply_of_fderiv_eq_zero {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} {G : Type u_4} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] [NormedAddCommGroup G] [NormedSpace ๐•œ G] {f : E โ†’ G} {ฯ† : F โ†’ E} {b : F} (hf : ContDiffAt ๐•œ 2 f (ฯ† b)) (hฯ† : ContDiffAt ๐•œ 2 ฯ† b) (hc : fderiv ๐•œ f (ฯ† b) = 0) (v w : F) :
((fderiv ๐•œ (fderiv ๐•œ (f โˆ˜ ฯ†)) b) v) w = ((fderiv ๐•œ (fderiv ๐•œ f) (ฯ† b)) ((fderiv ๐•œ ฯ† b) v)) ((fderiv ๐•œ ฯ† b) w)

The second derivative at a critical point is a bilinear form pullback. If f is Cยฒ at ฯ† b, ฯ† is Cยฒ at b, and the differential of f vanishes at ฯ† b, then the second derivative of f โˆ˜ ฯ† at b is the second derivative of f at ฯ† b evaluated on the images of the differential of ฯ†.

theorem TauCeti.fderiv_fderiv_comp_fst_add_comp_snd {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} {G : Type u_4} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] [NormedAddCommGroup G] [NormedSpace ๐•œ G] {ฯ† : E โ†’ G} {ฯˆ : F โ†’ G} {a : E} {b : F} (hฯ† : ContDiffAt ๐•œ 2 ฯ† a) (hฯˆ : ContDiffAt ๐•œ 2 ฯˆ b) :
fderiv ๐•œ (fderiv ๐•œ (ฯ† โˆ˜ Prod.fst + ฯˆ โˆ˜ Prod.snd)) (a, b) = โ†‘(ContinuousLinearMap.coprodEquivL ๐•œ) โˆ˜SL (fderiv ๐•œ (fderiv ๐•œ ฯ†) a).prodMap (fderiv ๐•œ (fderiv ๐•œ ฯˆ) b)

The second derivative of a separated sum ฯ† โˆ˜ Prod.fst + ฯˆ โˆ˜ Prod.snd at (a, b) is block diagonal: it sends (v, w) to the coproduct of Dยฒฯ† a v and Dยฒฯˆ b w, i.e. to the functional (v', w') โ†ฆ Dยฒฯ† a v v' + Dยฒฯˆ b w w'.

theorem TauCeti.fderiv_fderiv_fderiv_apply {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] {g : E โ†’ F} {x : E} (hg : ContDiffAt ๐•œ 3 g x) (v a b : E) :
((fderiv ๐•œ (fderiv ๐•œ fun (y : E) => (fderiv ๐•œ g y) v) x) a) b = (((fderiv ๐•œ (fderiv ๐•œ (fderiv ๐•œ g)) x) a) b) v

The second derivative of the directional derivative y โ†ฆ Dg(y) v of a Cยณ map g is the third derivative of g, evaluated at v.

theorem TauCeti.fderiv_fderiv_fderiv_apply_comm {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [NontriviallyNormedField ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] {n : WithTop โ„•โˆž} {g : E โ†’ F} {x : E} (hg : ContDiffAt ๐•œ n g x) (hn : minSmoothness ๐•œ 3 โ‰ค n) (a b c : E) :
(((fderiv ๐•œ (fderiv ๐•œ (fderiv ๐•œ g)) x) a) b) c = (((fderiv ๐•œ (fderiv ๐•œ (fderiv ๐•œ g)) x) a) c) b

The third derivative is symmetric in its last two directions. For a map that is C^{minSmoothness ๐•œ 3} at x (so Cยณ over โ„ or โ„‚), differentiating the symmetry of the second derivative near x gives Dยณg(x)(a, b, c) = Dยณg(x)(a, c, b).