MathGroup Archive 2000

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

Search the Archive

Re: Integrate with If

  • To: mathgroup at
  • Subject: [mg22275] Re: Integrate with If
  • From: "Johan Berglind,5879" <johanbe at>
  • Date: Mon, 21 Feb 2000 20:00:45 -0500 (EST)
  • Organization: Chalmers University of Technology
  • References: <88g62h$> <88jtvv$>
  • Sender: owner-wri-mathgroup at

> The "If" construct is an impropper argument for Integrate, see the
> online-help:
> (...)
> Integrate can evaluate integrals of rational functions. It can also
> evaluate integrals that involve exponential, logarithmic, trigonometric
> and inverse trigonometric functions, so long as the result comes out in
> terms of the same set of functions.
> (...)

Thank you, Harald.

As you and many others have pointed out, If is not suited for use in
It does, however work most of the time; 
	Integrate[If[Sin[t]>0,1,0], {t,-Pi/2,Pi/2}]
gives the correct answer. (The critical point seems to be -Pi)
And it seems to be fairly efficient. (Try using it in FourierSeries.)

My point is that either should If work in Integrate all of the time (and
I believe that is the ambition of Wolfram) or Mathematica should at
least produce a warning.


  • Prev by Date: Weird Plot behavior...
  • Next by Date: Re: export graphics
  • Previous by thread: Re: Integrate with If
  • Next by thread: Evaluating expression: help