MathGroup Archive 2000

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

Search the Archive

Re: Integrate with If

  • To: mathgroup at
  • Subject: [mg22361] Re: [mg22180] Integrate with If
  • From: bergervo at (Bergervoet J.R.M.)
  • Date: Fri, 25 Feb 2000 21:14:13 -0500 (EST)
  • Organization: Philips Research Laboratories Eindhoven, Netherlands
  • References: <> <88jt51$>
  • Sender: owner-wri-mathgroup at

In <88jt51$9lf at> Hartmut Wolf <hwolf at> writes:

>> Why does
>>         Integrate[If[Sin[t] > 0, 1, 0] , {t, -Pi, Pi}]

>Integrate doesn't work with If, use UnitStep instead. So both

>In[17]:= Plot[UnitStep[t], {t, -Pi, Pi}]
>Out[17]= Graphics[]

>In[18]:= Integrate[UnitStep[t], {t, -Pi, Pi}]
>Out[18]= Pi

>do well.

But this functionallity (in order to generalize to functions other than
Sin[]) would require:

  Integrate[UnitStep[Sin[t]], {t,-Pi, Pi}]

and that still gives 0 (incorrect!). It does work with jump-point 0:

  Integrate[UnitStep[Sin[t]], {t,-Pi, 0, Pi}]

which correctly gives Pi.


  Dr. Jozef R. Bergervoet                      Electromagnetism and EMC
  Philips Research Laboratories,             Eindhoven, The Netherlands
  Building WS01                                     FAX: +31-40-2742224
  E-mail: bergervo at    Phone: +31-40-2742403

  • Prev by Date: Re: ListPlot with missing values
  • Next by Date: easiest way to display a plot from C to kernel using Mathlink?
  • Previous by thread: Re: Integrate with If
  • Next by thread: Re: Integrate with If