Derivative of sawtooth - interpretation of result
8 views (last 30 days)
Show older comments
Hi everyone. I derived a sawtooth function:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165736/image.png)
with the following code:
syms t
x=t*(heaviside(t)-heaviside(t-3));
y=diff(x);
The result is: y = heaviside(t) - heaviside(t - 3) - t*(dirac(t - 3) - dirac(t)). I don't understand why the delta Dirac is multiplied per t. I know that x(t)*delta(t-3)=x(0)*delta(t-3), but x(0)=0 thus, for matlab x(0)*delta(t-3)=0.
Thank you very much.
0 Comments
Answers (1)
David Goodmanson
on 3 Jul 2017
Edited: David Goodmanson
on 3 Jul 2017
Hello Gennaro,
This is just the formula for the derivative of a product,
t * ( heaviside(t) -heaviside(t-3) )
where
d/dt heaviside(t) = delta(t) and d/dt heaviside(t-3) = delta(t-3).
And as a distribution,
Integral x(t)*delta(t-3) dt = x(3)
and (assuming limits of integration include t=3)
Integral x(3)*delta(t-3) dt = x(3) * Integral delta(t-3) dt = x(3)
so effectively
(x(t)-x(3))*delta(t-3) = 0
not
(x(t)-x(0))*delta(t-3) = 0
2 Comments
David Goodmanson
on 3 Jul 2017
Edited: David Goodmanson
on 4 Jul 2017
Hello Gennaro, I will try to give a better version of what is in the answer. The delta "function" delta(t) is a kind of spike that has a nonzero value only at t=0, and the total area under its curve = 1. The translated function delta(t-3) is nonzero only when its argument is zero, so at t=3.
For the product t*delta(t-3), t=3 is the only value that matters and gives something nonzero, so you can substitute and effectively
t*delta(t-3) = 3*delta(t-3)
You can also look at what happens when you integrate across the location of the delta function.
fundamental definition:
Integral g(t)*delta(t-t0) dt = g(t0) for any g(t)
so if g(t) = t,
Integral t*delta(t-3) dt = 3
but
Integral 3*delta(t-3) dt = 3 (delta function has area 1)
so effectively
t*delta(t-3) = 3*delta(t-3)
If your prof wrote that effectively
t*delta(t-3) = delta(t-3)
I would say he or she made a mistake.
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!