       Re: Boole does not work with symbolic limits in Integrate ?

• To: mathgroup at smc.vnet.net
• Subject: [mg73148] Re: Boole does not work with symbolic limits in Integrate ?
• From: "dimitris" <dimmechan at yahoo.com>
• Date: Sun, 4 Feb 2007 08:19:34 -0500 (EST)
• References: <eq1ihd\$2ug\$1@smc.vnet.net>

```On Feb 3, 10:53 am, Mitch Murphy <m... at mix5.com> wrote:
> hey hey
>
> use of the boole indicator function inside integrate only works for
> numerical arguments, symbolic limits of integration just returns the
> unevaluated integral.
>
> simple example ...
>
>         Integrate[2 u Boole[a < u], {u, 0, x}]
>
>         out[] = Integrate[2 u Boole[a < u], {u, 0, x}]
>
> i would expect ...
>
>         Integrate[2 u , {u, a, x}]
>
>         out[] = x^2 - a^2
>
> but it does work with numerical limits of integration ...
>
>         Integrate[2 u Boole[a < u], {u, 0, 2}]
>
>         out[] = Piecewise[{{4, a <= 0}, {4 - a^2, 0 < a < 2 }]
>
> anybody know a trick to make this work ? i've tried a bunch of
> variations using evaluate[], logicalexpand[], piecewiseexpand[],
> assumptions->x Reals, ..., but nothing works.
>
> cheers,
> Mitch

Hello Martin.

Try

In:=
Assuming[x > 0, Integrate[2*u*Boole[a < u], {u, 0, x}]]

Out=
Piecewise[{{x^2, a <= 0 && x > 0}, {-a^2 + x^2, a > 0 && a - x < 0}}]

or

In:=
Integrate[2*u*Boole[a < u], {u, 0, x}, Assumptions -> x > 0]

Out=
Piecewise[{{x^2, a <= 0 && x > 0}, {-a^2 + x^2, a > 0 && a - x < 0}}]

or

In:=
Block[{\$Assumptions = x > 0}, Integrate[2*u*Boole[a < u], {u, 0, x}]]

Out=
Piecewise[{{x^2, a <= 0 && x > 0}, {-a^2 + x^2, a > 0 && a - x < 0}}]

(*check*)

In:=
Plot[Evaluate[% /. x -> 2], {a, -3, 3}]
(*plot to be displayed*)

In:=
Integrate[2*u*Boole[a < u], {u, 0, 2}]

Out=
Piecewise[{{4, a <= 0}, {4 - a^2, 0 < a < 2}}]

In:=
Plot[Evaluate[%], {a, -3, 3}]
(*plot to be displayed*)

Best Regards
Dimitris

```

• Prev by Date: Re: simple trigonometric expression
• Next by Date: Re: Nice Integrate setting
• Previous by thread: Re: Boole does not work with symbolic limits in Integrate ?
• Next by thread: How to find all folder within a specified directory?