       Re: Integrate not very aggressive about taking constants out of integrals

• To: mathgroup at smc.vnet.net
• Subject: [mg81427] Re: Integrate not very aggressive about taking constants out of integrals
• From: dimitris <dimmechan at yahoo.com>
• Date: Sun, 23 Sep 2007 04:30:02 -0400 (EDT)
• References: <fd2g2d\$s61\$1@smc.vnet.net>

```On 22     , 10:26, "Darryl Yong" <darryly... at gmail.com> wrote:
> Try the following three few lines of code in Mathematica:
>
> temp1 = Integrate[-Exp[p[s]] , {s,0,t}];
> temp2 = Integrate[Exp[p[s]] , {s,0,t}];
> temp1+temp2
>
> Out = Integrate[-E^p[s], {s, 0, t}] + Integrate[E^p[s], {s, 0, t}]
>
> FullSimplify[temp1+temp2]
>
> Out = Integrate[-E^p[s], {s, 0, t}] + Integrate[E^p[s], {s, 0, t}]
>
> You'll notice that Mathematica doesn't take the negative sign out of
> the integral in temp1, so the result of temp1+temp2 is not zero unless
> you define something for p[s] and let it actually work out both
> integrals.
>
> Does anyone know of a way to help Mathematica be more aggressive about
> taking constants out of integrals?
>
> Thanks, Darryl

Hi.

In:=
temp1 = Integrate[-Exp[p[s]], {s, 0, t}];
temp2 = Integrate[Exp[p[s]], {s, 0, t}];

In:=
temp1 + temp2 /. t -> 0

Out=
0

and

In:=
D[temp1 + temp2, t]

Out=
0

Cheers
Dimitris

```

• Prev by Date: Re: Labeling longitudes and latitudes
• Next by Date: Re: Still More Stylesheet Questions
• Previous by thread: Re: Integrate not very aggressive about taking constants out of integrals
• Next by thread: Error using Notebook?