Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

question (for Mathematica 6!)

65 views
Skip to first unread message

dimitris

unread,
May 4, 2007, 4:12:21 AM5/4/07
to
I don't have a copy of Mathematica 6 but having spent much time
reading the online documentation (not only because of curiosity!) I
have one question...

Can somebody explain me the introduction of the HeavisideTheta
function

http://reference.wolfram.com/mathematica/ref/HeavisideTheta.html

in version 6?

Note that the UnitStep function is still here

http://reference.wolfram.com/mathematica/ref/UnitStep.html

Dimitris


Owen, HL (Hywel)

unread,
May 5, 2007, 5:53:08 AM5/5/07
to
HeavisideTheta[0] is undefined
UnitStep[0] gives 1

Their integrals are the same (for example from -1 to 1).

And:
D[HeavisideTheta[x], x] is DiracDelta[x]
Whereas
D[UnitStep[x], x] is (-1 - DiscreteDelta[x] + UnitStep[-x] +
UnitStep[x])/(1 -
DiscreteDelta[x])

Hywel

Jens-Peer Kuska

unread,
May 5, 2007, 6:04:55 AM5/5/07
to
Hi,

{HeavisideTheta[#], UnitStep[#]} & /@ {-0.1, 0, 0.1}

gives

{{0, 0}, {HeavisideTheta[0], 1}, {1, 1}}

the Heaviside Theta function is a distribution, i.e.
it only exist/is defined in expressions like

Integrate[HeavisideTheta[x]*f[x],{x,-a,a}]

and it has no defined value at 0 (look for DiracDelta[]
that is also a distriution).

The UnitStep[] function is defined everywhere on the
axis and you don't need an integral to define it

Regards
Jens

Sseziwa Mukasa

unread,
May 5, 2007, 6:05:58 AM5/5/07
to

On May 4, 2007, at 4:09 AM, dimitris wrote:

> I don't have a copy of Mathematica 6 but having spent much time
> reading the online documentation (not only because of curiosity!) I
> have one question...
>
> Can somebody explain me the introduction of the HeavisideTheta
> function
>
> http://reference.wolfram.com/mathematica/ref/HeavisideTheta.html
>
> in version 6?
>
> Note that the UnitStep function is still here
>
> http://reference.wolfram.com/mathematica/ref/UnitStep.html

The value of HeavysideTheta[x] is not defined for x = 0, UnitStep[0]
is 1.

The difference is necessary for correct analysis.

Regards,

Ssezi


dimitris

unread,
May 5, 2007, 6:13:21 AM5/5/07
to
Thanks a lot to anyone replied to me.

Best Regards
Dimitris

=CF/=C7 dimitris =DD=E3=F1=E1=F8=E5:

Murray Eisenberg

unread,
May 5, 2007, 6:22:54 AM5/5/07
to
One difference is that HeavisideTheta[0] is undefined, whereas
UnitStep[0] is 1. The docs say this: see the descriptions say this
implicitly at the tops of the functions' "home pages"; the "Possible
Issues" section on HeavisideTheta explicitly says "HeavisideTheta stays
unevaluated for vanishing argument."

Another is that, as the docs say, Piecewise Expand does not operate upon
HeavisideTheta because "it is a distribution and not a piecewise-defined
function." That is, PiecewiseExpand[HeavisideTheta[a]] just returns
HeavisideTheta. However, PiecewiseExpand[UnitStep[x]] returns, in
InputForm, Piecewise[{{1,x>=0}},0].


dimitris wrote:
> I don't have a copy of Mathematica 6 but having spent much time
> reading the online documentation (not only because of curiosity!) I
> have one question...
>
> Can somebody explain me the introduction of the HeavisideTheta
> function
>
> http://reference.wolfram.com/mathematica/ref/HeavisideTheta.html
>
> in version 6?
>
> Note that the UnitStep function is still here
>
> http://reference.wolfram.com/mathematica/ref/UnitStep.html
>
> Dimitris
>
>

--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

dimitris

unread,
May 5, 2007, 6:32:26 AM5/5/07
to
Yes I know these.

I just wonder why until now (5.2) we had for example

Integrate[DiracDelta[x], x]
D[%, x]

UnitStep[x]
DiracDelta[x]

and now this has changed.

Anyway...thanks for you response.

Dimitris

"Owen, HL (Hywel)" <h.l....@dl.ac.uk> wrote:

HeavisideTheta[0] is undefined
UnitStep[0] gives 1

Their integrals are the same (for example from -1 to 1).

And:
D[HeavisideTheta[x], x] is DiracDelta[x]
Whereas
D[UnitStep[x], x] is (-1 - DiscreteDelta[x] + UnitStep[-x] +
UnitStep[x])/(1 -
DiscreteDelta[x])

Hywel
=CF/=C7 dimitris =DD=E3=F1=E1=F8=E5:

Andrzej Kozlowski

unread,
May 5, 2007, 6:35:37 AM5/5/07
to

On 4 May 2007, at 17:09, dimitris wrote:

> I don't have a copy of Mathematica 6 but having spent much time
> reading the online documentation (not only because of curiosity!) I
> have one question...
>
> Can somebody explain me the introduction of the HeavisideTheta
> function
>
> http://reference.wolfram.com/mathematica/ref/HeavisideTheta.html
>
> in version 6?
>
> Note that the UnitStep function is still here
>
> http://reference.wolfram.com/mathematica/ref/UnitStep.html
>
> Dimitris
>
>


I think WRI has finally decided to make a clear distinction between
distributions (HeavisideTheta) and piecwise defined fucntions
(UnitStep). The difference can be seen here:

In[2]:= PiecewiseExpand[HeavisideTheta[x]]
Out[2]= HeavisideTheta[x]

In[3]:= PiecewiseExpand[UnitStep[x]]
Out[3]= Piecewise[{{1, x >= 0}}]

HeavisideTheta is a distribution and not a piecewise-defined
function so is not expanded. Another example that illustrates this:

Integrate[D[HeavisideTheta[x], x], x]
HeavisideTheta[x]
Integrate[D[UnitStep[x], x], x]
0

Note that in traditional notation both HeavisideTheta[x] and UnitStep=

[x] look identical (at least to me!) . It might mean that
introduction of HeavisideTheta is a result of, on the one hand,
recognizing that the behaviour of UnitStep was incorrect (for a
distribution) and, on the other, of trying to preserve compatibility. =

However, since UnitStep is reamins fully documented and supported, we =

now have two superfically similar functions (the more the merrier!)
but with a deep underlying difference in meaning.

Note also the following:

in 5.2:

Integrate[DiracDelta[x - a], {x, b, c},
Assumptions -> a =E2=88=88 Reals && b < c]


UnitStep[a - b]*UnitStep[c - a]

In 6.0:

Integrate[DiracDelta[x - a], {x, b, c}, Assumptions -> Element[a,
Reals] && b < c]
HeavisideTheta[a - b]*HeavisideTheta[c - a]


In TraditionalForm the outputs look identical.

Andrzej Kozlowski=

Bhuvanesh

unread,
May 6, 2007, 1:54:58 AM5/6/07
to
The issue was that UnitStep was being used sometimes as a piecewise function and sometimes as a distribution. HeavisideTheta was introduced to take on the distribution role, so that UnitStep is now just a piecewise function. Also, UnitStep[0] returns 1, whereas HeavisideTheta[0] returns unevaluated.

Bhuvanesh,
Wolfram Research

0 new messages