MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate[ ] returns If[ ] function; how to say it's True?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9397] Re: [mg9359] Integrate[ ] returns If[ ] function; how to say it's True?
  • From: seanross at worldnet.att.net
  • Date: Sun, 2 Nov 1997 01:02:26 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

AES wrote:
> 
> Doing an Integrate[ ] returns an If[condition,a,b] result, with
> complicated expressions for condition, a, and b.
> 
> I want to get B as input for the next cell (automatically, not by just
> copying it by hand).
> 
> How can I get at the "parts" of the If[ ] statement, or use it in a
> subsequent Input[ ] cell with condition set equal to True?

Two Ways:

One, you can use the new Assumptions option in Integrate to specify that
a certain variable is Real(Assumptions->Im[x]==0), positive
(Assumptions->x>0) or both(Assumptions->{Im[x]==0,x>0}.

Two, you can specifically set the inequality equal to True or False as
appropriate.  For Example:

Integrate[Exp[-t^2/T^2],{t,-Infinity,Infinity}] returns

If[Re[T^2>0,Sqrt[Pi]
Sqrt[T^2],Integrate[Exp[-t^2/T^2],{t,-Infinity,Infinity}]].

But,

Unprotect[Greater];
Re[T^2]>0=True;
Protect[Greater];
PowerExpand[Integrate[Exp[-t^2/T^2],{t,-Infinity,Infinity}]]

Returns

Sqrt[Pi]T.


  • Prev by Date: Re: Plotting three-dimensional surfaces
  • Next by Date: RE: (Newbie) More confusion with integral of absolute vals
  • Previous by thread: Integrate[ ] returns If[ ] function; how to say it's True?
  • Next by thread: RE: Integrate[ ] returns If[ ] function; how to say it's True?