Documentation

Atlas.IntroductionToPartialDifferentialEquations.code.CM11.Wave1D

noncomputable def WaveEquation1D.dAlembertSolution (f g : ) (t x : ) :

D'Alembert's formula for the $1+1$ dimensional wave equation: $u(t,x) = \frac{1}{2}(f(x+t) + f(x-t)) + \frac{1}{2}\int_{x-t}^{x+t} g(z)\,dz$.

Instances For
    theorem WaveEquation1D.contDiff_antideriv (g₀ : ) (hg₀ : ContDiff 1 g₀) :
    ContDiff 2 fun (z : ) => (y : ) in 0..z, g₀ y

    If $g_0 \in C^1(\mathbb{R})$, then its antiderivative $z \mapsto \int_0^z g_0(y)\,dy$ is in $C^2(\mathbb{R})$.

    theorem WaveEquation1D.hasDerivAt_comp_add_right' {h : } {a b : } (hd : DifferentiableAt h (a + b)) :
    HasDerivAt (fun (s : ) => h (a + s)) (deriv h (a + b)) b

    Chain rule helper: if $h$ is differentiable at $a + b$, then the map $s \mapsto h(a + s)$ has derivative $h'(a + b)$ at $b$.

    theorem WaveEquation1D.hasDerivAt_comp_sub_right' {h : } {a b : } (hd : DifferentiableAt h (a - b)) :
    HasDerivAt (fun (s : ) => h (a - s)) (-deriv h (a - b)) b

    Chain rule helper: if $h$ is differentiable at $a - b$, then the map $s \mapsto h(a - s)$ has derivative $-h'(a - b)$ at $b$.

    theorem WaveEquation1D.hasDerivAt_comp_add_left' {h : } {a b : } (hd : DifferentiableAt h (b + a)) :
    HasDerivAt (fun (s : ) => h (s + a)) (deriv h (b + a)) b

    Chain rule helper: if $h$ is differentiable at $b + a$, then $s \mapsto h(s + a)$ has derivative $h'(b + a)$ at $b$.

    theorem WaveEquation1D.hasDerivAt_comp_sub_left' {h : } {a b : } (hd : DifferentiableAt h (b - a)) :
    HasDerivAt (fun (s : ) => h (s - a)) (deriv h (b - a)) b

    Chain rule helper: if $h$ is differentiable at $b - a$, then $s \mapsto h(s - a)$ has derivative $h'(b - a)$ at $b$.

    theorem WaveEquation1D.dAlembert_regularity_proof (f g : ) (hf : ContDiff 2 f) (hg : ContDiff 1 g) :
    ContDiff 2 fun (p : × ) => dAlembertSolution f g p.1 p.2

    Regularity for d'Alembert's solution: if $f \in C^2(\mathbb{R})$ and $g \in C^1(\mathbb{R})$, then $(t, x) \mapsto u(t, x)$ defined by d'Alembert's formula is in $C^2(\mathbb{R}^2)$.

    theorem WaveEquation1D.dAlembert_regularity (f g : ) (hf : ContDiff 2 f) (hg : ContDiff 1 g) :
    ContDiff 2 fun (p : × ) => dAlembertSolution f g p.1 p.2

    D'Alembert's solution is jointly $C^2$ in $(t, x)$ when $f \in C^2(\mathbb{R})$ and $g \in C^1(\mathbb{R})$.

    theorem WaveEquation1D.general_solution_satisfies_wave_eq (F G : ) (hF : ContDiff 2 F) (hG : ContDiff 2 G) (t x : ) :
    deriv (fun (t' : ) => deriv (fun (t'' : ) => F (x + t'') + G (x - t'')) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => F (x'' + t) + G (x'' - t)) x') x

    Any function of the form $u(t, x) = F(x + t) + G(x - t)$ with $F, G \in C^2(\mathbb{R})$ satisfies the wave equation $\partial_t^2 u = \partial_x^2 u$.

    theorem WaveEquation1D.zero_wave_is_zero (w : ) (h_reg : ContDiff 2 fun (p : × ) => w p.1 p.2) (h_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => w t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => w t x'') x') x) (h_pos : ∀ (x : ), w 0 x = 0) (h_vel : ∀ (x : ), deriv (fun (t : ) => w t x) 0 = 0) (t x : ) :
    w t x = 0

    Uniqueness for the wave equation with zero initial data: if $w \in C^2(\mathbb{R}^2)$ satisfies $\partial_t^2 w = \partial_x^2 w$, $w(0, x) = 0$, and $\partial_t w(0, x) = 0$ for all $x$, then $w \equiv 0$.

    theorem WaveEquation1D.wave_eq_of_sub (u₁ u₂ : ) (h₁_reg : ContDiff 2 fun (p : × ) => u₁ p.1 p.2) (h₂_reg : ContDiff 2 fun (p : × ) => u₂ p.1 p.2) (h₁_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u₁ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u₁ t x'') x') x) (h₂_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u₂ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u₂ t x'') x') x) (t x : ) :
    deriv (fun (t' : ) => deriv (fun (t'' : ) => u₁ t'' x - u₂ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u₁ t x'' - u₂ t x'') x') x

    The difference of two solutions to the wave equation is itself a solution: if $u_1, u_2$ both satisfy $\partial_t^2 u = \partial_x^2 u$, then so does $u_1 - u_2$.

    theorem WaveEquation1D.deriv_sub_zero (u₁ u₂ : ) (h₁_reg : ContDiff 2 fun (p : × ) => u₁ p.1 p.2) (h₂_reg : ContDiff 2 fun (p : × ) => u₂ p.1 p.2) (h_vel : ∀ (x : ), deriv (fun (t : ) => u₁ t x) 0 = deriv (fun (t : ) => u₂ t x) 0) (x : ) :
    deriv (fun (t : ) => u₁ t x - u₂ t x) 0 = 0

    If two $C^2$ functions $u_1, u_2$ have equal initial $t$-derivatives at $t = 0$, then the $t$-derivative of their difference vanishes at $t = 0$.

    theorem WaveEquation1D.wave_uniqueness (u₁ u₂ : ) (h₁_reg : ContDiff 2 fun (p : × ) => u₁ p.1 p.2) (h₁_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u₁ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u₁ t x'') x') x) (h₂_reg : ContDiff 2 fun (p : × ) => u₂ p.1 p.2) (h₂_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u₂ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u₂ t x'') x') x) (h_pos : ∀ (x : ), u₁ 0 x = u₂ 0 x) (h_vel : ∀ (x : ), deriv (fun (t : ) => u₁ t x) 0 = deriv (fun (t : ) => u₂ t x) 0) (t x : ) :
    u₁ t x = u₂ t x

    Uniqueness for the wave equation: two $C^2$ solutions of the 1D wave equation that share the same initial position $u(0, x)$ and the same initial velocity $\partial_t u(0, x)$ must agree everywhere.

    theorem WaveEquation1D.wave_null_decomposition (u : ) (hu_reg : ContDiff 2 fun (p : × ) => u p.1 p.2) (hu_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) :
    ∃ (F : ) (G : ), (∀ (t x : ), u t x = F (x + t) + G (x - t)) Differentiable F Differentiable G

    Null decomposition for the wave equation: every $C^2$ solution $u$ of the 1D wave equation can be written as $u(t, x) = F(x + t) + G(x - t)$ for some differentiable $F, G : \mathbb{R} \to \mathbb{R}$ (travelling waves).

    theorem WaveEquation1D.hasDerivAt_F_of_null_decomp (f g F G : ) (hf : ContDiff 2 f) (_hg : ContDiff 1 g) (hFd : Differentiable F) (hFG_init_pos : ∀ (x : ), F x + G x = f x) (hFG_init_vel : ∀ (x : ), HasDerivAt (fun (t : ) => F (x + t) + G (x - t)) (g x) 0) (x : ) :
    HasDerivAt F ((deriv f x + g x) / 2) x

    In a null decomposition $u(t, x) = F(x + t) + G(x - t)$ matching initial data $f$ and $g$, the right-moving wave $F$ satisfies $F'(x) = (f'(x) + g(x))/2$.

    theorem WaveEquation1D.null_decomposition_determines_dalembert (f g F G : ) (hf : ContDiff 2 f) (hg : ContDiff 1 g) (hFd : Differentiable F) (hFG_init_pos : ∀ (x : ), F x + G x = f x) (hFG_init_vel : ∀ (x : ), HasDerivAt (fun (t : ) => F (x + t) + G (x - t)) (g x) 0) (t x : ) :
    F (x + t) + G (x - t) = dAlembertSolution f g t x

    Any null decomposition $F(x + t) + G(x - t)$ that matches the initial position $f$ and initial velocity $g$ must coincide with d'Alembert's solution.

    theorem WaveEquation1D.dAlembert_uniqueness (f g : ) (u : ) (hf : ContDiff 2 f) (hg : ContDiff 1 g) (hu_reg : ContDiff 2 fun (p : × ) => u p.1 p.2) (hu_wave : ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (hu_init_pos : ∀ (x : ), u 0 x = f x) (hu_init_vel : ∀ (x : ), HasDerivAt (fun (t : ) => u t x) (g x) 0) (t x : ) :
    u t x = dAlembertSolution f g t x

    Theorem 4.1 (d'Alembert's formula, uniqueness part). The unique $C^2$ solution $u$ of the 1D wave equation $-\partial_t^2 u + \partial_x^2 u = 0$ with initial data $u(0, x) = f(x)$ and $\partial_t u(0, x) = g(x)$ is given by d'Alembert's formula.

    noncomputable def WaveEquation1D.oddExtension (f : ) :

    The odd extension of a function $f : [0, \infty) \to \mathbb{R}$ to all of $\mathbb{R}$: $\tilde{f}(y) = f(y)$ for $y \ge 0$, and $\tilde{f}(y) = -f(-y)$ for $y < 0$.

    Instances For
      theorem WaveEquation1D.oddExtension_neg (f : ) (hf0 : f 0 = 0) (y : ) :

      If $f(0) = 0$, then the odd extension of $f$ is an odd function: $\tilde{f}(-y) = -\tilde{f}(y)$.

      noncomputable def WaveEquation1D.dAlembertHalfLine (f g : ) (t x : ) :

      The d'Alembert formula for the half-line wave equation with Dirichlet boundary condition $u(t, 0) = 0$, obtained by applying d'Alembert's formula to the odd extensions of $f$ and $g$.

      Instances For
        theorem WaveEquation1D.integral_odd_symmetric {h : } (hodd : ∀ (y : ), h (-y) = -h y) (hcont : Continuous h) (t : ) :
        (y : ) in -t..t, h y = 0

        The integral of a continuous odd function over a symmetric interval vanishes: $\int_{-t}^{t} h(y)\,dy = 0$ when $h(-y) = -h(y)$.

        theorem WaveEquation1D.oddExtension_continuous (g : ) (hg_cont : Continuous g) (hg0 : g 0 = 0) :

        If $g : \mathbb{R} \to \mathbb{R}$ is continuous with $g(0) = 0$, then its odd extension is continuous.

        If $g$ is continuous on $[0, \infty)$ with $g(0) = 0$, then its odd extension is continuous on all of $\mathbb{R}$.

        Derivative of the odd extension (from $C^1$ on $[0, \infty)$): for $g \in C^1([0, \infty))$ with $g(0) = 0$, the odd extension is differentiable everywhere, with derivative $g'(\lvert x \rvert)$ at $x$.

        If $g \in C^1([0, \infty))$ with $g(0) = 0$, then the odd extension of $g$ is in $C^1(\mathbb{R})$.

        theorem WaveEquation1D.evenExtension_hasDerivAt_of_contDiffOn (h : ) (hh : ContDiffOn 1 h (Set.Ici 0)) (hh'0 : derivWithin h (Set.Ici 0) 0 = 0) (x : ) :
        HasDerivAt (fun (y : ) => h |y|) (oddExtension (derivWithin h (Set.Ici 0)) x) x

        Derivative of an even extension: for $h \in C^1([0, \infty))$ with $h'(0) = 0$, the function $y \mapsto h(\lvert y \rvert)$ is differentiable everywhere with derivative given by the odd extension of $h'$.

        theorem WaveEquation1D.oddExtension_contDiff_two_of_contDiffOn (f : ) (hf : ContDiffOn 2 f (Set.Ici 0)) (hf0 : f 0 = 0) (hf''0 : iteratedDerivWithin 2 f (Set.Ici 0) 0 = 0) :

        If $f \in C^2([0, \infty))$ with $f(0) = 0$ and $f''(0) = 0$, then the odd extension of $f$ is in $C^2(\mathbb{R})$. The compatibility condition $f''(0) = 0$ is necessary for smoothness across the origin.

        theorem WaveEquation1D.oddExtension_hasDerivAt (g : ) (hg : ContDiff 1 g) (hg0 : g 0 = 0) (x : ) :

        Derivative of the odd extension (from $C^1$ on all of $\mathbb{R}$): if $g \in C^1(\mathbb{R})$ and $g(0) = 0$, then the odd extension is differentiable everywhere with derivative $g'(\lvert x \rvert)$ at $x$.

        theorem WaveEquation1D.oddExtension_contDiff_one (g : ) (hg : ContDiff 1 g) (hg0 : g 0 = 0) :

        If $g \in C^1(\mathbb{R})$ with $g(0) = 0$, then the odd extension of $g$ is in $C^1(\mathbb{R})$.

        theorem WaveEquation1D.evenExtension_deriv_hasDerivAt (h : ) (hh : ContDiff 1 h) (hh'0 : deriv h 0 = 0) (x : ) :
        HasDerivAt (fun (y : ) => h |y|) (oddExtension (deriv h) x) x

        Derivative of an even extension (from $C^1$ on all of $\mathbb{R}$): if $h \in C^1(\mathbb{R})$ and $h'(0) = 0$, then $y \mapsto h(\lvert y \rvert)$ is differentiable everywhere with derivative the odd extension of $h'$.

        theorem WaveEquation1D.oddExtension_contDiff_two (f : ) (hf : ContDiff 2 f) (hf0 : f 0 = 0) (hf''0 : deriv (deriv f) 0 = 0) :

        If $f \in C^2(\mathbb{R})$ with $f(0) = 0$ and $f''(0) = 0$, then the odd extension of $f$ is in $C^2(\mathbb{R})$.

        theorem WaveEquation1D.dAlembert_halfline_formula_txle (f g : ) (_hf : ContDiffOn 2 f (Set.Ici 0)) (hg : ContDiffOn 1 g (Set.Ici 0)) (_hf0 : f 0 = 0) (hg0 : g 0 = 0) (t x : ) (ht : 0 t) (hx : 0 x) (htx : t x) :
        dAlembertHalfLine f g t x = (f (x + t) + f (x - t)) / 2 + ( (z : ) in x - t..x + t, g z) / 2

        Half-line d'Alembert formula in the case $0 \le t \le x$ (Corollary 4.0.1, first branch): $u(t, x) = \frac{1}{2}(f(x + t) + f(x - t)) + \frac{1}{2}\int_{x-t}^{x+t} g(z)\,dz$.

        theorem WaveEquation1D.dAlembert_halfline_formula_xtle (f g : ) (_hf : ContDiffOn 2 f (Set.Ici 0)) (hg : ContDiffOn 1 g (Set.Ici 0)) (hf0 : f 0 = 0) (hg0 : g 0 = 0) (t x : ) (ht : 0 t) (hx : 0 x) (hxt : x t) :
        dAlembertHalfLine f g t x = (f (x + t) - f (t - x)) / 2 + ( (z : ) in t - x..x + t, g z) / 2

        Half-line d'Alembert formula in the case $0 \le x \le t$ (Corollary 4.0.1, second branch): $u(t, x) = \frac{1}{2}(f(x + t) - f(t - x)) + \frac{1}{2}\int_{t - x}^{x + t} g(z)\,dz$.

        theorem WaveEquation1D.dAlembert_halfline_regularity_proof (f g : ) (_hf : ContDiffOn 2 f (Set.Ici 0)) (_hg : ContDiffOn 1 g (Set.Ici 0)) (_hf0 : f 0 = 0) (_hg0 : g 0 = 0) (hcompat : iteratedDerivWithin 2 f (Set.Ici 0) 0 = 0) :
        ContDiffOn 2 (fun (p : × ) => dAlembertHalfLine f g p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)

        Regularity for the half-line d'Alembert solution: under the standard assumptions plus the compatibility condition $f''(0) = 0$, the half-line d'Alembert solution is in $C^2$ on $[0, \infty) \times [0, \infty)$.

        theorem WaveEquation1D.dAlembert_halfline_regularity (f g : ) (hf : ContDiffOn 2 f (Set.Ici 0)) (hg : ContDiffOn 1 g (Set.Ici 0)) (hf0 : f 0 = 0) (hg0 : g 0 = 0) (hcompat : iteratedDerivWithin 2 f (Set.Ici 0) 0 = 0) :
        ContDiffOn 2 (fun (p : × ) => dAlembertHalfLine f g p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)

        The half-line d'Alembert solution is jointly $C^2$ on $[0, \infty) \times [0, \infty)$ when $f \in C^2$, $g \in C^1$, $f(0) = g(0) = 0$, and $f''(0) = 0$.

        theorem WaveEquation1D.deriv_zero_of_even (g : ) (heven : ∀ (x : ), g (-x) = g x) :
        deriv g 0 = 0

        The derivative of an even function at the origin vanishes: if $g(-x) = g(x)$ for all $x$, then $g'(0) = 0$.

        theorem WaveEquation1D.deriv_even_of_odd (h : ) (hodd : ∀ (x : ), h (-x) = -h x) (x : ) :
        deriv h (-x) = deriv h x

        The derivative of an odd function is even: if $h(-x) = -h(x)$ for all $x$, then $h'(-x) = h'(x)$.

        theorem WaveEquation1D.odd_extension_second_spatial_deriv_zero (u : ) (_hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (_hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (_hu_boundary : ∀ (t : ), u t 0 = 0) (t : ) (_ht : 0 t) :
        deriv (fun (x' : ) => deriv (fun (x'' : ) => if 0 x'' then u t x'' else -u t (-x'')) x') 0 = 0

        For a solution $u$ of the half-line wave problem with boundary condition $u(t, 0) = 0$, the second spatial derivative of the odd extension (in $x$) vanishes at $x = 0$, for every fixed $t \ge 0$.

        theorem WaveEquation1D.odd_extension_contDiff_two_of_contDiffOn (u : ) (hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (hu_boundary : ∀ (t : ), u t 0 = 0) (hu_dxx_zero : ∀ (t : ), 0 tderiv (fun (x : ) => deriv (u t) x) 0 = 0) :
        ContDiff 2 fun (p : × ) => (fun (t x : ) => if 0 x then u t x else -u t (-x)) p.1 p.2

        $C^2$ regularity of the joint odd extension in $x$: if $u$ is $C^2$ on $[0, \infty) \times [0, \infty)$ with $u(t, 0) = 0$ and the second spatial derivative vanishing at the boundary, then the extension $(t, x) \mapsto u(t, x)$ for $x \ge 0$ and $-u(t, -x)$ for $x < 0$ is jointly $C^2$ on $\mathbb{R}^2$.

        theorem WaveEquation1D.odd_extension_contDiff_two_joint (u : ) (hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (_hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (hu_boundary : ∀ (t : ), u t 0 = 0) (hu_dxx_zero : ∀ (t : ), 0 tderiv (fun (x : ) => deriv (u t) x) 0 = 0) :
        ContDiff 2 fun (p : × ) => (fun (t x : ) => if 0 x then u t x else -u t (-x)) p.1 p.2

        The joint odd extension (in $x$) of a half-line wave solution is jointly $C^2$ on $\mathbb{R}^2$, under the standard regularity and compatibility hypotheses.

        theorem WaveEquation1D.odd_extension_wave_negative_time (u : ) (_hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (_hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (_hu_boundary : ∀ (t : ), u t 0 = 0) (t x : ) (_ht : ¬0 t) :
        deriv (fun (t' : ) => deriv (fun (t'' : ) => if 0 x then u t'' x else -u t'' (-x)) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => if 0 x'' then u t x'' else -u t (-x'')) x') x

        The joint odd extension (in $x$) of a half-line wave solution continues to satisfy the wave equation $\partial_t^2 = \partial_x^2$ also at negative times $t < 0$.

        theorem WaveEquation1D.odd_extension_regularity_and_wave_axiom (u : ) (_hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (_hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (_hu_boundary : ∀ (t : ), u t 0 = 0) :
        (ContDiff 2 fun (p : × ) => (fun (t x : ) => if 0 x then u t x else -u t (-x)) p.1 p.2) ∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => (fun (t x : ) => if 0 x then u t x else -u t (-x)) t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => (fun (t x : ) => if 0 x then u t x else -u t (-x)) t x'') x') x

        The joint odd extension (in $x$) of a half-line wave solution is jointly $C^2$ on $\mathbb{R}^2$ and satisfies the wave equation $\partial_t^2 = \partial_x^2$ on all of $\mathbb{R}^2$.

        theorem WaveEquation1D.odd_extension_solves_fullline (f g : ) (u : ) (_hf : ContDiffOn 2 f (Set.Ici 0)) (_hg : ContDiffOn 1 g (Set.Ici 0)) (_hf0 : f 0 = 0) (hg0 : g 0 = 0) (hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (hu_boundary : ∀ (t : ), u t 0 = 0) (hu_init_pos : ∀ (x : ), 0 xu 0 x = f x) (hu_init_vel : ∀ (x : ), 0 < xHasDerivAt (fun (t : ) => u t x) (g x) 0) :
        have ũ := fun (t x : ) => if 0 x then u t x else -u t (-x); (ContDiff 2 fun (p : × ) => ũ p.1 p.2) (∀ (t x : ), deriv (fun (t' : ) => deriv (fun (t'' : ) => ũ t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => ũ t x'') x') x) (∀ (x : ), ũ 0 x = oddExtension f x) ∀ (x : ), HasDerivAt (fun (t : ) => ũ t x) (oddExtension g x) 0

        The joint odd extension $\tilde{u}$ (in $x$) of a half-line wave solution $u$ solves the full-line wave equation on $\mathbb{R}^2$ with initial position $\tilde{f}$ (the odd extension of $f$) and initial velocity $\tilde{g}$ (the odd extension of $g$).

        theorem WaveEquation1D.dAlembert_halfline_uniqueness (f g : ) (u : ) (hf : ContDiffOn 2 f (Set.Ici 0)) (hg : ContDiffOn 1 g (Set.Ici 0)) (hf0 : f 0 = 0) (hg0 : g 0 = 0) (hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (hu_boundary : ∀ (t : ), u t 0 = 0) (hu_init_pos : ∀ (x : ), 0 xu 0 x = f x) (hu_init_vel : ∀ (x : ), 0 < xHasDerivAt (fun (t : ) => u t x) (g x) 0) (t x : ) :
        0 t0 xu t x = dAlembertHalfLine f g t x

        Uniqueness for the half-line wave equation: any $C^2$ solution $u$ on $[0, \infty) \times [0, \infty)$ with $u(t, 0) = 0$, $u(0, x) = f(x)$ and $\partial_t u(0, x) = g(x)$ must coincide with the half-line d'Alembert solution.

        theorem WaveEquation1D.dAlembert_halfline_corollary (f g : ) (u : ) (hf : ContDiffOn 2 f (Set.Ici 0)) (hg : ContDiffOn 1 g (Set.Ici 0)) (hf0 : f 0 = 0) (hg0 : g 0 = 0) (hu_reg : ContDiffOn 2 (fun (p : × ) => u p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0)) (hu_wave : ∀ (t x : ), 0 t0 xderiv (fun (t' : ) => deriv (fun (t'' : ) => u t'' x) t') t = deriv (fun (x' : ) => deriv (fun (x'' : ) => u t x'') x') x) (hu_boundary : ∀ (t : ), u t 0 = 0) (hu_init_pos : ∀ (x : ), 0 xu 0 x = f x) (hu_init_vel : ∀ (x : ), 0 < xHasDerivAt (fun (t : ) => u t x) (g x) 0) :
        (∀ (t x : ), 0 t0 xu t x = dAlembertHalfLine f g t x) ContDiffOn 2 (fun (p : × ) => dAlembertHalfLine f g p.1 p.2) (Set.Ici 0 ×ˢ Set.Ici 0) (∀ (t x : ), 0 t0 xt xdAlembertHalfLine f g t x = (f (x + t) + f (x - t)) / 2 + ( (z : ) in x - t..x + t, g z) / 2) ∀ (t x : ), 0 t0 xx tdAlembertHalfLine f g t x = (f (x + t) - f (t - x)) / 2 + ( (z : ) in t - x..x + t, g z) / 2

        Corollary 4.0.1: the unique $C^2$ solution to the $1+1$ dimensional initial + boundary value problem $-\partial_t^2 u + \partial_x^2 u = 0$ on $[0, \infty) \times [0, \infty)$ with $u(t, 0) = 0$, $u(0, x) = f(x)$, and $\partial_t u(0, x) = g(x)$ is given by the half-line d'Alembert formula. It coincides with $\frac{1}{2}(f(x+t) + f(x-t)) + \frac{1}{2} \int_{x-t}^{x+t} g(z)\,dz$ for $0 \le t \le x$, and with $\frac{1}{2}(f(x+t) - f(t-x)) + \frac{1}{2}\int_{t-x}^{x+t} g(z)\,dz$ for $0 \le x \le t$.