Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Integration of UnitStep has bugs!? help!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51578] Integration of UnitStep has bugs!? help!
  • From: "news" <symbio at s.dn.com>
  • Date: Sat, 23 Oct 2004 00:22:21 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Can anyone explain why Integrate does not work propery with UnitStep 
function?  When you integrate from -inf to inf you get one answer, but when 
you split it to two sections (from -inf to 0, and then from 0 to +inf) you 
get a different answer.  Which is correct?  And why is Mathematica version 5 
has not fixed this problem yet?  See below.

In[1]:=
\!\(\(x[t_] = \((3 Exp[\(\(-1\)\/2\) t] UnitStep[t])\) +
DiracDelta[t + 3];\)\[IndentingNewLine]
\(h[t_] = UnitStep[t] - UnitStep[t - 2];\)\[IndentingNewLine]
\(eq1 =
Integrate[
x[a] h[t -
a], {a, \(-\[Infinity]\), \[Infinity]}];\)\[IndentingNewLine]
\(eq2 = Integrate[x[a] h[t - a], {a, 0, \[Infinity]}];\)\[IndentingNewLine]
\(eq3 =
Integrate[
x[a] h[t - a], {a, \(-\[Infinity]\), 0}];\)\[IndentingNewLine]
eq1\ // FullSimplify\[IndentingNewLine]
eq2 + eq3 // FullSimplify\)
Out[6]=
\!\(1\/2\ \((\(-\(\(6\ \((\(-2\) +
t)\)\)\/\@\((\(-2\) + t)\)\^2\)\) + \(6\ t\)\/\@t\^2 - \
\(1 + t\)\/\@\((1 + t)\)\^2 + \(3 + t\)\/\@\((3 + t)\)\^2)\)\)
Out[7]=
\!\(1\/2\ \((\(-\(\(1 +
t\)\/\@\((1 + t)\)\^2\)\) + \(3 + t\)\/\@\((3 + t)\)\^2)\) \
+ 6\ \((\(-1\) + \[ExponentialE]\^\(1 - t\/2\))\)\ UnitStep[\(-2\) +
t] + \((6 - 6\ \[ExponentialE]\^\(\(-t\)/2\))\)\ UnitStep[t]\)


  • Prev by Date: Re: Piecewise functions
  • Next by Date: Re: More on Delete Problems
  • Previous by thread: Re: Re: 1) Global Real Space and 2) Histogram Y-axis
  • Next by thread: Re: Integration of UnitStep has bugs!? help!