4.6.31 · D4Ordinary Differential Equations

Exercises — Heaviside step function and Dirac delta function

2,176 words10 min readBack to topic

Before we start, three tools we will reuse — each stated in plain words so no symbol is unearned:

Figure — Heaviside step function and Dirac delta function

Level 1 — Recognition

Exercise 1.1

Sketch and evaluate at , , and describe what the product looks like.

Recall Solution 1.1

The symbol means "0 while , then 1 once " — a light switch flipping on at . (At exactly the value is left unspecified; it never affects an integral.)

  • At : since , we are before the switch, so .
  • At : since , we are after the switch, so .
  • The difference is a boxcar: it is for and everywhere else. Picture a flat-topped box sitting on the interval — the teal box in Figure s01, whose left edge rises at and right edge drops at .

Exercise 1.2

Evaluate .

Recall Solution 1.2

The delta's only job is to sift: . It ignores the whole integrand except the single point . Here , so the answer is . What it looks like: the plum spike in Figure s01 stands exactly at ; multiplying by then integrating just reads off the curve's height there and throws away everything else.

Exercise 1.3

Write and .

Recall Solution 1.3

Both come straight from the defining integral .

  • Step: . (The lower limit is because below it; the comes from doing the integral, the from starting at .)
  • Delta: . (Sift at ; no because there is no interval to integrate — the delta does it for us.) The single difference — a or not — is the fingerprint of "step vs impulse."

Level 2 — Application

Exercise 2.1

Find .

Recall Solution 2.1

This is already shifted: the thing being cubed is , matching the argument of the switch. So we use the delay stamp directly.

  • Identify , with .
  • (from , the standard ).
  • Stamp the delay: .

Exercise 2.2

Find . (Careful — this is not pre-shifted.)

Recall Solution 2.2

The switch is but the multiplier is , not . The delay stamp demands the multiplier be written in terms of . So rewrite: Then .

  • First piece: , stamped: .
  • Second piece: .
  • Total: .

Exercise 2.3

Compute .

Recall Solution 2.3

Sifting picks with , (which is inside , so it counts). Answer: .


Level 3 — Analysis

Exercise 3.1

Write the piecewise function using steps, then transform it:

Recall Solution 3.1

Build with boxcars (a boxcar is 1 only on ):

  • on : .
  • on : contributes nothing.
  • for : (a half-line switched on at 3). So . (The values at are irrelevant to what follows — single points don't affect the integral.)

Transform. First recall the base fact ; by linearity . For the step formula gives . For , split (so the multiplier becomes a function of , as the delay stamp requires): Total:

Exercise 3.2

Evaluate carefully, watching the limits — compare the same integrand over two different intervals:

Recall Solution 3.2

The spike sits at . A finite integral only "catches" it if lies inside the interval of integration.

  • : the spike at is outside , so the integral is .
  • : now , so sifting gives . Moral: the delta contributes only when its spike location is inside the limits — a case students forget when the limits are finite rather than to .

Exercise 3.3

Find . State the answer for all , both cases.

Recall Solution 3.3

Strip the delay: let . Since , we have , so . The factor means "shift right by AND gate it with ": Now simplify the phase using the periodicity of sine (period ): because subtracting a full period from the angle leaves sine unchanged. So this equals . Written by case (boundary value at read as a limit, hence ):


Level 4 — Synthesis

Exercise 4.1

Solve the impulse IVP , . Give by cases and describe the motion.

Recall Solution 4.1

Transform both sides. Using and : Invert. This is exactly Exercise 3.3's expression: By cases (the boundary value at is a limit, so ): Motion: the mass sits perfectly still until ; the hammer-kick at launches a steady oscillation of amplitude and angular frequency . See the plum kick and orange oscillation in Figure s02.

Exercise 4.2

Solve the step-forced IVP , . Give by cases and state the value it approaches as .

Recall Solution 4.2

Transform. , and : Partial fractions on the un-delayed core: , whose inverse is . Apply the delay stamp (shift by 2 + gate): By cases (boundary at read as a limit, giving ): As , , so — the steady state of .


Level 5 — Mastery

Exercise 5.1

A mass–spring system (step on at , then an impulse) is driven by Find for all , expressed by cases on the intervals , , .

Recall Solution 5.1

Transform each piece.

  • , , .
  • LHS with zero ICs: . So

Invert each term. First, , whose inverse is . Call this . Also .

  • Term 1: (no delay).
  • Term 2: . Now because cosine has period (subtracting a full turn leaves it unchanged), so this is .
  • Term 3: . Now — shifting sine by half a period flips its sign (an odd-symmetry / half-period reflection). So this term is .

Assemble:

By cases (evaluate the switches on each interval; boundary values at are limits, and we verify continuity below):

1-\cos t & 0\le t<\pi\\[3pt] 1-\cos t-\sin t & \pi<t<2\pi\\[3pt] (1-\cos t)-(1-\cos t)-\sin t=-\sin t & t>2\pi. \end{cases}$$ **Reading the physics:** - $[0,\pi)$: the constant push $u(t)$ makes the spring rise and oscillate about $1$ as $1-\cos t$. - At $t=\pi$: the hammer $\delta(t-\pi)$ injects an extra $-\sin t$ swing. - At $t=2\pi$: the constant push switches **off** (the $-u(t-2\pi)$ boxcar edge), cancelling the $1-\cos t$ part and leaving pure $-\sin t$ oscillation forever after. Check continuity at $t=\pi$: both sides give $1-\cos\pi=2$ (the $\sin\pi=0$ term adds nothing) ✓. At $t=2\pi$: left side $1-\cos2\pi-\sin2\pi=0$; right side $-\sin2\pi=0$ ✓. Because the solution is continuous at both boundaries, the "$<$ vs $\le$" choice at $t=\pi,2\pi$ makes no difference to the value.

Recall Master checklist (hide and recite)

Step transform carries a 1/s; delta transform is a bare exponential. Delay stamp requires the multiplier written as a function of (t − a). Inverting always keeps the gate u(t − a). A finite integral catches only if lies inside the limits. A delta forcing a 2nd-order ODE jumps the velocity, not the position.

Related deeper reading: Impulse Response and Convolution, Piecewise and Periodic Forcing Functions.