Imports
/-
Copyright (c) 2026 Florian Wiesner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Giuseppe Sorge, Florian Wiesner
-/
module
public import Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp
public import Mathlib.Analysis.ODE.ExistUniqueSolutions to the damped harmonic oscillator
i. Overview
In this module we define the solution to the damped harmonic oscillator for given initial conditions and prove that it satisfies the equation of motion. The solution selects the appropriate closed form from the sign of the discriminant: trigonometric for the underdamped case, polynomial for the critically damped case, and hyperbolic for the overdamped case.
ii. Key results
InitialConditions is a structure for the initial position and velocity.
trajectory selects the appropriate regime-specific trajectory from the sign of the
discriminant.
trajectory_equationOfMotion_of_underdamped,
trajectory_equationOfMotion_of_criticallyDamped, and
trajectory_equationOfMotion_of_overdamped prove the selected trajectory satisfies the
equation of motion in each damping regime.
trajectory_equationOfMotion proves that the selected trajectory satisfies the equation
of motion.
equationOfMotion_unique proves that two smooth solutions with the same initial data agree, and
trajectories_unique proves that the selected trajectory is the unique solution with the given
initial conditions.
iii. Table of contents
A. The initial conditions
B. Trajectories associated with the initial conditions
B.1. Regime-specific base trajectories
B.2. The selected trajectory
B.3. Shared calculus lemmas
B.4. Derivatives of the base trajectories
C. Trajectories and equation of motion
C.1. The selected trajectory satisfies the equation of motion
C.2. Uniqueness of the solutions
iv. References
References for the damped harmonic oscillator include:
Landau & Lifshitz, Mechanics, page 76, section 25.
Goldstein, Classical Mechanics, Chapter 2.
@[expose] public sectionA. The initial conditions
We define the type of initial conditions for the damped harmonic oscillator. The initial
conditions are the position and velocity at time 0.
The initial conditions for the damped harmonic oscillator, specified by an initial position and an initial velocity.
The initial position of the damped harmonic oscillator.
The initial velocity of the damped harmonic oscillator.
@[ext]
structure InitialConditions where x₀ : EuclideanSpace ℝ (Fin 1) v₀ : EuclideanSpace ℝ (Fin 1)B. Trajectories associated with the initial conditions
For each damping regime, we give an explicit formula for the trajectory with the specified initial conditions.
B.1. Regime-specific base trajectories
B.2. The selected trajectory
In the underdamped regime, the selected trajectory uses the trigonometric base.
lemma trajectory_eq_of_underdamped (IC : InitialConditions) (hS : S.IsUnderdamped) :
S.trajectory IC =
fun t : Time => exp (-S.decayRate * t) • S.underdampedBase IC t := S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
classical
All goals completed! 🐙In the critically damped regime, the selected trajectory uses the polynomial base.
S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhnotUnder:¬S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
simp [trajectory, hnotUnder, hS] All goals completed! 🐙In the overdamped regime, the selected trajectory uses the hyperbolic base.
lemma trajectory_eq_of_overdamped (IC : InitialConditions) (hS : S.IsOverdamped) :
S.trajectory IC =
fun t : Time => exp (-S.decayRate * t) • S.overdampedBase IC t := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
classical
rw [IsOverdamped S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t] at hS S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
have hnotUnder : ¬ S.IsUnderdamped := by
rw [IsUnderdamped S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ ¬S.discriminant < 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ ¬S.discriminant < 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminant⊢ ¬S.discriminant < 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
linarith S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
have hnotCritical : ¬ S.IsCriticallyDamped := by
rw [IsCriticallyDamped S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ ¬S.discriminant = 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ ¬S.discriminant = 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdampedhnotCritical:¬S.IsCriticallyDamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdamped⊢ ¬S.discriminant = 0 S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdampedhnotCritical:¬S.IsCriticallyDamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
linarith S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdampedhnotCritical:¬S.IsCriticallyDamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:0 < S.discriminanthnotUnder:¬S.IsUnderdampedhnotCritical:¬S.IsCriticallyDamped⊢ S.trajectory IC = fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
simp [trajectory, hnotUnder, hnotCritical] All goals completed! 🐙The selected trajectory is smooth.
lemma trajectory_contDiff (IC : InitialConditions) :
ContDiff ℝ ∞ (S.trajectory IC) := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ ContDiff ℝ ∞ (S.trajectory IC)
rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ (S.trajectory IC)inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ (S.trajectory IC)inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ (S.trajectory IC)
· inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ (S.trajectory IC) rw [S.trajectory_eq_of_underdamped IC hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t] inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
unfold underdampedBase inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ContDiff ℝ ∞ fun t =>
rexp (-S.decayRate * t.val) •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
fun_prop All goals completed! 🐙
· inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ (S.trajectory IC) rw [S.trajectory_eq_of_criticallyDamped IC hS inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t]inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
unfold criticallyDampedBase inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • (IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀))
fun_prop All goals completed! 🐙
· inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ (S.trajectory IC) rw [S.trajectory_eq_of_overdamped IC hS inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t]inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
unfold overdampedBase inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ContDiff ℝ ∞ fun t =>
rexp (-S.decayRate * t.val) •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
fun_prop All goals completed! 🐙
The selected trajectory has initial position IC.x₀.
lemma trajectory_apply_zero (IC : InitialConditions) : S.trajectory IC 0 = IC.x₀ := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ S.trajectory IC 0 = IC.x₀
rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.trajectory IC 0 = IC.x₀inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.trajectory IC 0 = IC.x₀inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.trajectory IC 0 = IC.x₀
· inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.trajectory IC 0 = IC.x₀ rw [S.trajectory_eq_of_underdamped IC hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t) 0 = IC.x₀ inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t) 0 = IC.x₀] inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t) 0 = IC.x₀
simp [underdampedBase] All goals completed! 🐙
· inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.trajectory IC 0 = IC.x₀ rw [S.trajectory_eq_of_criticallyDamped IC hS inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t) 0 = IC.x₀ inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t) 0 = IC.x₀]inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t) 0 = IC.x₀
simp [criticallyDampedBase] All goals completed! 🐙
· inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.trajectory IC 0 = IC.x₀ rw [S.trajectory_eq_of_overdamped IC hS inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t) 0 = IC.x₀ inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t) 0 = IC.x₀]inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t) 0 = IC.x₀
simp [overdampedBase] All goals completed! 🐙B.3. Shared calculus lemmas
The three solution formulas all have the form exp (-a * t) • y t. The following private
lemmas compute the first and second derivatives of that expression and package the common
equation-of-motion argument.
private lemma exp_decay_smul_velocity
(a : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1)) (hy : Differentiable ℝ y) :
∂ₜ (fun t : Time => exp (-a * t.val) • y t) =
fun t : Time => exp (-a * t.val) • (∂ₜ y t - a • y t) := by a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ y⊢ (∂ₜ fun t => rexp (-a * t.val) • y t) = fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)
funext t a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ ∂ₜ (fun t => rexp (-a * t.val) • y t) t = rexp (-a * t.val) • (∂ₜ y t - a • y t)
rw [Time.deriv a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • y t) t) 1 = rexp (-a * t.val) • (∂ₜ y t - a • y t) a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • y t) t) 1 = rexp (-a * t.val) • (∂ₜ y t - a • y t)] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • y t) t) 1 = rexp (-a * t.val) • (∂ₜ y t - a • y t)
rw [fderiv_fun_smul (by a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ DifferentiableAt ℝ (fun t => rexp (-a * t.val)) t a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t + (fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (y t)) 1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t) fun_prop All goals completed! 🐙 a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t + (fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (y t)) 1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t)) (hy t)] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t + (fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (y t)) 1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t)
rw [fderiv_exp (by a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ DifferentiableAt ℝ (fun t => -a * t.val) t a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t) fun_prop All goals completed! 🐙 a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t)), fderiv_fun_mul (by a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ DifferentiableAt ℝ (fun t => -a) t a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t) fun_prop All goals completed! 🐙 a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t)) (by a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ DifferentiableAt ℝ val t a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t) fun_prop All goals completed! 🐙 a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t))] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ (rexp (-a * t.val) • fderiv ℝ y t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (y t))
1 =
rexp (-a * t.val) • (∂ₜ y t - a • y t)
simp only [add_apply, ContinuousLinearMap.smulRight_apply,
fderiv_fun_neg, fderiv_fun_const, Pi.zero_apply, Time.fderiv_val,
_root_.neg_apply, FunLike.coe_smul, Pi.smul_apply, smul_eq_mul] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ rexp (-a * t.val) • (fderiv ℝ y t) 1 + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • y t =
rexp (-a * t.val) • (∂ₜ y t - a • y t)
rw [← Time.deriv_eq a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ rexp (-a * t.val) • ∂ₜ y t + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • y t =
rexp (-a * t.val) • (∂ₜ y t - a • y t) a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ rexp (-a * t.val) • ∂ₜ y t + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • y t =
rexp (-a * t.val) • (∂ₜ y t - a • y t)] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ rexp (-a * t.val) • ∂ₜ y t + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • y t =
rexp (-a * t.val) • (∂ₜ y t - a • y t)
simp [smul_sub, smul_smul] a:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yt:Time⊢ rexp (-(a * t.val)) • ∂ₜ y t + -((rexp (-(a * t.val)) * a) • y t) =
rexp (-(a * t.val)) • ∂ₜ y t - (rexp (-(a * t.val)) * a) • y t
module All goals completed! 🐙
private lemma exp_decay_smul_acceleration
(a μ : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1))
(hy : Differentiable ℝ y) (hdy : Differentiable ℝ (∂ₜ y))
(hy'' : ∂ₜ (∂ₜ y) = fun t => μ • y t) :
∂ₜ (∂ₜ (fun t : Time => exp (-a * t.val) • y t)) =
fun t : Time => exp (-a * t.val) •
(μ • y t - (2 * a) • ∂ₜ y t + a^2 • y t) := by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y t⊢ ∂ₜ (∂ₜ fun t => rexp (-a * t.val) • y t) = fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [exp_decay_smul_velocity a y hy a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y t⊢ (∂ₜ fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) = fun t =>
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y t⊢ (∂ₜ fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) = fun t =>
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y t⊢ (∂ₜ fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) = fun t =>
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
funext t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ ∂ₜ (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t = rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [Time.deriv a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t) 1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t) 1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (fderiv ℝ (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t) 1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [fderiv_fun_smul (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ (fun t => rexp (-a * t.val)) t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ (fun t => ∂ₜ y t - a • y t) t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t))] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(fderiv ℝ (fun t => rexp (-a * t.val)) t).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [fderiv_exp (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ (fun t => -a * t.val) t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)), fderiv_fun_mul (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ (fun t => -a) t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ val t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t))] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • fderiv ℝ (fun t => ∂ₜ y t - a • y t) t +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [fderiv_fun_sub (hdy t) (by a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ DifferentiableAt ℝ (fun t => a • y t) t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - fderiv ℝ (fun t => a • y t) t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) fun_prop All goals completed! 🐙 a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - fderiv ℝ (fun t => a • y t) t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t))] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - fderiv ℝ (fun t => a • y t) t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [fderiv_fun_const_smul (hy t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Time⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
have hy''_t := congrFun hy'' t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:∂ₜ (∂ₜ y) t = μ • y t⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [Time.deriv a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)] at hy''_t a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ (rexp (-a * t.val) • (fderiv ℝ (∂ₜ y) t - a • fderiv ℝ y t) +
(rexp (-a * t.val) • (-a • fderiv ℝ val t + t.val • fderiv ℝ (fun t => -a) t)).smulRight (∂ₜ y t - a • y t))
1 =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
simp only [add_apply, _root_.sub_apply,
ContinuousLinearMap.smulRight_apply, fderiv_fun_neg, fderiv_fun_const,
Pi.zero_apply, Time.fderiv_val, _root_.neg_apply,
FunLike.coe_smul, Pi.smul_apply, smul_eq_mul] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • ((fderiv ℝ (∂ₜ y) t) 1 - a • (fderiv ℝ y t) 1) +
(rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
rw [hy''_t, a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • (μ • y t - a • (fderiv ℝ y t) 1) +
(rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • (μ • y t - a • ∂ₜ y t) + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) ← Time.deriv_eq a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • (μ • y t - a • ∂ₜ y t) + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t) a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • (μ • y t - a • ∂ₜ y t) + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ rexp (-a * t.val) • (μ • y t - a • ∂ₜ y t) + (rexp (-a * t.val) * (-a * 1 + t.val * -0 1)) • (∂ₜ y t - a • y t) =
rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)
simp [smul_add, smul_sub, smul_smul] a:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y tt:Timehy''_t:(fderiv ℝ (∂ₜ y) t) 1 = μ • y t⊢ (rexp (-(a * t.val)) * μ) • y t - (rexp (-(a * t.val)) * a) • ∂ₜ y t +
(-((rexp (-(a * t.val)) * a) • ∂ₜ y t) + (rexp (-(a * t.val)) * a * a) • y t) =
(rexp (-(a * t.val)) * μ) • y t - (rexp (-(a * t.val)) * (2 * a)) • ∂ₜ y t + (rexp (-(a * t.val)) * a ^ 2) • y t
module All goals completed! 🐙
private lemma exp_decay_smul_equationOfMotion
(a μ : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1))
(hy : Differentiable ℝ y) (hdy : Differentiable ℝ (∂ₜ y))
(hy'' : ∂ₜ (∂ₜ y) = fun t => μ • y t)
(hγ : S.γ = 2 * S.m * a) (hk : S.k = S.m * (a^2 - μ)) :
S.EquationOfMotion (fun t : Time => exp (-a * t.val) • y t) := by S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)⊢ S.EquationOfMotion fun t => rexp (-a * t.val) • y t
intro t S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • ∂ₜ (∂ₜ fun t => rexp (-a * t.val) • y t) t + S.γ • ∂ₜ (fun t => rexp (-a * t.val) • y t) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0
rw [exp_decay_smul_acceleration a μ y hy hdy hy'' S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • ∂ₜ (fun t => rexp (-a * t.val) • y t) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0 S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • ∂ₜ (fun t => rexp (-a * t.val) • y t) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0] S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • ∂ₜ (fun t => rexp (-a * t.val) • y t) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0
rw [exp_decay_smul_velocity a y hy S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0 S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0] S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
S.γ • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0
rw [hγ, S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
(2 * S.m * a) • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
S.k • (fun t => rexp (-a * t.val) • y t) t =
0 S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
(2 * S.m * a) • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
(S.m * (a ^ 2 - μ)) • (fun t => rexp (-a * t.val) • y t) t =
0 hk S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
(2 * S.m * a) • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
(S.m * (a ^ 2 - μ)) • (fun t => rexp (-a * t.val) • y t) t =
0 S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
(2 * S.m * a) • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
(S.m * (a ^ 2 - μ)) • (fun t => rexp (-a * t.val) • y t) t =
0] S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ S.m • (fun t => rexp (-a * t.val) • (μ • y t - (2 * a) • ∂ₜ y t + a ^ 2 • y t)) t +
(2 * S.m * a) • (fun t => rexp (-a * t.val) • (∂ₜ y t - a • y t)) t +
(S.m * (a ^ 2 - μ)) • (fun t => rexp (-a * t.val) • y t) t =
0
simp [smul_add, smul_sub, smul_smul] S:DampedHarmonicOscillatora:ℝμ:ℝy:Time → EuclideanSpace ℝ (Fin 1)hy:Differentiable ℝ yhdy:Differentiable ℝ (∂ₜ y)hy'':∂ₜ (∂ₜ y) = fun t => μ • y thγ:S.γ = 2 * S.m * ahk:S.k = S.m * (a ^ 2 - μ)t:Time⊢ (S.m * (rexp (-(a * t.val)) * μ)) • y t - (S.m * (rexp (-(a * t.val)) * (2 * a))) • ∂ₜ y t +
(S.m * (rexp (-(a * t.val)) * a ^ 2)) • y t +
((2 * S.m * a * rexp (-(a * t.val))) • ∂ₜ y t - (2 * S.m * a * (rexp (-(a * t.val)) * a)) • y t) +
(S.m * (a ^ 2 - μ) * rexp (-(a * t.val))) • y t =
0
module All goals completed! 🐙B.4. Derivatives of the base trajectories
The remaining private lemmas compute the velocity and acceleration of the trigonometric, polynomial, and hyperbolic base trajectories before the exponential decay factor is applied.
private lemma criticallyDampedBase_velocity (IC : InitialConditions) :
∂ₜ (S.criticallyDampedBase IC) =
fun _ : Time => IC.v₀ + S.decayRate • IC.x₀ := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ ∂ₜ (S.criticallyDampedBase IC) = fun x => IC.v₀ + S.decayRate • IC.x₀
funext t S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ ∂ₜ (S.criticallyDampedBase IC) t = IC.v₀ + S.decayRate • IC.x₀
change ∂ₜ (fun t : Time =>
IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)) t = _ S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ ∂ₜ (fun t => IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)) t = IC.v₀ + S.decayRate • IC.x₀
rw [Time.deriv_eq, S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (fderiv ℝ (fun t => IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)) t) 1 = IC.v₀ + S.decayRate • IC.x₀ S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀ fderiv_fun_add (by S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ DifferentiableAt ℝ (fun t => IC.x₀) t S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀ fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀) (by S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ DifferentiableAt ℝ (fun t => t.val • (IC.v₀ + S.decayRate • IC.x₀)) t S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀ fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀),
fderiv_fun_const, S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + fderiv ℝ (fun t => t.val • (IC.v₀ + S.decayRate • IC.x₀)) t) 1 = IC.v₀ + S.decayRate • IC.x₀ S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀ fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ DifferentiableAt ℝ val t S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀ fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀)] S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ (0 t + (fderiv ℝ val t).smulRight (IC.v₀ + S.decayRate • IC.x₀)) 1 = IC.v₀ + S.decayRate • IC.x₀
simp All goals completed! 🐙
private lemma criticallyDampedBase_acceleration (IC : InitialConditions) :
∂ₜ (∂ₜ (S.criticallyDampedBase IC)) =
fun _ => (0 : EuclideanSpace ℝ (Fin 1)) := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ ∂ₜ (∂ₜ (S.criticallyDampedBase IC)) = fun x => 0
rw [criticallyDampedBase_velocity S:DampedHarmonicOscillatorIC:InitialConditions⊢ (∂ₜ fun x => IC.v₀ + S.decayRate • IC.x₀) = fun x => 0 S:DampedHarmonicOscillatorIC:InitialConditions⊢ (∂ₜ fun x => IC.v₀ + S.decayRate • IC.x₀) = fun x => 0] S:DampedHarmonicOscillatorIC:InitialConditions⊢ (∂ₜ fun x => IC.v₀ + S.decayRate • IC.x₀) = fun x => 0
funext t S:DampedHarmonicOscillatorIC:InitialConditionst:Time⊢ ∂ₜ (fun x => IC.v₀ + S.decayRate • IC.x₀) t = 0
simp All goals completed! 🐙
private lemma underdampedBase_velocity (IC : InitialConditions) (hS : S.IsUnderdamped) :
∂ₜ (fun t : Time =>
cos (S.angularFrequency * t.val) • IC.x₀ +
(sin (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀)) =
fun t : Time =>
(-S.angularFrequency * sin (S.angularFrequency * t.val)) • IC.x₀ +
cos (S.angularFrequency * t.val) •
(IC.v₀ + S.decayRate • IC.x₀) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
have hΩ : S.angularFrequency ≠ 0 := S.angularFrequency_ne_zero_of_underdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
funext t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Time⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
have fderiv_comp_val_eq_deriv : ∀ g : ℝ → ℝ, DifferentiableAt ℝ g t.val →
(fderiv ℝ (fun s : Time => g s.val) t) 1 = _root_.deriv g t.val := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
intro g hg S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [fderiv_fun_comp t hg (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ DifferentiableAt ℝ val t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)), ContinuousLinearMap.comp_apply, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) ((fderiv ℝ val t) 1) = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) Time.fderiv_val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [Time.deriv_eq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ
(fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t)
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fderiv_fun_add (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cos (S.angularFrequency * t.val) • IC.x₀) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ
(fun t => (Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)),
fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)), fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp only [add_apply, ContinuousLinearMap.smulRight_apply] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t) 1 • IC.x₀ +
(fderiv ℝ (fun t => Real.sin (S.angularFrequency * t.val) / S.angularFrequency) t) 1 •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [fderiv_comp_val_eq_deriv (fun s => cos (S.angularFrequency * s)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.cos (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)),
fderiv_comp_val_eq_deriv (fun s => sin (S.angularFrequency * s) / S.angularFrequency)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sin (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp [mul_comm, hΩ] All goals completed! 🐙
private lemma underdampedBase_acceleration (IC : InitialConditions) (hS : S.IsUnderdamped) :
∂ₜ (∂ₜ (fun t : Time =>
cos (S.angularFrequency * t.val) • IC.x₀ +
(sin (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀))) =
fun t : Time => -S.angularFrequency^2 •
(cos (S.angularFrequency * t.val) • IC.x₀ +
(sin (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀)) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ∂ₜ
(∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
have hΩ : S.angularFrequency ≠ 0 := S.angularFrequency_ne_zero_of_underdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0⊢ ∂ₜ
(∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [S.underdampedBase_velocity IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
funext t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Time⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
have fderiv_comp_val_eq_deriv : ∀ g : ℝ → ℝ, DifferentiableAt ℝ g t.val →
(fderiv ℝ (fun s : Time => g s.val) t) 1 = _root_.deriv g t.val := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ∂ₜ
(∂ₜ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
intro g hg S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [fderiv_fun_comp t hg (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ DifferentiableAt ℝ val t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))), ContinuousLinearMap.comp_apply, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) ((fderiv ℝ val t) 1) = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) Time.fderiv_val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [Time.deriv_eq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ
(fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t)
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fderiv_fun_add (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => (-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))),
fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))), fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp only [add_apply, ContinuousLinearMap.smulRight_apply] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ (fun t => -S.angularFrequency * Real.sin (S.angularFrequency * t.val)) t) 1 • IC.x₀ +
(fderiv ℝ (fun t => Real.cos (S.angularFrequency * t.val)) t) 1 • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [fderiv_comp_val_eq_deriv (fun s => -S.angularFrequency * sin (S.angularFrequency * s))
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))),
fderiv_comp_val_eq_deriv (fun s => cos (S.angularFrequency * s)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.cos (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => -S.angularFrequency * Real.sin (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cos (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
-S.angularFrequency ^ 2 •
(Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp [mul_comm, smul_smul, smul_add] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ -((S.angularFrequency * (S.angularFrequency * Real.cos (t.val * S.angularFrequency))) • IC.x₀) +
(-((S.angularFrequency * Real.sin (t.val * S.angularFrequency)) • IC.v₀) +
-((S.angularFrequency * Real.sin (t.val * S.angularFrequency) * S.decayRate) • IC.x₀)) =
-((S.angularFrequency ^ 2 * Real.cos (t.val * S.angularFrequency)) • IC.x₀) +
(-((S.angularFrequency ^ 2 * (Real.sin (t.val * S.angularFrequency) / S.angularFrequency)) • IC.v₀) +
-((S.angularFrequency ^ 2 * (Real.sin (t.val * S.angularFrequency) / S.angularFrequency * S.decayRate)) • IC.x₀))
field_simp [hΩ] All goals completed! 🐙
private lemma overdampedBase_velocity (IC : InitialConditions) (hS : S.IsOverdamped) :
∂ₜ (fun t : Time =>
cosh (S.angularFrequency * t.val) • IC.x₀ +
(sinh (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀)) =
fun t : Time =>
(S.angularFrequency * sinh (S.angularFrequency * t.val)) • IC.x₀ +
cosh (S.angularFrequency * t.val) •
(IC.v₀ + S.decayRate • IC.x₀) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
have hΩ : S.angularFrequency ≠ 0 := S.angularFrequency_ne_zero_of_overdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
funext t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Time⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
have fderiv_comp_val_eq_deriv : ∀ g : ℝ → ℝ, DifferentiableAt ℝ g t.val →
(fderiv ℝ (fun s : Time => g s.val) t) 1 = _root_.deriv g t.val := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
intro g hg S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [fderiv_fun_comp t hg (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ DifferentiableAt ℝ val t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)), ContinuousLinearMap.comp_apply, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) ((fderiv ℝ val t) 1) = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) Time.fderiv_val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [Time.deriv_eq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ
(fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
t)
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fderiv_fun_add (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cosh (S.angularFrequency * t.val) • IC.x₀) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ
(fun t => (Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)),
fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)), fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t).smulRight
(IC.v₀ + S.decayRate • IC.x₀))
1 =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp only [add_apply, ContinuousLinearMap.smulRight_apply] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t) 1 • IC.x₀ +
(fderiv ℝ (fun t => Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) t) 1 •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
rw [fderiv_comp_val_eq_deriv (fun s => cosh (S.angularFrequency * s)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.cosh (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)),
fderiv_comp_val_eq_deriv (fun s => sinh (S.angularFrequency * s) / S.angularFrequency)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.sinh (S.angularFrequency * s) / S.angularFrequency) t.val •
(IC.v₀ + S.decayRate • IC.x₀) =
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
simp [mul_comm, hΩ] All goals completed! 🐙
private lemma overdampedBase_acceleration (IC : InitialConditions) (hS : S.IsOverdamped) :
∂ₜ (∂ₜ (fun t : Time =>
cosh (S.angularFrequency * t.val) • IC.x₀ +
(sinh (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀))) =
fun t : Time => S.angularFrequency^2 •
(cosh (S.angularFrequency * t.val) • IC.x₀ +
(sinh (S.angularFrequency * t.val) / S.angularFrequency) •
(IC.v₀ + S.decayRate • IC.x₀)) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ∂ₜ
(∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
have hΩ : S.angularFrequency ≠ 0 := S.angularFrequency_ne_zero_of_overdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0⊢ ∂ₜ
(∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [S.overdampedBase_velocity IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0⊢ (∂ₜ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
funext t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Time⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
have fderiv_comp_val_eq_deriv : ∀ g : ℝ → ℝ, DifferentiableAt ℝ g t.val →
(fderiv ℝ (fun s : Time => g s.val) t) 1 = _root_.deriv g t.val := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ∂ₜ
(∂ₜ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) =
fun t =>
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
intro g hg S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [fderiv_fun_comp t hg (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ DifferentiableAt ℝ val t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))), ContinuousLinearMap.comp_apply, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) ((fderiv ℝ val t) 1) = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) Time.fderiv_val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timeg:ℝ → ℝhg:DifferentiableAt ℝ g t.val⊢ (fderiv ℝ g t.val) 1 = _root_.deriv g t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ∂ₜ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [Time.deriv_eq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ
(fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t)
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fderiv_fun_add (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => (S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))),
fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))), fderiv_smul_const (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ ((fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t).smulRight IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t).smulRight (IC.v₀ + S.decayRate • IC.x₀))
1 =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp only [add_apply, ContinuousLinearMap.smulRight_apply] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (fderiv ℝ (fun t => S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) t) 1 • IC.x₀ +
(fderiv ℝ (fun t => Real.cosh (S.angularFrequency * t.val)) t) 1 • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
rw [fderiv_comp_val_eq_deriv (fun s => S.angularFrequency * sinh (S.angularFrequency * s))
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))),
fderiv_comp_val_eq_deriv (fun s => cosh (S.angularFrequency * s)) (by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ DifferentiableAt ℝ (fun s => Real.cosh (S.angularFrequency * s)) t.val S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)) fun_prop All goals completed! 🐙 S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)))] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ _root_.deriv (fun s => S.angularFrequency * Real.sinh (S.angularFrequency * s)) t.val • IC.x₀ +
_root_.deriv (fun s => Real.cosh (S.angularFrequency * s)) t.val • (IC.v₀ + S.decayRate • IC.x₀) =
S.angularFrequency ^ 2 •
(Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀))
simp [mul_comm, smul_smul, smul_add] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhΩ:S.angularFrequency ≠ 0t:Timefderiv_comp_val_eq_deriv:∀ (g : ℝ → ℝ), DifferentiableAt ℝ g t.val → (fderiv ℝ (fun s => g s.val) t) 1 = _root_.deriv g t.val⊢ (S.angularFrequency * (S.angularFrequency * Real.cosh (t.val * S.angularFrequency))) • IC.x₀ +
((S.angularFrequency * Real.sinh (t.val * S.angularFrequency)) • IC.v₀ +
(S.angularFrequency * Real.sinh (t.val * S.angularFrequency) * S.decayRate) • IC.x₀) =
(S.angularFrequency ^ 2 * Real.cosh (t.val * S.angularFrequency)) • IC.x₀ +
((S.angularFrequency ^ 2 * (Real.sinh (t.val * S.angularFrequency) / S.angularFrequency)) • IC.v₀ +
(S.angularFrequency ^ 2 * (Real.sinh (t.val * S.angularFrequency) / S.angularFrequency * S.decayRate)) • IC.x₀)
field_simp [hΩ] All goals completed! 🐙
The selected trajectory has initial velocity IC.v₀.
lemma trajectory_velocity_at_zero (IC : InitialConditions) :
∂ₜ (S.trajectory IC) 0 = IC.v₀ := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀
rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀
· inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀ rw [S.trajectory_eq_of_underdamped IC hS, inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ ∂ₜ (fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t) 0 = IC.v₀ inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀
exp_decay_smul_velocity S.decayRate (S.underdampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ Differentiable ℝ (S.underdampedBase IC) inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀ unfold underdampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ Differentiable ℝ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀; fun_prop All goals completed! 🐙inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀),
show ∂ₜ (S.underdampedBase IC) = _ from S.underdampedBase_velocity IC hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀]inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.underdampedBase IC t))
0 =
IC.v₀
simp [underdampedBase] All goals completed! 🐙
· inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀ rw [S.trajectory_eq_of_criticallyDamped IC hS, inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ ∂ₜ (fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t) 0 = IC.v₀ inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀
exp_decay_smul_velocity S.decayRate (S.criticallyDampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ Differentiable ℝ (S.criticallyDampedBase IC)inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀ unfold criticallyDampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ Differentiable ℝ fun t => IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀; fun_prop All goals completed! 🐙inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀),
S.criticallyDampedBase_velocity IC inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀]inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun x => IC.v₀ + S.decayRate • IC.x₀) t - S.decayRate • S.criticallyDampedBase IC t))
0 =
IC.v₀
simp [criticallyDampedBase] All goals completed! 🐙
· inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ∂ₜ (S.trajectory IC) 0 = IC.v₀ rw [S.trajectory_eq_of_overdamped IC hS, inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ ∂ₜ (fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t) 0 = IC.v₀ inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀
exp_decay_smul_velocity S.decayRate (S.overdampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ Differentiable ℝ (S.overdampedBase IC)inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀ unfold overdampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ Differentiable ℝ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀; fun_prop All goals completed! 🐙inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀),
show ∂ₜ (S.overdampedBase IC) = _ from S.overdampedBase_velocity IC hS inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀]inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ (fun t =>
rexp (-S.decayRate * t.val) •
((fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀))
t -
S.decayRate • S.overdampedBase IC t))
0 =
IC.v₀
simp [overdampedBase] All goals completed! 🐙C. Trajectories and equation of motion
The regime-specific trajectories satisfy the equation of motion for the damped harmonic oscillator.
C.1. The selected trajectory satisfies the equation of motion
In the critically damped regime, the selected trajectory satisfies the damped equation of motion.
lemma trajectory_equationOfMotion_of_criticallyDamped (IC : InitialConditions)
(hS : S.IsCriticallyDamped) :
S.EquationOfMotion (S.trajectory IC) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion (S.trajectory IC)
rw [S.trajectory_eq_of_criticallyDamped IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
have hk : S.k = S.m * (S.decayRate^2 - 0) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion (S.trajectory IC) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
simpa [sub_zero] using S.k_eq_m_mul_decayRate_sq_of_criticallyDamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.criticallyDampedBase IC t
refine S.exp_decay_smul_equationOfMotion S.decayRate 0 (S.criticallyDampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ (S.criticallyDampedBase IC)
unfold criticallyDampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ fun t => IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)
fun_prop All goals completed! 🐙)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ (∂ₜ (S.criticallyDampedBase IC))
rw [S.criticallyDampedBase_velocity IC S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ fun x => IC.v₀ + S.decayRate • IC.x₀ S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ fun x => IC.v₀ + S.decayRate • IC.x₀] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - 0)⊢ Differentiable ℝ fun x => IC.v₀ + S.decayRate • IC.x₀
fun_prop All goals completed! 🐙) ?_ hγ hk
simpa using S.criticallyDampedBase_acceleration IC All goals completed! 🐙In the underdamped regime, the selected trajectory satisfies the damped equation of motion.
lemma trajectory_equationOfMotion_of_underdamped (IC : InitialConditions)
(hS : S.IsUnderdamped) :
S.EquationOfMotion (S.trajectory IC) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion (S.trajectory IC)
rw [S.trajectory_eq_of_underdamped IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
have hk : S.k = S.m * (S.decayRate^2 - (-S.angularFrequency^2)) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion (S.trajectory IC) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
rw [S.k_eq_m_mul_ω_sq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - -(S.ω ^ 2 - S.decayRate ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t S.angularFrequency_sq_of_underdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - -(S.ω ^ 2 - S.decayRate ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - -(S.ω ^ 2 - S.decayRate ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - -(S.ω ^ 2 - S.decayRate ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
ring S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.underdampedBase IC t
refine S.exp_decay_smul_equationOfMotion S.decayRate
(-S.angularFrequency^2) (S.underdampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ Differentiable ℝ (S.underdampedBase IC)
unfold underdampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
Real.cos (S.angularFrequency * t.val) • IC.x₀ +
(Real.sin (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)
fun_prop All goals completed! 🐙) ?_
(S.underdampedBase_acceleration IC hS) hγ hk
rw [show ∂ₜ (S.underdampedBase IC) = _ from S.underdampedBase_velocity IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - -S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(-S.angularFrequency * Real.sin (S.angularFrequency * t.val)) • IC.x₀ +
Real.cos (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
fun_prop All goals completed! 🐙In the overdamped regime, the selected trajectory satisfies the damped equation of motion.
lemma trajectory_equationOfMotion_of_overdamped (IC : InitialConditions)
(hS : S.IsOverdamped) :
S.EquationOfMotion (S.trajectory IC) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion (S.trajectory IC)
rw [S.trajectory_eq_of_overdamped IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
have hk : S.k = S.m * (S.decayRate^2 - S.angularFrequency^2) := by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion (S.trajectory IC) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
rw [S.k_eq_m_mul_ω_sq, S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - (S.decayRate ^ 2 - S.ω ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S.angularFrequency_sq_of_overdamped hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - (S.decayRate ^ 2 - S.ω ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - (S.decayRate ^ 2 - S.ω ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRate⊢ S.m * S.ω ^ 2 = S.m * (S.decayRate ^ 2 - (S.decayRate ^ 2 - S.ω ^ 2)) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
ring S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ S.EquationOfMotion fun t => rexp (-S.decayRate * t.val) • S.overdampedBase IC t
refine S.exp_decay_smul_equationOfMotion S.decayRate (S.angularFrequency^2)
(S.overdampedBase IC)
(by S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ Differentiable ℝ (S.overdampedBase IC)
unfold overdampedBase S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
Real.cosh (S.angularFrequency * t.val) • IC.x₀ +
(Real.sinh (S.angularFrequency * t.val) / S.angularFrequency) • (IC.v₀ + S.decayRate • IC.x₀)
fun_prop All goals completed! 🐙) ?_
(S.overdampedBase_acceleration IC hS) hγ hk
rw [show ∂ₜ (S.overdampedBase IC) = _ from S.overdampedBase_velocity IC hS S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀) S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)] S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdampedhγ:S.γ = 2 * S.m * S.decayRatehk:S.k = S.m * (S.decayRate ^ 2 - S.angularFrequency ^ 2)⊢ Differentiable ℝ fun t =>
(S.angularFrequency * Real.sinh (S.angularFrequency * t.val)) • IC.x₀ +
Real.cosh (S.angularFrequency * t.val) • (IC.v₀ + S.decayRate • IC.x₀)
fun_prop All goals completed! 🐙The selected trajectory satisfies the damped equation of motion.
lemma trajectory_equationOfMotion (IC : InitialConditions) :
S.EquationOfMotion (S.trajectory IC) := by S:DampedHarmonicOscillatorIC:InitialConditions⊢ S.EquationOfMotion (S.trajectory IC)
rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion (S.trajectory IC)inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion (S.trajectory IC)inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion (S.trajectory IC)
· inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsUnderdamped⊢ S.EquationOfMotion (S.trajectory IC) exact S.trajectory_equationOfMotion_of_underdamped IC hS All goals completed! 🐙
· inr.inl S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsCriticallyDamped⊢ S.EquationOfMotion (S.trajectory IC) exact S.trajectory_equationOfMotion_of_criticallyDamped IC hS All goals completed! 🐙
· inr.inr S:DampedHarmonicOscillatorIC:InitialConditionshS:S.IsOverdamped⊢ S.EquationOfMotion (S.trajectory IC) exact S.trajectory_equationOfMotion_of_overdamped IC hS All goals completed! 🐙C.2. Uniqueness of the solutions
Unlike the undamped oscillator, the mechanical energy is not conserved along a damped solution, so
uniqueness cannot be read off from a conserved positive-definite energy. Instead we reduce the
second-order equation of motion m ẍ + γ ẋ + k x = 0 to the first-order linear system
(x, ẋ)' = (ẋ, (1/m)(-k x - γ ẋ)) on the phase space and invoke the global
ODE-uniqueness theorem ODE_solution_unique_univ (the right-hand side is a continuous
linear map, hence Lipschitz).
The phase-space vector field of the damped oscillator, sending (x, ẋ) to
(ẋ, -(k/m) x - (γ/m) ẋ), as a continuous linear map on E × E.
private noncomputable def phaseVectorField :
EuclideanSpace ℝ (Fin 1) × EuclideanSpace ℝ (Fin 1) →L[ℝ]
EuclideanSpace ℝ (Fin 1) × EuclideanSpace ℝ (Fin 1) :=
(ContinuousLinearMap.snd ℝ (EuclideanSpace ℝ (Fin 1)) (EuclideanSpace ℝ (Fin 1))).prod
((-(S.m⁻¹ * S.k)) •
ContinuousLinearMap.fst ℝ (EuclideanSpace ℝ (Fin 1)) (EuclideanSpace ℝ (Fin 1)) +
(-(S.m⁻¹ * S.γ)) •
ContinuousLinearMap.snd ℝ (EuclideanSpace ℝ (Fin 1)) (EuclideanSpace ℝ (Fin 1)))private lemma phaseVectorField_apply (a b : EuclideanSpace ℝ (Fin 1)) :
S.phaseVectorField (a, b) = (b, (-(S.m⁻¹ * S.k)) • a + (-(S.m⁻¹ * S.γ)) • b) := by S:DampedHarmonicOscillatora:EuclideanSpace ℝ (Fin 1)b:EuclideanSpace ℝ (Fin 1)⊢ S.phaseVectorField (a, b) = (b, -(S.m⁻¹ * S.k) • a + -(S.m⁻¹ * S.γ) • b)
simp [phaseVectorField] All goals completed! 🐙
private lemma toRealCLE_symm_one : Time.toRealCLE.symm (1 : ℝ) = (1 : Time) := by ⊢ toRealCLE.symm 1 = 1
rw [ContinuousLinearEquiv.symm_apply_eq ⊢ 1 = toRealCLE 1 ⊢ 1 = toRealCLE 1] ⊢ 1 = toRealCLE 1
change (1 : ℝ) = (1 : Time).val ⊢ 1 = val 1
rw [Time.one_val ⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙
Bridge from the time derivative to HasDerivAt for a curve reparametrised through the
canonical ℝ ≃L[ℝ] Time equivalence.
private lemma hasDerivAt_comp_toRealCLE_symm (w : Time → EuclideanSpace ℝ (Fin 1)) (τ : ℝ)
(hw : DifferentiableAt ℝ w (Time.toRealCLE.symm τ)) :
HasDerivAt (fun τ : ℝ => w (Time.toRealCLE.symm τ))
(∂ₜ w (Time.toRealCLE.symm τ)) τ := by w:Time → EuclideanSpace ℝ (Fin 1)τ:ℝhw:DifferentiableAt ℝ w (toRealCLE.symm τ)⊢ HasDerivAt (fun τ => w (toRealCLE.symm τ)) (∂ₜ w (toRealCLE.symm τ)) τ
simpa [Function.comp_def, Time.deriv_eq, toRealCLE_symm_one] using
hw.hasFDerivAt.comp_hasDerivAt_of_eq τ
((Time.toRealCLE.symm : ℝ →L[ℝ] Time).hasDerivAt) rfl All goals completed! 🐙
The phase curve τ ↦ (z t, ẋ t) (with t = toRealCLE.symm τ) of a smooth solution z
solves the first-order phase-space ODE with vector field phaseVectorField.
private lemma phaseCurve_hasDerivAt (z : Time → EuclideanSpace ℝ (Fin 1))
(hz : ContDiff ℝ ∞ z) (hEOM : S.EquationOfMotion z) (τ : ℝ) :
HasDerivAt (fun τ : ℝ => (z (Time.toRealCLE.symm τ), ∂ₜ z (Time.toRealCLE.symm τ)))
(S.phaseVectorField (z (Time.toRealCLE.symm τ), ∂ₜ z (Time.toRealCLE.symm τ))) τ := by S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(S.phaseVectorField (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ))) τ
rw [S.phaseVectorField_apply, S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(∂ₜ z (toRealCLE.symm τ), -(S.m⁻¹ * S.k) • z (toRealCLE.symm τ) + -(S.m⁻¹ * S.γ) • ∂ₜ z (toRealCLE.symm τ)) τ S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(∂ₜ z (toRealCLE.symm τ), ∂ₜ (∂ₜ z) (toRealCLE.symm τ)) τ
← S.acceleration_eq_of_equationOfMotion z hEOM (Time.toRealCLE.symm τ) S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(∂ₜ z (toRealCLE.symm τ), ∂ₜ (∂ₜ z) (toRealCLE.symm τ)) τ S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(∂ₜ z (toRealCLE.symm τ), ∂ₜ (∂ₜ z) (toRealCLE.symm τ)) τ] S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ HasDerivAt (fun τ => (z (toRealCLE.symm τ), ∂ₜ z (toRealCLE.symm τ)))
(∂ₜ z (toRealCLE.symm τ), ∂ₜ (∂ₜ z) (toRealCLE.symm τ)) τ
exact (hasDerivAt_comp_toRealCLE_symm z τ (hz.differentiable (by S:DampedHarmonicOscillatorz:Time → EuclideanSpace ℝ (Fin 1)hz:ContDiff ℝ ∞ zhEOM:S.EquationOfMotion zτ:ℝ⊢ ∞ ≠ 0 simp All goals completed! 🐙) _)).prodMk
(hasDerivAt_comp_toRealCLE_symm (∂ₜ z) τ (deriv_differentiable_of_contDiff z hz _))Any two smooth solutions of the damped equation of motion with the same initial position and velocity are equal.
lemma equationOfMotion_unique (x y : Time → EuclideanSpace ℝ (Fin 1))
(hx : ContDiff ℝ ∞ x) (hy : ContDiff ℝ ∞ y)
(hEOMx : S.EquationOfMotion x) (hEOMy : S.EquationOfMotion y)
(h0 : x 0 = y 0) (hv0 : ∂ₜ x 0 = ∂ₜ y 0) :
x = y := by S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0⊢ x = y
have hIC : (fun τ : ℝ => (x (Time.toRealCLE.symm τ), ∂ₜ x (Time.toRealCLE.symm τ))) 0 =
(fun τ : ℝ => (y (Time.toRealCLE.symm τ), ∂ₜ y (Time.toRealCLE.symm τ))) 0 := by
have h00 : Time.toRealCLE.symm (0 : ℝ) = (0 : Time) := map_zero Time.toRealCLE.symm S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0h00:toRealCLE.symm 0 = 0⊢ (fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0 S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0⊢ x = y
simp only [h00, h0, hv0] S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0⊢ x = y S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0⊢ x = y
have hEq := ODE_solution_unique_univ
(v := fun _ p => S.phaseVectorField p) (s := fun _ => Set.univ) (t₀ := (0 : ℝ))
(f := fun τ : ℝ => (x (Time.toRealCLE.symm τ), ∂ₜ x (Time.toRealCLE.symm τ)))
(g := fun τ : ℝ => (y (Time.toRealCLE.symm τ), ∂ₜ y (Time.toRealCLE.symm τ)))
(fun _ => S.phaseVectorField.lipschitz.lipschitzOnWith)
(fun τ => ⟨S.phaseCurve_hasDerivAt x hx hEOMx τ, Set.mem_univ _⟩)
(fun τ => ⟨S.phaseCurve_hasDerivAt y hy hEOMy τ, Set.mem_univ _⟩)
hIC S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0hEq:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) = fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))⊢ x = y
funext t S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0hEq:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) = fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))t:Time⊢ x t = y t
have h1 := congrFun hEq (Time.toRealCLE t) S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0hEq:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) = fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))t:Timeh1:(x (toRealCLE.symm (toRealCLE t)), ∂ₜ x (toRealCLE.symm (toRealCLE t))) =
(y (toRealCLE.symm (toRealCLE t)), ∂ₜ y (toRealCLE.symm (toRealCLE t)))⊢ x t = y t
simp only [ContinuousLinearEquiv.symm_apply_apply] at h1 S:DampedHarmonicOscillatorx:Time → EuclideanSpace ℝ (Fin 1)y:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhy:ContDiff ℝ ∞ yhEOMx:S.EquationOfMotion xhEOMy:S.EquationOfMotion yh0:x 0 = y 0hv0:∂ₜ x 0 = ∂ₜ y 0hIC:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) 0 =
(fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))) 0hEq:(fun τ => (x (toRealCLE.symm τ), ∂ₜ x (toRealCLE.symm τ))) = fun τ => (y (toRealCLE.symm τ), ∂ₜ y (toRealCLE.symm τ))t:Timeh1:(x t, ∂ₜ x t) = (y t, ∂ₜ y t)⊢ x t = y t
exact (Prod.ext_iff.mp h1).1 All goals completed! 🐙The selected trajectory is the unique smooth solution of the damped equation of motion with the given initial conditions.
lemma trajectories_unique (IC : InitialConditions) (x : Time → EuclideanSpace ℝ (Fin 1))
(hx : ContDiff ℝ ∞ x) (hEOM : S.EquationOfMotion x)
(hx0 : x 0 = IC.x₀) (hv0 : ∂ₜ x 0 = IC.v₀) :
x = S.trajectory IC := by S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ x = S.trajectory IC
refine S.equationOfMotion_unique x (S.trajectory IC) hx (S.trajectory_contDiff IC)
hEOM (S.trajectory_equationOfMotion IC) ?_ ?_ refine_1 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ x 0 = S.trajectory IC 0refine_2 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ ∂ₜ x 0 = ∂ₜ (S.trajectory IC) 0
· refine_1 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ x 0 = S.trajectory IC 0 rw [hx0, refine_1 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ IC.x₀ = S.trajectory IC 0 All goals completed! 🐙 S.trajectory_apply_zero IC refine_1 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ IC.x₀ = IC.x₀ All goals completed! 🐙] All goals completed! 🐙
· refine_2 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ ∂ₜ x 0 = ∂ₜ (S.trajectory IC) 0 rw [hv0, refine_2 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ IC.v₀ = ∂ₜ (S.trajectory IC) 0 All goals completed! 🐙 S.trajectory_velocity_at_zero IC refine_2 S:DampedHarmonicOscillatorIC:InitialConditionsx:Time → EuclideanSpace ℝ (Fin 1)hx:ContDiff ℝ ∞ xhEOM:S.EquationOfMotion xhx0:x 0 = IC.x₀hv0:∂ₜ x 0 = IC.v₀⊢ IC.v₀ = IC.v₀ All goals completed! 🐙] All goals completed! 🐙