[Date Index]
[Thread Index]
[Author Index]
Re: Integration of UnitStep has bugs!? help!
*To*: mathgroup at smc.vnet.net
*Subject*: [mg51613] Re: Integration of UnitStep has bugs!? help!
*From*: p-valko at tamu.edu (Peter Valko)
*Date*: Wed, 27 Oct 2004 01:54:30 -0400 (EDT)
*References*: <clcnlr$q41$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
If I may suggest first make it simple:
h[t_] = UnitStep[t] - UnitStep[t - 2];
Now Case 1:
Integrate[ h[t - a], {t, -Infinity, Infinity}]
gives
2
but Case 2:
Integrate[ h[t - a], {t, -Infinity, 0}] +
Integrate[ h[t - a], {t, 0, Infinity}]
does not give 2, because the two integrals are handled independently
and they have no way to now that the "a" is of the same sign in each
of them. So Mathematica keeps all options open and gives a rather
complicated expression.
However, Case 3:
Integrate[ h[t - a], {
t, -Infinity, 0}, Assumptions -> {a > 0}] +
Integrate[ h[
t - a], {t, 0, Infinity}, Assumptions -> {a > 0}]
will give 2 as expected.
The bottomline is, that when you use an undefined parameter like "a",
Mathematica has hard time to guess what you assume implicitely about
"a".
Sometimes it can figure it out but in general you need to be more
specific using Assumptions.
I hope this helps
P.
"news" <symbio at s.dn.com> wrote in message news:<clcnlr$q41$1 at smc.vnet.net>...
> 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: Integration of UnitStep has bugs!? help!**
Next by Date:
**matrix switching Markov sequence**
Previous by thread:
**Re: Integration of UnitStep has bugs!? help!**
Next by thread:
**smooth eigenvector**
| |