#set document(title: "6.3 Convolution", author: "Jiří Lebl") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 6.3#h(0.6em)Convolution === Convolution We said that the Laplace transformation of a product is not the product of the transforms. All hope is not lost however. We simply have to use a different type of a “product.” Take two functions #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$] defined for #math.equation(block: false, alt: "t greater than or equal to 0")[$t ≥ 0$], and define the #emph[convolution]#math.equation(block: false, alt: "to the power 1")[$1$] of #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$] as #math.equation(block: true, alt: "open parenthesis f * g close parenthesis open parenthesis t close parenthesis equals d e f ∫ 0 t f open parenthesis τ close parenthesis g open parenthesis t minus τ close parenthesis d τ .")[$( f * g ) ( t ) limits(=)^(upright(d) upright(e) upright(f)) ∫_(0)^(t) f ( τ ) g ( t − τ ) d τ .$] As you can see, the convolution of two functions of #math.equation(block: false, alt: "t")[$t$] is another function of #math.equation(block: false, alt: "t")[$t$]. #examplebox("Example 1")[][ Take #math.equation(block: false, alt: "f open parenthesis t close parenthesis equals e to the power t")[$f ( t ) = e^(t)$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis equals t")[$g ( t ) = t$] for #math.equation(block: false, alt: "t greater than or equal to 0")[$t ≥ 0$]. Then #math.equation(block: true, alt: "open parenthesis f * g close parenthesis open parenthesis t close parenthesis equals ∫ 0 t e to the power τ open parenthesis t minus τ close parenthesis d τ equals e to the power t minus t minus 1 .")[$( f * g ) ( t ) = ∫_(0)^(t) e^(τ) ( t − τ ) d τ = e^(t) − t − 1 .$] To solve the integral we did one integration by parts. ] #examplebox("Example 2")[][ Take #math.equation(block: false, alt: "f open parenthesis t close parenthesis equals sin open parenthesis ω t close parenthesis")[$f ( t ) = sin ( ω t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis equals cos open parenthesis ω t close parenthesis")[$g ( t ) = cos ( ω t )$] for #math.equation(block: false, alt: "t greater than or equal to 0")[$t ≥ 0$]. Then #math.equation(block: true, alt: "open parenthesis f * g close parenthesis open parenthesis t close parenthesis equals ∫ 0 t sin open parenthesis ω τ close parenthesis cos open parenthesis ω open parenthesis t minus τ close parenthesis close parenthesis d τ .")[$( f * g ) ( t ) = ∫_(0)^(t) sin ( ω τ ) cos ( ω ( t − τ ) ) d τ .$] We apply the identity #math.equation(block: true, alt: "cos open parenthesis θ close parenthesis sin open parenthesis ψ close parenthesis equals the fraction 1 over 2 open parenthesis sin open parenthesis θ plus ψ close parenthesis minus sin open parenthesis θ minus ψ close parenthesis close parenthesis")[$cos ( θ ) sin ( ψ ) = frac(1, 2) ( sin ( θ + ψ ) − sin ( θ − ψ ) )$] Hence, #math.equation(block: true, alt: "open parenthesis f * g close parenthesis open parenthesis t close parenthesis equals ∫ 0 t the fraction 1 over 2 open parenthesis sin open parenthesis ω t close parenthesis minus sin open parenthesis ω t minus 2 ω τ close parenthesis close parenthesis d τ; equals [ the fraction 1 over 2 τ sin open parenthesis ω t close parenthesis plus the fraction 1 over 4 ω cos open parenthesis 2 ω τ minus ω t close parenthesis ] τ equals 0 t; equals the fraction 1 over 2 t sin open parenthesis ω t close parenthesis .")[$( f * g ) ( t ) = ∫_(0)^(t) frac(1, 2) ( sin ( ω t ) − sin ( ω t − 2 ω τ ) ) d τ \ = attach([ frac(1, 2) τ sin ( ω t ) + frac(1, 4 ω) cos ( 2 ω τ − ω t ) ], t: t, b: τ = 0) \ = frac(1, 2) t sin ( ω t ) .$] The formula holds only for #math.equation(block: false, alt: "t greater than or equal to 0")[$t ≥ 0$]. We assumed that #math.equation(block: false, alt: "f")[$f$] and #math.equation(block: false, alt: "g")[$g$] are zero (or simply not defined) for negative #math.equation(block: false, alt: "t")[$t$]. ] The convolution has many properties that make it behave like a product. Let #math.equation(block: false, alt: "c")[$c$] be a constant and #math.equation(block: false, alt: "f")[$f$], #math.equation(block: false, alt: "g")[$g$], and #math.equation(block: false, alt: "h")[$h$] be functions then #math.equation(block: true, alt: "f * g equals g * f; open parenthesis c f close parenthesis * g equals f * open parenthesis c g close parenthesis equals c open parenthesis f * g close parenthesis; open parenthesis f * g close parenthesis * h equals f * open parenthesis g * h close parenthesis")[$f * g = g * f \ ( c f ) * g = f * ( c g ) = c ( f * g ) \ ( f * g ) * h = f * ( g * h )$] The most interesting property for us, and the main result of this section is the following theorem. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Let #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$] be of exponential type, then #math.equation(block: true, alt: "ℒ { open parenthesis f * g close parenthesis open parenthesis t close parenthesis } equals ℒ { ∫ 0 t f open parenthesis τ close parenthesis g open parenthesis t minus τ close parenthesis d τ } equals ℒ { f open parenthesis t close parenthesis } ℒ { g open parenthesis t close parenthesis } .")[$ℒ \{ ( f * g ) ( t ) \} = ℒ \{ ∫_(0)^(t) f ( τ ) g ( t − τ ) d τ \} = ℒ \{ f ( t ) \} ℒ \{ g ( t ) \} .$] ] In other words, the Laplace transform of a convolution is the product of the Laplace transforms. The simplest way to use this result is in reverse. #examplebox("Example 3")[][ Suppose we have the function of #math.equation(block: false, alt: "s")[$s$] defined by #math.equation(block: true, alt: "the fraction 1 over open parenthesis s plus 1 close parenthesis s squared equals the fraction 1 over s plus 1 the fraction 1 over s squared .")[$frac(1, ( s + 1 ) s^(2)) = frac(1, s + 1) frac(1, s^(2)) .$] We recognize the two entries of Table 6.1.2. That is #math.equation(block: true, alt: "ℒ to the power minus 1 { the fraction 1 over s plus 1 } equals e to the power minus t a n d ℒ to the power minus 1 { the fraction 1 over s squared } equals t .")[$ℒ^(− 1) \{ frac(1, s + 1) \} = e^(− t) " " " " " " " " " " " " upright(a) upright(n) upright(d) " " " " " " " " " " " " ℒ^(− 1) \{ frac(1, s^(2)) \} = t .$] Therefore, #math.equation(block: true, alt: "ℒ to the power minus 1 { the fraction 1 over s plus 1 the fraction 1 over s squared } equals ∫ 0 t τ e to the power minus open parenthesis t minus τ close parenthesis d τ equals e to the power minus t plus t minus 1 .")[$ℒ^(− 1) \{ frac(1, s + 1) frac(1, s^(2)) \} = ∫_(0)^(t) τ e^(− ( t − τ )) d τ = e^(− t) + t − 1 .$] The calculation of the integral involved an integration by parts. ] === Solving ODEs The next example demonstrates the full power of the convolution and the Laplace transform. We can give the solution to the forced oscillation problem for any forcing function as a definite integral. #examplebox("Example 4")[][ Find the solution to #math.equation(block: true, alt: "x double prime plus ω 0 2 x equals f open parenthesis t close parenthesis , x open parenthesis 0 close parenthesis equals 0 , x prime open parenthesis 0 close parenthesis equals 0 ,")[$x^(″) + ω_(0)^(2) x = f ( t ) , " " " " " " " " " " x ( 0 ) = 0 , " " " " " " " " " " x^(′) ( 0 ) = 0 ,$] for an arbitrary function #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$]. We first apply the Laplace transform to the equation. Denote the transform of #math.equation(block: false, alt: "x open parenthesis t close parenthesis")[$x ( t )$] by #math.equation(block: false, alt: "X open parenthesis s close parenthesis")[$X ( s )$] and the transform of #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] by #math.equation(block: false, alt: "F open parenthesis s close parenthesis")[$F ( s )$] as usual. #math.equation(block: true, alt: "s squared X open parenthesis s close parenthesis plus ω 0 2 X open parenthesis s close parenthesis equals F open parenthesis s close parenthesis ,")[$s^(2) X ( s ) + ω_(0)^(2) X ( s ) = F ( s ) ,$] or in other words #math.equation(block: true, alt: "X open parenthesis s close parenthesis equals F open parenthesis s close parenthesis the fraction 1 over s squared plus ω 0 2 .")[$X ( s ) = F ( s ) frac(1, s^(2) + ω_(0)^(2)) .$] We know #math.equation(block: true, alt: "ℒ to the power minus 1 { the fraction 1 over s squared plus ω 0 2 } equals the fraction sin open parenthesis ω sub 0 t close parenthesis over ω sub 0 .")[$ℒ^(− 1) \{ frac(1, s^(2) + ω_(0)^(2)) \} = frac(sin ( ω_(0) t ), ω_(0)) .$] Therefore, #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals ∫ 0 t f open parenthesis τ close parenthesis the fraction sin open parenthesis ω sub 0 open parenthesis t minus τ close parenthesis close parenthesis over ω sub 0 d τ ,")[$x ( t ) = ∫_(0)^(t) f ( τ ) frac(sin ( ω_(0) ( t − τ ) ), ω_(0)) d τ ,$] or if we reverse the order #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals ∫ 0 t the fraction sin open parenthesis ω sub 0 τ close parenthesis over ω sub 0 f open parenthesis t minus τ close parenthesis d τ .")[$x ( t ) = ∫_(0)^(t) frac(sin ( ω_(0) τ ), ω_(0)) f ( t − τ ) d τ .$] Let us notice one more feature of this example. We can now see how Laplace transform handles resonance. Suppose that #math.equation(block: false, alt: "f open parenthesis t close parenthesis equals cos open parenthesis ω sub 0 t close parenthesis")[$f ( t ) = cos ( ω_(0) t )$]. Then #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals ∫ 0 t the fraction sin open parenthesis ω sub 0 τ close parenthesis over ω sub 0 cos open parenthesis ω sub 0 open parenthesis t minus τ close parenthesis close parenthesis d τ equals the fraction 1 over ω sub 0 ∫ 0 t sin open parenthesis ω sub 0 τ close parenthesis cos open parenthesis ω sub 0 open parenthesis t minus τ close parenthesis close parenthesis d τ .")[$x ( t ) = ∫_(0)^(t) frac(sin ( ω_(0) τ ), ω_(0)) cos ( ω_(0) ( t − τ ) ) d τ = frac(1, ω_(0)) ∫_(0)^(t) sin ( ω_(0) τ ) cos ( ω_(0) ( t − τ ) ) d τ .$] We have computed the convolution of sine and cosine in Example 6.3.2. Hence #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals open parenthesis the fraction 1 over ω sub 0 close parenthesis open parenthesis the fraction 1 over 2 t sin open parenthesis ω sub 0 t close parenthesis close parenthesis equals the fraction 1 over 2 ω sub 0 sin open parenthesis ω sub 0 t close parenthesis .")[$x ( t ) = ( frac(1, ω_(0)) ) ( frac(1, 2) t sin ( ω_(0) t ) ) = frac(1, 2 ω_(0)) sin ( ω_(0) t ) .$] Note the #math.equation(block: false, alt: "t")[$t$] in front of the sine. The solution, therefore, grows without bound as #math.equation(block: false, alt: "t")[$t$] gets large, meaning we get resonance. Similarly, we can solve any constant coefficient equation with an arbitrary forcing function #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] as a definite integral using convolution. A definite integral, rather than a closed form solution, is usually enough for most practical purposes. It is not hard to numerically evaluate a definite integral. ] === Volterra Integral Equation A common integral equation is the Volterra integral equation#math.equation(block: false, alt: "squared")[$2$] #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals f open parenthesis t close parenthesis plus ∫ 0 t g open parenthesis t minus τ close parenthesis x open parenthesis τ close parenthesis d τ")[$x ( t ) = f ( t ) + ∫_(0)^(t) g ( t − τ ) x ( τ ) d τ$] where #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$] are known functions and #math.equation(block: false, alt: "x open parenthesis t close parenthesis")[$x ( t )$] is an unknown we wish to solve for. To find #math.equation(block: false, alt: "x open parenthesis t close parenthesis")[$x ( t )$], we apply the Laplace transform to the equation to obtain #math.equation(block: true, alt: "X open parenthesis s close parenthesis equals F open parenthesis s close parenthesis plus G open parenthesis s close parenthesis X open parenthesis s close parenthesis ,")[$X ( s ) = F ( s ) + G ( s ) X ( s ) ,$] where #math.equation(block: false, alt: "X open parenthesis s close parenthesis")[$X ( s )$], #math.equation(block: false, alt: "F open parenthesis s close parenthesis")[$F ( s )$], and #math.equation(block: false, alt: "G open parenthesis s close parenthesis")[$G ( s )$] are the Laplace transforms of #math.equation(block: false, alt: "x open parenthesis t close parenthesis")[$x ( t )$], #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$], and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$], respectively. We find #math.equation(block: true, alt: "X open parenthesis s close parenthesis equals the fraction F open parenthesis s close parenthesis over 1 minus G open parenthesis s close parenthesis .")[$X ( s ) = frac(F ( s ), 1 − G ( s )) .$] To find #math.equation(block: false, alt: "x open parenthesis t close parenthesis")[$x ( t )$] we now need to find the inverse Laplace transform of #math.equation(block: false, alt: "X open parenthesis s close parenthesis")[$X ( s )$]. #examplebox("Example 5")[][ Solve #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals e to the power minus t plus ∫ 0 t sinh open parenthesis t minus τ close parenthesis x open parenthesis τ close parenthesis d τ")[$x ( t ) = e^(− t) + ∫_(0)^(t) sinh ( t − τ ) x ( τ ) d τ$] We apply Laplace transform to obtain #math.equation(block: true, alt: "X open parenthesis s close parenthesis equals the fraction 1 over s plus 1 plus the fraction 1 over s squared minus 1 X open parenthesis s close parenthesis ,")[$X ( s ) = frac(1, s + 1) + frac(1, s^(2) − 1) X ( s ) ,$] or #math.equation(block: true, alt: "X open parenthesis s close parenthesis equals the fraction the fraction 1 over s plus 1 over 1 minus the fraction 1 over s squared minus 1 equals the fraction s minus 1 over s squared minus 2 equals the fraction s over s squared minus 2 minus the fraction 1 over s squared minus 2 .")[$X ( s ) = frac(frac(1, s + 1), 1 − frac(1, s^(2) − 1)) = frac(s − 1, s^(2) − 2) = frac(s, s^(2) − 2) − frac(1, s^(2) − 2) .$] It is not hard to apply Table 6.1.1 to find #math.equation(block: true, alt: "x open parenthesis t close parenthesis equals cosh open parenthesis the square root of 2 t close parenthesis minus the fraction 1 over the square root of 2 sinh open parenthesis the square root of 2 t close parenthesis .")[$x ( t ) = cosh ( sqrt(2) t ) − frac(1, sqrt(2)) sinh ( sqrt(2) t ) .$] ] === Footnotes \[1\] For those that have seen convolution defined before, you may have seen it defined as #math.equation(block: false, alt: "f * g close parenthesis open parenthesis t close parenthesis equals ∫ minus infinity infinity f open parenthesis τ close parenthesis g open parenthesis t minus τ close parenthesis d τ")[$f * g \) \( t \) = ∫_(− ∞)^(∞) f \( τ \) g \( t − τ \) d τ$]. This definition agrees with (6.3.1) if you define #math.equation(block: false, alt: "f open parenthesis t close parenthesis")[$f ( t )$] and #math.equation(block: false, alt: "g open parenthesis t close parenthesis")[$g ( t )$] to be zero for #math.equation(block: false, alt: "t less than 0")[$t < 0$]. When discussing the Laplace transform the definition we gave is sufficient. Convolution does occur in many other applications, however, where you may have to use the more general definition with infinities. \[2\] Named for the Italian mathematician Vito Volterra (1860–1940).