[Date Index]
[Thread Index]
[Author Index]
Re: Integrate UnitStep, Bug?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg50344] Re: Integrate UnitStep, Bug?
*From*: DrBob <drbob at bigfoot.com>
*Date*: Sat, 28 Aug 2004 04:37:56 -0400 (EDT)
*References*: <20040827101518.072$C0@newsreader.com> <opsdedkcwuiz9bcq@monster.cox-internet.com> <001601c48c4e$e1e75b30$b5803e44@Dell>
*Reply-to*: drbob at bigfoot.com
*Sender*: owner-wri-mathgroup at wolfram.com
Those are the plots I'm seeing, and I stand corrected.
I obviously had some kind of brain fart!
Bobby
On Fri, 27 Aug 2004 16:59:48 +0100, David W. Cantrell <DWCantrell at sigmaxi.org> wrote:
>> We're evidently not seeing the same plots.
>
> I'm running version 5.0.0 under Windows XP.
> For the first plot you mentioned, my Mathematica shows the function to be
> 1 between e=0 and e=2, and 0 elsewhere.
> For the second plot you mentioned, my Mathematica shows the function to be
> 1 between e=0 and e=3, and 0 elsewhere.
> Are those not the plots you're getting?
> Anyway, the plots on my machine are correct (well, except for the spurious
> vertical line segments, which I'm sure you've learned to ignore in such
> cases). Those plots are of course consistent with the answer Min[a,b],
> which I had verified by hand long before I saw your original post.
>
> Regards,
> David Cantrell
>
>> On Fri, 27 Aug 2004 10:15:18 -0400 (EDT), David W. Cantrell
> <DWCantrell at sigmaxi.org> wrote:
>>
>> > DrBob <drbob at bigfoot.com> wrote:
>> >> I think both results are wrong, and the correct answer is Abs[b-a].
>> >
>> > I have no idea why you think that's the correct answer, especially
> since
>> > the plots which you mention below are correct (at least on my machine)
> and
>> > clearly show that Abs[b-a] is incorrect.
>> >
>> > A correct answer was already given by jens: Min[a,b].
>> >
>> >> 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?
>> >
>> > This is clearly a bug. Whether it's previously known or not, I have no
>> > idea. It needs to be fixed! It would be hard to "avoid using step
> functions
>> > with Integrate" in many cases.
>> >
>> > David Cantrell
>> >
>> >
>>
>>
>>
>> --
>> DrBob at bigfoot.com
>> www.eclecticdreams.net
>
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net
Prev by Date:
**Re: Random rook's tour of a rectangle**
Next by Date:
**Re: Re: Publicon problems converting sample document to LaTeX**
Previous by thread:
**Re: Integrate UnitStep, Bug?**
Next by thread:
**Q: Solve gives complex solution where there is a noncomplex solution how to get the last one?**
| |