MathGroup Archive 2000

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

Search the Archive

Re: Integrate with If


> 
> 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
Integrate. 
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.

Johan.


  • 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