Mode of #cas

inverseLaplace

A function whose Laplace transform is a given proper rational function, with a theorem about the integral.

#cas [inverseLaplace s t] F
finds a function of t whose Laplace transform is the proper rational function F of s, and proves the transform for every s above a bound.

When you solve a differential equation with Laplace transforms, you often end up holding a rational function of s, and inverseLaplace takes you back to the function of t. The theorem is the one that laplace proves: the integral of e−stf(t) over Set.Ioi 0, the half-line t>0, converges and equals F as written.

The function comes from the partial fractions of F, with one group of terms for each factor of the denominator. Those terms are exact when the roots of the factor are rational or roots of a quadratic, and otherwise they are built over enclosures that the kernel checks. There is one limit to what the theorem says. Mathlib has no uniqueness theorem for the Laplace transform, so the report gives an inverse transform, and the theorem does not say it is the only one.

Details and Options

  • For the printed f and the bound σ of the domain, the theorem is ∀ s : ℝ, σ < s → IntegrableOn (fun t ↦ Real.exp (-(s * t)) * f) (Set.Ioi 0) ∧ ∫ t in Set.Ioi 0, Real.exp (-(s * t)) * f = F, with F as written.
  • A written divisor of F is an expression that F, as you wrote it, divides by. σ is at least every real zero of a written divisor, cancelled ones included, and every growth rate of a term of f.
  • F is a proper rational function of s with rational coefficients and no parameters. The denominator of F in lowest terms and every written divisor have degree at most 8, and f has at most 16 terms.
  • The terms of f are c * t ^ n * exp (a * t) * g t with g one of 1, cos (b * t), sin (b * t), cosh (b * t) and sinh (b * t), where b may be a square root, and terms over the roots of factors without a closed form.
  • The denominator is factored as apart factors it. A repeated factor whose roots are known only by enclosures is refused, and so is an input inside a section with variables.
  • There are no options. A proof can take the printed theorem as a hypothesis and specialize it, as under Applications.

Examples (20)#

Basic Examples (2)

A sine, with the theorem for every s>0:

In[1]:=
#cas [inverseLaplace s t] (1 / (s ^ 2 + 4))
Out[1]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

12sin(2t)
1/2*sin(2*t)
Domain
s > 0
Input (proper rational function of s)
(1 / (s ^ 2 + 4))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  0 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.sin (2 * t))) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.sin (2 * t)) = 1 / (s ^ 2 + 4)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      0 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.sin (2 * t))) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.sin (2 * t)) = 1 / (s ^ 2 + 4)

    Checked by Lean’s kernel


Two simple poles give two exponentials:

In[2]:=
#cas [inverseLaplace s t] (1 / ((s - 1) * (s + 2)))
Out[2]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

13et−13e−2t
1/3*exp(t) - 1/3*exp(-2*t)
Domain
s > 1
Input (proper rational function of s)
(1 / ((s - 1) * (s + 2)))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  1 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 3 * Real.exp t - 1 / 3 * Real.exp (-2 * t)))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 3 * Real.exp t - 1 / 3 * Real.exp (-2 * t)) =
        1 / ((s - 1) * (s + 2))
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      1 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 3 * Real.exp t - 1 / 3 * Real.exp (-2 * t)))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 3 * Real.exp t - 1 / 3 * Real.exp (-2 * t)) =
            1 / ((s - 1) * (s + 2))

    Checked by Lean’s kernel

Scope (8)

A simple pole, and a pole of order 3:

In[3]:=
#cas [inverseLaplace s t] (1 / (s - 2))
Out[3]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

e2t
exp(2*t)
Domain
s > 2
Input (proper rational function of s)
(1 / (s - 2))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  2 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.exp (2 * t)) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.exp (2 * t) = 1 / (s - 2)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      2 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.exp (2 * t)) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.exp (2 * t) = 1 / (s - 2)

    Checked by Lean’s kernel

In[4]:=
#cas [inverseLaplace s t] (1 / (s - 1) ^ 3)
Out[4]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

12t2et
1/2*t^2*exp(t)
Domain
s > 1
Input (proper rational function of s)
(1 / (s - 1) ^ 3)

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  1 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * (t ^ 2 * Real.exp t))) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * (t ^ 2 * Real.exp t)) = 1 / (s - 1) ^ 3
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      1 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * (t ^ 2 * Real.exp t))) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * (t ^ 2 * Real.exp t)) = 1 / (s - 1) ^ 3

    Checked by Lean’s kernel


Irrational real poles give a hyperbolic sine, with the bound 2, and irrational frequencies give a sine:

In[5]:=
#cas [inverseLaplace s t] (1 / (s ^ 2 - 2))
Out[5]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

sinh(2t)2
sinh(sqrt(2)*t)/sqrt(2)
Domain
s > √2
Input (proper rational function of s)
(1 / (s ^ 2 - 2))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  √2 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (Real.sinh (√2 * t) / √2)) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (Real.sinh (√2 * t) / √2) = 1 / (s ^ 2 - 2)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      √2 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (Real.sinh (√2 * t) / √2)) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (Real.sinh (√2 * t) / √2) = 1 / (s ^ 2 - 2)

    Checked by Lean’s kernel

In[6]:=
#cas [inverseLaplace s t] (1 / (s ^ 2 + 2))
Out[6]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

sin(2t)2
sin(sqrt(2)*t)/sqrt(2)
Domain
s > 0
Input (proper rational function of s)
(1 / (s ^ 2 + 2))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  0 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (Real.sin (√2 * t) / √2)) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (Real.sin (√2 * t) / √2) = 1 / (s ^ 2 + 2)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      0 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (Real.sin (√2 * t) / √2)) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (Real.sin (√2 * t) / √2) = 1 / (s ^ 2 + 2)

    Checked by Lean’s kernel


A real pole and a pair of complex poles:

In[7]:=
#cas [inverseLaplace s t] ((2 * s + 3) / ((s + 1) * (s ^ 2 + 2 * s + 5)))
Out[7]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

14e−t−14e−tcos(2t)+e−tsin(2t)
1/4*exp(-t) - 1/4*exp(-t)*cos(2*t) + exp(-t)*sin(2*t)
Domain
s > -1
Input (proper rational function of s)
((2 * s + 3) / ((s + 1) * (s ^ 2 + 2 * s + 5)))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  -1 < s →
    MeasureTheory.IntegrableOn
        (fun t ↦
          Real.exp (-(s * t)) *
            (1 / 4 * Real.exp (-t) - 1 / 4 * (Real.exp (-t) * Real.cos (2 * t)) +
              Real.exp (-t) * Real.sin (2 * t)))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0,
          Real.exp (-(s * t)) *
            (1 / 4 * Real.exp (-t) - 1 / 4 * (Real.exp (-t) * Real.cos (2 * t)) +
              Real.exp (-t) * Real.sin (2 * t)) =
        (2 * s + 3) / ((s + 1) * (s ^ 2 + 2 * s + 5))
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      -1 < s →
        MeasureTheory.IntegrableOn
            (fun t ↦
              Real.exp (-(s * t)) *
                (1 / 4 * Real.exp (-t) - 1 / 4 * (Real.exp (-t) * Real.cos (2 * t)) +
                  Real.exp (-t) * Real.sin (2 * t)))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0,
              Real.exp (-(s * t)) *
                (1 / 4 * Real.exp (-t) - 1 / 4 * (Real.exp (-t) * Real.cos (2 * t)) +
                  Real.exp (-t) * Real.sin (2 * t)) =
            (2 * s + 3) / ((s + 1) * (s ^ 2 + 2 * s + 5))

    Checked by Lean’s kernel


A repeated pair of complex poles gives a term tcost:

In[8]:=
#cas [inverseLaplace s t] (1 / (s ^ 2 + 1) ^ 2)
Out[8]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

12sin(t)−12tcos(t)
1/2*sin(t) - 1/2*t*cos(t)
Domain
s > 0
Input (proper rational function of s)
(1 / (s ^ 2 + 1) ^ 2)

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  0 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.sin t - 1 / 2 * (t * Real.cos t)))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.sin t - 1 / 2 * (t * Real.cos t)) =
        1 / (s ^ 2 + 1) ^ 2
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      0 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.sin t - 1 / 2 * (t * Real.cos t)))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.sin t - 1 / 2 * (t * Real.cos t)) =
            1 / (s ^ 2 + 1) ^ 2

    Checked by Lean’s kernel


Decimal coefficients are read as exact rationals:

In[9]:=
#cas [inverseLaplace s t] (0.5 / (s - 0.25))
Out[9]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

12e14t
1/2*exp(1/4*t)
Domain
s > 1/4
Input (proper rational function of s)
(0.5 / (s - 0.25))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  1 / 4 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.exp (1 / 4 * t))) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.exp (1 / 4 * t)) = 0.5 / (s - 0.25)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      1 / 4 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 / 2 * Real.exp (1 / 4 * t))) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 / 2 * Real.exp (1 / 4 * t)) = 0.5 / (s - 0.25)

    Checked by Lean’s kernel


A cubic with the rational root −1. The quadratic that remains gives the other roots, so every term is exact:

In[10]:=
#cas [inverseLaplace s t] (1 / (s ^ 3 + 1))
Out[10]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

13e−t−13e12tcos(34t)+12e12tsin(34t)34
1/3*exp(-t) - 1/3*exp(1/2*t)*cos(sqrt(3/4)*t) + 1/2*exp(1/2*t)*sin(sqrt(3/4)*t)/sqrt(3/4)
Domain
s > 1/2
Input (proper rational function of s)
(1 / (s ^ 3 + 1))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  1 / 2 < s →
    MeasureTheory.IntegrableOn
        (fun t ↦
          Real.exp (-(s * t)) *
            (1 / 3 * Real.exp (-t) - 1 / 3 * (Real.exp (1 / 2 * t) * Real.cos (√(3 / 4) * t)) +
              1 / 2 * (Real.exp (1 / 2 * t) * (Real.sin (√(3 / 4) * t) / √(3 / 4)))))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0,
          Real.exp (-(s * t)) *
            (1 / 3 * Real.exp (-t) - 1 / 3 * (Real.exp (1 / 2 * t) * Real.cos (√(3 / 4) * t)) +
              1 / 2 * (Real.exp (1 / 2 * t) * (Real.sin (√(3 / 4) * t) / √(3 / 4)))) =
        1 / (s ^ 3 + 1)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      1 / 2 < s →
        MeasureTheory.IntegrableOn
            (fun t ↦
              Real.exp (-(s * t)) *
                (1 / 3 * Real.exp (-t) - 1 / 3 * (Real.exp (1 / 2 * t) * Real.cos (√(3 / 4) * t)) +
                  1 / 2 * (Real.exp (1 / 2 * t) * (Real.sin (√(3 / 4) * t) / √(3 / 4)))))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0,
              Real.exp (-(s * t)) *
                (1 / 3 * Real.exp (-t) - 1 / 3 * (Real.exp (1 / 2 * t) * Real.cos (√(3 / 4) * t)) +
                  1 / 2 * (Real.exp (1 / 2 * t) * (Real.sin (√(3 / 4) * t) / √(3 / 4)))) =
            1 / (s ^ 3 + 1)

    Checked by Lean’s kernel


A cubic without rational roots. Its roots are known by enclosures that the kernel checks, and the bound is the upper end of the enclosure of the real root 23:

In[11]:=
#cas [inverseLaplace s t] (1 / (s ^ 3 - 2))
Out[11]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed), with the roots of s^3 - 2 = 0: r₁ ∈ (1.25992104, 1.25992106), z₁ = α ± iβ, α ∈ [-0.62996054, -0.62996050], β ∈ [1.09112362, 1.09112366]

1/6*r₁*exp(r₁*t) + re(1/3*z₁)*exp(re(z₁)*t)*cos(im(z₁)*t) - im(1/3*z₁)*exp(re(z₁)*t)*sin(im(z₁)*t)
Domain
s > 1.25992106
Input (proper rational function of s)
(1 / (s ^ 3 - 2))

Checked by Lean’s kernel: Inverse Laplace transform

let r₁ := CAS.AlgRoot.real [-2, 0, 0, 1] 1.25992104 1.25992106;
let z₁ := CAS.AlgRoot.complex [-2, 0, 0, 1] (-0.62996052) 1.09112364 2e-8;
∀ (s : ℝ),
  62996053 / 50000000 < s →
    MeasureTheory.IntegrableOn
        (fun t ↦
          Real.exp (-(s * t)) *
            (1 / 6 * r₁ * Real.exp (r₁ * t) + (1 / 3 * z₁).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
              (1 / 3 * z₁).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t))))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0,
          Real.exp (-(s * t)) *
            (1 / 6 * r₁ * Real.exp (r₁ * t) + (1 / 3 * z₁).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
              (1 / 3 * z₁).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t))) =
        1 / (s ^ 3 - 2)
The certificate: 1 checked step
  1. Inverse Laplace transform

    let r₁ := CAS.AlgRoot.real [-2, 0, 0, 1] 1.25992104 1.25992106;
    let z₁ := CAS.AlgRoot.complex [-2, 0, 0, 1] (-0.62996052) 1.09112364 2e-8;
    ∀ (s : ℝ),
      62996053 / 50000000 < s →
        MeasureTheory.IntegrableOn
            (fun t ↦
              Real.exp (-(s * t)) *
                (1 / 6 * r₁ * Real.exp (r₁ * t) + (1 / 3 * z₁).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                  (1 / 3 * z₁).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t))))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0,
              Real.exp (-(s * t)) *
                (1 / 6 * r₁ * Real.exp (r₁ * t) + (1 / 3 * z₁).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                  (1 / 3 * z₁).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t))) =
            1 / (s ^ 3 - 2)

    Checked by Lean’s kernel


s4+4 stays whole, and its two pairs of complex roots are enclosed:

In[12]:=
#cas [inverseLaplace s t] (1 / (s ^ 4 + 4))
Out[12]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed), with the roots of s^4 + 4 = 0: z₁ = α ± iβ, α ∈ [-1.00000002, -0.99999998], β ∈ [0.99999998, 1.00000002], z₂ = α ± iβ, α ∈ [0.99999998, 1.00000002], β ∈ [0.99999998, 1.00000002]

re(-(1/8*z₁))*exp(re(z₁)*t)*cos(im(z₁)*t) - im(-(1/8*z₁))*exp(re(z₁)*t)*sin(im(z₁)*t) + re(-(1/8*z₂))*exp(re(z₂)*t)*cos(im(z₂)*t) - im(-(1/8*z₂))*exp(re(z₂)*t)*sin(im(z₂)*t)
Domain
s > 1.00000002
Input (proper rational function of s)
(1 / (s ^ 4 + 4))

Checked by Lean’s kernel: Inverse Laplace transform

let z₁ := CAS.AlgRoot.complex [4, 0, 0, 0, 1] (-1) 1 2e-8;
let z₂ := CAS.AlgRoot.complex [4, 0, 0, 0, 1] 1 1 2e-8;
∀ (s : ℝ),
  50000001 / 50000000 < s →
    MeasureTheory.IntegrableOn
        (fun t ↦
          Real.exp (-(s * t)) *
            ((-(1 / 8 * z₁)).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                  (-(1 / 8 * z₁)).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t)) +
                (-(1 / 8 * z₂)).re * (Real.exp (z₂.re * t) * Real.cos (z₂.im * t)) -
              (-(1 / 8 * z₂)).im * (Real.exp (z₂.re * t) * Real.sin (z₂.im * t))))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0,
          Real.exp (-(s * t)) *
            ((-(1 / 8 * z₁)).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                  (-(1 / 8 * z₁)).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t)) +
                (-(1 / 8 * z₂)).re * (Real.exp (z₂.re * t) * Real.cos (z₂.im * t)) -
              (-(1 / 8 * z₂)).im * (Real.exp (z₂.re * t) * Real.sin (z₂.im * t))) =
        1 / (s ^ 4 + 4)
The certificate: 1 checked step
  1. Inverse Laplace transform

    let z₁ := CAS.AlgRoot.complex [4, 0, 0, 0, 1] (-1) 1 2e-8;
    let z₂ := CAS.AlgRoot.complex [4, 0, 0, 0, 1] 1 1 2e-8;
    ∀ (s : ℝ),
      50000001 / 50000000 < s →
        MeasureTheory.IntegrableOn
            (fun t ↦
              Real.exp (-(s * t)) *
                ((-(1 / 8 * z₁)).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                      (-(1 / 8 * z₁)).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t)) +
                    (-(1 / 8 * z₂)).re * (Real.exp (z₂.re * t) * Real.cos (z₂.im * t)) -
                  (-(1 / 8 * z₂)).im * (Real.exp (z₂.re * t) * Real.sin (z₂.im * t))))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0,
              Real.exp (-(s * t)) *
                ((-(1 / 8 * z₁)).re * (Real.exp (z₁.re * t) * Real.cos (z₁.im * t)) -
                      (-(1 / 8 * z₁)).im * (Real.exp (z₁.re * t) * Real.sin (z₁.im * t)) +
                    (-(1 / 8 * z₂)).re * (Real.exp (z₂.re * t) * Real.cos (z₂.im * t)) -
                  (-(1 / 8 * z₂)).im * (Real.exp (z₂.re * t) * Real.sin (z₂.im * t))) =
            1 / (s ^ 4 + 4)

    Checked by Lean’s kernel

Applications (2)

Solving an initial-value problem by transforms. For y'' + 4 * y = 0 with y 0 = 1 and y' 0 = 0, the transform Y satisfies s2Y−s+4Y=0, so Y=s/(s2+4), and the solution is cos2t:

In[13]:=
#cas [inverseLaplace s t] (s / (s ^ 2 + 4))
Out[13]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

cos(2t)
cos(2*t)
Domain
s > 0
Input (proper rational function of s)
(s / (s ^ 2 + 4))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  0 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.cos (2 * t)) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.cos (2 * t) = s / (s ^ 2 + 4)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      0 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.cos (2 * t)) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.cos (2 * t) = s / (s ^ 2 + 4)

    Checked by Lean’s kernel


The integral equation of the printed theorem as a hypothesis in a proof, specialized at s=1. Only the three standard axioms are used:

In[14]:=
theorem inverseLaplace_at_one
    (h : ∀ s : ℝ, 0 < s → ∫ t in Set.Ioi (0 : ℝ),
      Real.exp (-(s * t)) * (1 / 2 * Real.sin (2 * t)) = 1 / (s ^ 2 + 4)) :
    ∫ t in Set.Ioi (0 : ℝ), Real.exp (-(1 * t)) * (1 / 2 * Real.sin (2 * t)) = 1 / 5 := by
  rw [h 1 one_pos]
  norm_num

#print axioms inverseLaplace_at_one
Out[14]=

inverseLaplace_at_one depends on the axioms propext, Classical.choice, Quot.sound.

Properties and Relations (2)

Dividing by s integrates: F(s)/s is the transform of ∫0tf. Here ∫0tsinudu=1−cost:

In[15]:=
#cas [inverseLaplace s t] (1 / (s * (s ^ 2 + 1)))
Out[15]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

1−cos(t)
1 - cos(t)
Domain
s > 0
Input (proper rational function of s)
(1 / (s * (s ^ 2 + 1)))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  0 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 - Real.cos t)) (Set.Ioi 0)
        MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 - Real.cos t) = 1 / (s * (s ^ 2 + 1))
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      0 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * (1 - Real.cos t)) (Set.Ioi 0)
            MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * (1 - Real.cos t) = 1 / (s * (s ^ 2 + 1))

    Checked by Lean’s kernel


Replacing s by s+1 multiplies the function by e−t. The terms of a divisor may come in any order:

In[16]:=
#cas [inverseLaplace s t] ((s + 3) / (s ^ 2 + 5 + 2 * s))
Out[16]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

e−tcos(2t)+e−tsin(2t)
exp(-t)*cos(2*t) + exp(-t)*sin(2*t)
Domain
s > -1
Input (proper rational function of s)
((s + 3) / (s ^ 2 + 5 + 2 * s))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  -1 < s →
    MeasureTheory.IntegrableOn
        (fun t ↦ Real.exp (-(s * t)) * (Real.exp (-t) * Real.cos (2 * t) + Real.exp (-t) * Real.sin (2 * t)))
        (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0,
          Real.exp (-(s * t)) * (Real.exp (-t) * Real.cos (2 * t) + Real.exp (-t) * Real.sin (2 * t)) =
        (s + 3) / (s ^ 2 + 5 + 2 * s)
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      -1 < s →
        MeasureTheory.IntegrableOn
            (fun t ↦ Real.exp (-(s * t)) * (Real.exp (-t) * Real.cos (2 * t) + Real.exp (-t) * Real.sin (2 * t)))
            (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0,
              Real.exp (-(s * t)) * (Real.exp (-t) * Real.cos (2 * t) + Real.exp (-t) * Real.sin (2 * t)) =
            (s + 3) / (s ^ 2 + 5 + 2 * s)

    Checked by Lean’s kernel

Possible Issues (6)

The theorem is about F as written, and Lean’s division by zero gives 0. So the bound is s>2, above the zero s=2 of a written divisor, although the transform of e−t exists for s>−1:

In[17]:=
#cas [inverseLaplace s t] ((s - 2) / ((s - 2) * (s + 1)))
Out[17]=

an inverse Laplace transform (its transform is F for s > σ; uniqueness is not claimed)

e−t
exp(-t)
Domain
s > 2
Input (proper rational function of s)
((s - 2) / ((s - 2) * (s + 1)))

Checked by Lean’s kernel: Inverse Laplace transform

∀ (s : ℝ),
  2 < s →
    MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.exp (-t)) (Set.Ioi 0) MeasureTheory.volume ∧
      ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.exp (-t) = (s - 2) / ((s - 2) * (s + 1))
The certificate: 1 checked step
  1. Inverse Laplace transform

    ∀ (s : ℝ),
      2 < s →
        MeasureTheory.IntegrableOn (fun t ↦ Real.exp (-(s * t)) * Real.exp (-t)) (Set.Ioi 0) MeasureTheory.volume ∧
          ∫ (t : ℝ) in Set.Ioi 0, Real.exp (-(s * t)) * Real.exp (-t) = (s - 2) / ((s - 2) * (s + 1))

    Checked by Lean’s kernel


An improper F has a polynomial part, the transform of Dirac deltas and their derivatives, and is refused. Subtract the polynomial part, here s−1, and invert the proper rest 1/(s+1):

In[18]:=
#cas [inverseLaplace s t] (s ^ 2 / (s + 1))
Out[18]=

Error

inverseLaplace: F is not proper; its polynomial part (Dirac deltas and their derivatives) is not supported

A factor e−as shifts the inverse transform by a, and is refused. Invert 1/s and shift the result by hand:

In[19]:=
#cas [inverseLaplace s t] (exp (-s) / s)
Out[19]=

Error

inverseLaplace: expected a proper rational function of s with rational coefficients (parameters are not supported)

Parameters are refused:

In[20]:=
#cas [inverseLaplace s t] (1 / (s - a))
Out[20]=

Error

inverseLaplace: expected a proper rational function of s with rational coefficients (parameters are not supported)

A repeated factor whose roots are known only by enclosures is refused:

In[21]:=
#cas [inverseLaplace s t] (1 / (s ^ 3 - 2) ^ 2)
Out[21]=

Error

inverseLaplace: the factor s^3 - 2 is repeated and its roots are known only by enclosures, which is not supported

The divisors must be polynomials. Write this one as (s - 1) / (s ^ 2 - 1):

In[22]:=
#cas [inverseLaplace s t] (1 / ((s ^ 2 - 1) / (s - 1)))
Out[22]=

Error

inverseLaplace: a divisor is itself a quotient; write F with polynomial divisors

See Also

laplace · apart · dsolve · factor