       Re: Integrate UnitStep, Bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg50328] Re: [mg50303] Integrate UnitStep, Bug?
• From: DrBob <drbob at bigfoot.com>
• Date: Fri, 27 Aug 2004 02:57:50 -0400 (EDT)
• References: <200408261050.GAA16330@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```I think both results are wrong, and the correct answer is Abs[b-a]. Unless these Plots are wrong?

fr[e_] := UnitStep[-e];
fl[e_] := UnitStep[-(e - b)];

b = 2; a = 3;
Plot[fl[e](fr[e - a] - fr[e]), {e, -5, 5}, PlotStyle -> {Thickness[0.01]}]

b = 5; a = 3;
Plot[fl[e](fr[e - a] - fr[e]), {e, -5, 5}, PlotStyle -> {Thickness[0.01]}]

Bobby

On Thu, 26 Aug 2004 06:50:47 -0400 (EDT), <jens at fika.de> wrote:

> The following code returns the incorrect result (-a+b) UnitStep[a-b]. It
> should be Min[a,b].
>
> fr[e_]=UnitStep[-e];
> fl[e_]=UnitStep[-(e-b)];
> Integrate[fl[e](fr[e-a]-fr[e]),{e,-Infinity,Infinity},Assumptions->{b>0,a>0}]
>
> Is this a known bug? Should I avoid using step functions with Integrate?
>
>
>

--
DrBob at bigfoot.com
www.eclecticdreams.net

```

• Prev by Date: Re: Q: Solve gives complex solution where there is a noncomplex solution how to get the last one?
• Next by Date: Re: Is a For loop always a no-no?
• Previous by thread: Integrate UnitStep, Bug?
• Next by thread: Re: Integrate UnitStep, Bug?