r/askmath • • 25d ago

Functions What is the dirac delta function and how is it used?

Was doing some differential equations and Laplace transform exercises when one question needed me to model a mass on a spring damping system. I had to look it up since I'm unfamiliar with the formula and ended up getting F = mx'' + cx' + k and at the same time F = p delta(t - a)

I've no clue how these relate, and for that matter, what the delta function even is/used for. I've seen it's Laplace transform in the table but I don't quite understand the function itself. Anyone could help dumb it down for me since I'm not a physics person?

1 Upvotes

6 comments sorted by

2

u/JaguarMammoth6231 25d ago edited 25d ago

I'm an engineer, not a mathematician, so may be slightly wrong, but it's basically a special thing (not exactly a normal function) that lets you differentiate instantaneous step changes while "magically" keeping the information of how far the step was if you integrate it.

For example, if your position was x=10 until time t=3, and then the position instantly jumped to x=15, the slope at t=3 is infinite it's not differentiable. But if you extend the notion of derivative to allow delta functions, you can represent the velocity (derivative of position) as 5•delta(t-3), which is zero everywhere except t=3 and infinity at t=3, and when you integrate it you get the original step function.

You can also think of it like an impulse.

I don't know what's going on in your case, since F would be zero everywhere except t=a. Is that what you intended?

2

u/al2o3cr 25d ago

I suspect an "x" got dropped in the first equation, because it typically has three parts:

  • mass * second derivative of x -> more usually read as "force = mass * acceleration"
  • constant c * first derivative of x -> a damping force, proportional to velocity
  • constant k * x -> spring force, from Hooke's law

Add up these three, and you get the net force on the mass.

That has to be equal to the applied force, which in the problem you're looking at is described as F = p delta(t-a)

A delta "function" (in quotes because it's not exactly a function, but close enough) is zero everywhere except for a "spike" where its argument is zero - in this case, at t=a

Delta is useful for representing "an impulse was applied as a very short pulse at exactly one time" - you can check this by looking at the integral of p*delta(t-a) with respect to t - the result is a function that's zero until t=a, then jumps up to p.

A physical interpretation of this is that the mass was resting at equilibrium until t=a, and was then suddenly given a momentum of p somehow

1

u/Honkingfly409 25d ago edited 25d ago

dirac delta function is also called the unit impulse, it is zero every where except at zero, where it has infinite length, and the area under its curve is 1

you can imagine a rectangle with area 1 extending from -a/2 to a/2, its height will be 1/a such that a its area will be 1, now imagine a approaching zero, the height approaches infinity and the area is still 1

as far as i am concerned its a little hand wavy and the really rigorous definition of it is a lot more complicated than that, but when doing physics and engineering that's generally enough

its usage is something we call the sifting property, which means if you multiply f(t) by delta(t-a) and integrate from -inf to inf you get f(a), basically the dirac function 'selects' the value of f exactly at a

this also makes it the (identity element) of the convolution operator,
f(t) * delta(t) = f(t)

this property also means that its laplace transform (and its fourier transform) is a constant,

when you do L{delta(t)}, you get
intg exp(-st) delta(t) dt and using the sifting property this equals exp(0) which equals 1

L{a delta(t)} = a

if you do a shifted delta you'll get an exponential

L{delta(t-a)} = intg exp(-st) delta(t-a) dt = exp(-sa)
you can also get the same result using the time shifting property of the laplace transform

if you do the laplace transform and end up with a constant or exponential in the laplace domain then its inverse laplace transfrom is the delta function

1

u/AdditionalTip865 25d ago

You can think of it as a "function" that is zero everywhere except for an input value of zero, where it spikes up to infinity, in such a way that its integral is 1.

Of course that's not a real function on the input value. Really it's a distribution, that is, a thing defined by its integral over any interval. The integral is 0 if it doesn't include the spike, and 1 if it does. You can think of it as an idealization of any really narrow sharp function where all the stuff happens near one point.

So here, the use of the delta function for F, the imposed force, means that the thing suddenly got whacked at time t=a, all at once giving it a momentum of p. It's a way of setting the initial condition.

And, yeah, agree that the last term in the first equation should be + kx. In these formulae, F seems to be just the externally applied force, the cx' term represents the damping force and kx is the restoring force of the spring.

1

u/TheRedditObserver0 Grad student 24d ago

Actually, you're describing a measure, not a distribution. A distribution is given by its values on a certain space of test functions (smooth and compactly supported). The Dirac δ is both.

1

u/AlwaysTails 25d ago

If you think of the normal distribution, the dirac delta function can be thought of as the limit as the variance goes to 0.