Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
derivative of (Dirac delta function)

Subject: derivative of (Dirac delta function)

From: Dr.K

Date: 29 Jun, 2011 08:53:20

Message: 1 of 3

Hi everyone, how can i write a first order derivative of Dirac(x)
respect to x.
i know that Dirac delta is derivative of Heaviside. in Fact i had to
solve:
∂u(x,t))/∂x where: u(x,t)=Dirac(x-t)
in MATLAB i wrote:
        if (x-t)==0
            k=1;
        else
            k=0;
        end
        u(x,t)=k;
for Dirac Function, like as impulse force in any x from domain.
but now what should i do to achieving ∂u(x,t))/∂x?

Subject: derivative of (Dirac delta function)

From: Roger Stafford

Date: 29 Jun, 2011 21:04:11

Message: 2 of 3

"Dr.K" <kananipour@gmail.com> wrote in message <dc1cdc58-f910-4863-a9c1-7df889612857@q12g2000prb.googlegroups.com>...
> Hi everyone, how can i write a first order derivative of Dirac(x)
> respect to x.
> i know that Dirac delta is derivative of Heaviside. in Fact i had to
> solve:
> ?u(x,t))/?x where: u(x,t)=Dirac(x-t)
> in MATLAB i wrote:
> if (x-t)==0
> k=1;
> else
> k=0;
> end
> u(x,t)=k;
> for Dirac Function, like as impulse force in any x from domain.
> but now what should i do to achieving ?u(x,t))/?x?
- - - - - - - - - - -
  That is not a correct formulation for the Dirac delta function. For x-t equal to zero, it should be k = inf. However, you cannot compute with the Dirac delta function using ordinary numerical quantities. In those terms there is no such function. It would have to have the property that its integral taken over the range [0,0] is one, which in the numerical world is impossible. No such function has this property. It is not a coincidence that this function is contained in the symbolic toolbox where such concepts are symbolically meaningful. Taking its derivative would be all the more meaningless in the numerical world.

  In whatever problem you are dealing with if you express it in such a way that the parameters involved approach a limit which represents what the Dirac delta function or its derivative would be, that might give you the kind of solution you are seeking.

  For example, suppose you define a function h(x;e) by:

 h(x;e) = -1, if x < -pi*e
 h(x;e) = (1+sin(x/e))/2, if -pi*e <= x <= +pi*e
 h(x;e) = +1, if x > +pi*e

This looks like a smoothed-out version of the Heaviside function. If you allow e to approach zero, this does in fact approach the Heaviside function. If we take the derivative of h(x;e) w.r. to x, multiply it by some arbitrary continuous function f(x), and then integrate that product from -inf to +inf, this integral will always approach f(0) as e is allowed to approach zero. This is precisely how the Dirac delta function is supposed to act, but it only makes sense in terms of such a limiting process.

  Presumably in the problem you are faced with you could do a similar analysis in terms of what should behave, in the limit, like the derivative of the Dirac delta function.

Roger Stafford

Subject: derivative of (Dirac delta function)

From: Dr.K

Date: 1 Jul, 2011 13:39:36

Message: 3 of 3

thank you Mr. Roger
your comment was useful, any way i had to find numerical solution for
firs order derivative of pn respect to x where pn is:
pn=dirac(x-f*t)*cos(x-F/2)
we know:
integral(f(x)*dirac(x-f*t),x)=f(f*t); and
integral(f(x)*dirac'(x-f*t),x)=-f'(f*t); and
pn'=dirac'(x-f*t)*cos(x-F/2)-dirac(x-f*t)*sin(x-F/2);
so:
pn'=0
and it's not correct!

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us