In 6.3 Step Functions & Discontinuous Forcing a force switched on and off, and the shorter we made the pulse the less the solver cared. Now push that to the limit: a pulse so short that all we can still say about it is how hard it hit. A hammer on a spring, a bat on a ball, a gust that lasts a blink, a vortex squeezed into a point. The mathematical object is the Dirac delta, and its payoff is large: the response to a unit hammer blow, the impulse response, tells you the response to any force, which is the idea behind the Green’s function of 5.5 Variation of Parameters and the transfer function of the lesson after this one. We keep the spring-mass-damper of 5.3 Mechanical Vibrations: Spring–Mass–Damper: , , .
Transcript
- A hammer blow, a bat on a ball, a gust that lasts a blink. Take a pulse of width epsilon and height one over epsilon, so its area is one, and squeeze it. It gets taller and thinner, the area stays one, and the limit is the Dirac delta. It is not a function.
- What converges is the integral against a smooth function. For cosine at a equals 1, the averages over width epsilon are 0.452841, 0.497364, 0.519045, 0.529728, heading for cosine of 1, 0.540302. That is sifting: delta picks out f of a.
- At a, the pulse transform is e to the minus a s times one minus e to the minus epsilon s, over epsilon s. The fraction tends to one, so the transform of delta is e to the minus a s. At s equals 2 the ratio climbs 0.8242, 0.906346, 0.951626, 0.975412.
- Now the hammer. Integrate the equation of motion across a short pulse. The damping and spring terms shrink with epsilon, but J does not. So the position stays at zero and the momentum jumps: x prime of 0 plus is J over m, 0.5 meters per second.
- A real pulse delivers a little less, because the spring and damper take a share. At epsilon 0.025 the three terms are 0.941746, 0.048124 and 0.010130, and they add to the impulse. The end velocities, 0.158271 up to 0.486437, close in on 0.5.
- After the blow the mass rings freely. In the transform domain, P of s times X equals J. Complete the square, alpha 2, beta 9.79796: h of t is 0.051031 e to the minus 2 t times sine of 9.79796 t, peaking at 0.037807. It is the Green's function.
- As epsilon shrinks, the pulse response collapses onto h. The largest gaps are 2.54 times 10 to the minus 2, 1.74 times 10 to the minus 2, 1.05 times 10 to the minus 2, then 5.78 and 3.01 times 10 to the minus 3. The ratios creep toward 2: first order in epsilon.
- The mechanism is a delay. A pulse delivers its momentum on average epsilon over 2 late, so the response is h of t minus epsilon over 2. The steepest slope of h is 0.5, so the gap is about epsilon over 4: 3.13 times 10 to the minus 3 at epsilon 0.0125, against 3.01 observed.
- Blows add. Three unit blows, one damped period T apart, 0.641275 seconds, ring in phase: a sum of shifted impulse responses. The peak is 0.051199, 1.354 times one blow, far below 3 because of damping. A gust is many small kicks: a convolution with h.
- Now the grid. A spike narrower than the step is seen only by stages that land inside it. With h 0.05 and epsilon 0.025, only the first stage does, with weight h over 6: one third of the impulse. The gap is 2.51 times 10 to the minus 2, and refining the grid does not fix it cleanly.
- The fix: do not integrate the spike. Start at x equals zero with velocity J over m and integrate the unforced equation. The gaps at h 0.05, 0.02, 0.01 are 5.12 times 10 to the minus 5, 1.28 times 10 to the minus 6, 7.9 times 10 to the minus 8: fourth order.
- The same idea in space: a point vortex is a delta of vorticity, and from memory its swirl speed falls as gamma over 2 pi r. It blows up at the center like the pulse height, so codes smooth it into a small core. An impulse is a change of state.
- So: the delta is the limit of unit-area pulses, defined by sifting. Its transform is e to the minus a s. A blow jumps the velocity by J over m, and h is the inverse of one over P of s. Blows add as shifted copies. Next: convolution and the transfer function.
From a pulse to a delta
Take a rectangular pulse of width and height , so its area is (the steps of the last lesson build it: ). Squeeze and the pulse gets taller and thinner while the area stays . The Dirac delta is what these pulses approach, but they approach it only in one sense: pointwise the heights blow up to infinity at and the limit is not a function. What converges is the integral against a test function. For smooth and a pulse placed at ,
That limit is the sifting property, and it is the entire definition: . So the delta is a thing that only makes sense under an integral. Read as a shorthand for “take the limit of the pulses after integrating”. Two more properties follow from the same picture. Its area is (take ). And : a pulse in of width is a pulse in of width , so for the same height it has of the area.
How fast do the averages converge? For and the exact value is . The averages over are , , , for . The errors are , , , : they halve with , so the error is first order in the width. The reason is the Taylor expansion , whose average over the window is ; here . Block A of the lab cell below prints these numbers, and you will meet the same first-order error again in the numerics.
Its Laplace transform
Place the pulse at : . The step lesson gives the transform at once,
For small , , so the fraction tends to and
This is just the sifting property with . The case is the one to be careful with: the pulse starts exactly at the lower limit of the integral, so we agree that the transform integral starts at , just before the blow, and counts all of the delta. Block B integrates the definition numerically for a pulse at with and divides by ; the ratio is for , climbing to with a gap that halves each time, the same first-order behaviour. The sim reports the same ratio as its "" line.
The delta and the step
The step jumps from to , and the pulse is the step’s smoothed-out slope: if the jump is spread over a ramp of width , the slope on the ramp is for seconds, which is exactly . So one says . Be honest about what this means: a true step has no derivative at the jump, and is not a function, so the statement is shorthand for the limit above. It can be made precise in the only way that works for deltas, under an integral, by integration by parts. For a window containing ,
which is the sifting property again. It also agrees with the transform: . So the derivative rule from 6.1 The Laplace Transform keeps working across jumps, provided we use the value just before . This is the practical meaning of : differentiating a signal with a jump, in the transform world, produces a delta.
What a hammer blow does to a spring
A hammer delivers an impulse (units N s, the momentum given to the mass). Model it as a pulse of height on and integrate across it:
Over a time the position cannot move by much: changes by about , so the term and the integral both shrink with while does not. In the limit only the first term survives:
The blow does not move the mass, it changes its momentum instantly. For N s and kg that is m/s. Block C checks the balance at : , , , and these add to , so is rather than because the spring and damper took a small share. As the pulse narrows, is , , , , for , closing in on . The sim prints this at the end of the pulse for any width.
The impulse response
After the blow nothing pushes: the mass rings freely from the state . In the transform domain the same story is one line. With and rest initial conditions, where , so
The function is the impulse response, and is the transfer function. Complete the square: with and , so
Check the mechanism. This is the free vibration from the previous modules with and : its sine coefficient is , as above. It starts at with slope , peaks at s at m, and by has swung through to . The two derivations agree because they are the same statement: a delta force and an initial velocity jump are the same physics.
Why this equals the Green’s function. Variation of parameters in 5.5 Variation of Parameters built a particular solution from a kernel (written there for the standard form, with the equation divided by ). Think of the force as a stack of tiny blows, one at each time of strength . The blow at rings as afterwards, so the system’s total response is the sum,
For constant coefficients the Green’s function depends only on the elapsed time . This integral is the convolution, and turning it into the product is the next lesson, 6.5 Convolution & Transfer Functions.
Narrowing the pulse
The sim fires a pulse of unit area, high and wide, at the spring from rest. The thin curve is the exact response to that pulse, built from two step responses. The thick curve is . Read the “halving table”. At the largest gap over is , , , , for . The observed ratios between successive rows are , , , , creeping toward (the next rows give , , ): the error is proportional to , as with the sifting averages, but only once is small against the oscillation period of s.
The mechanism is a delay. A pulse of width delivers its momentum on average after the start, so and the gap is about . The steepest slope of is its initial slope , so the prediction is : at that is against the observed .
Repeated blows and gusts
A system is linear, so blows add. If blows land at times , then and
Each blow starts its own ringing, with no memory of the others. Try three unit blows spaced by exactly one damped period s. After the third, every ringing is in phase and sums to with , because and each earlier blow has had longer to decay. The largest displacement is then m, which is times the single-blow peak of ; blow-for-blow tapping in rhythm builds up, but damping caps the build-up far below the a lossless system would give. Block D prints these numbers and also integrates the ODE with each blow applied as a velocity jump ; the two agree to .
A delta cannot be sampled
A grid stores values, not integrals, and the area of a pulse is an integral. Hand a spike of height to a time stepper and three things can go wrong, all visible in the sim’s “spike” mode, where the force for is evaluated at RK4’s stage times. If is smaller than a step, the stages that land inside the pulse carry the whole weight, and the delivered momentum depends on how many stages happened to land there, not on . Take and : only the first stage, at , sees the pulse, and RK4 gives it weight , so the solver delivers of the intended impulse. The response is then short, and since , we expect a gap of about . The sim shows , where an exact pulse of this width would give . Refining the grid does not repair this smoothly: the spike gaps at for are , , and , not a clean decreasing sequence.
The fix is the one in the step lesson, taken to its conclusion. Do not integrate the spike. Use the momentum jump we derived: start at , and integrate the unforced ODE. This is exact in the delta limit, so the only error left is the solver’s own. At the gap to is , and . The ratios are for a step ratio of (and ) and for halving: fourth order, which is what RK4 promises. Switch the sim to “kick” and watch the dots land on .
Computing it
Block A prints the averages and errors quoted above, block B the ratios , and block C the momentum balance (and at , where the balance sums to again).
Block D prints , , the peaks and and the agreement. Now do the exercise: simulate a narrow pulse, find symbolically from its transform, and compare.
Concept checks
Problems
Solve with and find .
Show worked solution
Transform: , so and . Before , . At the delta has made jump from to , the area of the delta divided by the coefficient of , and after that it decays freely. .
An undamped oscillator starts at rest. Find and so that the mass is again at rest after the second blow, and say why the timing works.
Show worked solution
The impulse response is (inverse of ), so for . Choose , half the period of the oscillator. Then , and gives afterwards. Mechanism: half a period after the first blow the mass is back at moving with velocity ; the second blow adds to the velocity and stops it exactly at the origin. Any other timing leaves some ringing behind.
For with rest initial conditions, find , the time of its first peak, and the ratio of consecutive peaks.
Show worked solution
, so . The first peak is where : , i.e. , so and . Successive peaks of the same sign are one damped period apart and differ by the factor . Successive extremes of either sign are apart, with ratio .
Use a pulse of width at to show , and give the size of the error for finite .
Show worked solution
. As this tends to , and the error is first order in with slope : the Taylor estimate is exactly the first term.
Key Takeaways
- The delta is the limit of unit-area pulses of height and width . It is not a function: it only has meaning under an integral, where (sifting).
- , the limit of ; the transform integral starts at so a delta at counts fully.
- is shorthand: a jump differentiates to a delta, made precise by integration by parts under an integral.
- A hammer blow of impulse leaves the position alone and jumps the velocity by : integrate the ODE across the pulse and the and terms vanish with .
- The impulse response is ; for the spring it is , the free vibration from , and it is the Green’s function, in the standard form.
- Repeated blows or a gust give (or ): superposition of shifted impulse responses.
- A width- pulse stands in for the delta with an error proportional to (observed halving ratios approach 2), but a grid cannot sample the spike reliably, so apply impulses as state jumps.
- Next, 6.5 Convolution & Transfer Functions turns the integral into the product .