       Re: Re: Integrate a Piecewise funition, stange behaviour

• To: mathgroup at smc.vnet.net
• Subject: [mg53870] Re: [mg53851] Re: Integrate a Piecewise funition, stange behaviour
• From: DrBob <drbob at bigfoot.com>
• Date: Tue, 1 Feb 2005 04:08:20 -0500 (EST)
• References: <200501280743.CAA00286@smc.vnet.net> <ctfvgo\$pi8\$1@smc.vnet.net> <200501300818.DAA08819@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Both integrals evaluate almost instantly in version 5.1:

f=Piecewise[{{2/355,Inequality[
2,LessEqual,w,LessEqual,8]&&Inequality[4,LessEqual,w+w,
LessEqual,12]&&Inequality[5,
LessEqual,w+w,LessEqual,10]&&wâ?¤0&&wâ?¤0}},0];
int1=Integrate[f,{w,-Infinity,Infinity}]

Piecewise[{{(2/355)*(3 + w),
(-3 < w < -2 && w - w < 1 &&
w <= 0) || (-2 <= w <= 0 &&
w - w <= 1 && w <= 0)},
{(2/355)*(4 + w),
(w > -4 && -3 < w < -2 &&
w - w >= 1) || (w > -4 &&
-2 <= w <= 0 && w - w > 1)}}]

red1=Reduce[Inequality[
2,LessEqual,w,LessEqual,8]&&Inequality[4,LessEqual,w[
2]+w,LessEqual,12]&&Inequality[5,LessEqual,w+
w,LessEqual,10]&&wâ?¤0&&wâ?¤0];

int2=Integrate[(2/355)*Boole[red1],{w,-Infinity,Infinity}]

Piecewise[{{6/355, w == 0 &&
-1 <= w <= 0}, {(2/355)*(3 + w),
-3 < w < 0 && w - w < 1 &&
w <= 0}, {(2/355)*(4 + w),
(w == 0 && -4 < w < -1) ||
(-3 < w < 0 && w > -4 &&
w - w >= 1)}}]

Bobby

On Sun, 30 Jan 2005 03:18:12 -0500 (EST), rik <rikypi_CREPA_SPAMMONE at libero.it> wrote:

> DrBob ha scritto:
>> Try posting in InputForm, so that the code isn't so garbled.
>>
>> http://www.eclecticdreams.net/DrBob/copy_as_inputform.htm
>>
>> Bobby
>>
>> On Fri, 28 Jan 2005 02:43:42 -0500 (EST), rik <rikypi_CREPA_SPAMMONE at libero.it> wrote:
>>
>>
>
>
> i've followed the instruction, and this's the result. I hope that source
>
> f = Piecewise[{{2/355, Inequality[2, LessEqual, w, LessEqual, 8] &&
> Inequality[4, LessEqual, w + w, LessEqual, 12] &&
>       Inequality[5, LessEqual, w + w, LessEqual, 10] && w <= 0
> && w <= 0}}, 0]
>
> int1 = Integrate[f, {w, -Infinity, Infinity}]
>
> red1 = Reduce[Inequality[2, LessEqual, w, LessEqual, 8] &&
> Inequality[4, LessEqual, w + w, LessEqual,
>      12] && Inequality[5, LessEqual, w + w, LessEqual, 10] && w
> <= 0 && w <= 0]
>
> int2 = Integrate[(2/355)*Boole[red1], {w, -Infinity, Infinity}]
>
> thanks a lot!
>
>
>
>

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

```

• Prev by Date: Re: Simplify problems for checking easy equalities...
• Next by Date: Re: small puzzle programming
• Previous by thread: Re: Collect and manipulate subexpressions
• Next by thread: Re: small puzzle programming