MathGroup Archive 2000

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

Search the Archive

Re: Integrate with If

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22197] Re: [mg22180] Integrate with If
  • From: Hartmut Wolf <hwolf at debis.com>
  • Date: Fri, 18 Feb 2000 02:34:34 -0500 (EST)
  • Organization: debis Systemhaus
  • References: <200002170624.BAA04409@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Johan Berglind,5879 schrieb:
> 
> Why does
> 
>         Integrate[If[Sin[t] > 0, 1, 0] , {t, -Pi, Pi}]
> 
> evaluate to 2Pi?
> 
>         Plot[If[Sin[t] > 0, 1, 0] , {t, -Pi, Pi} ]
> 
> looks all right.
> 
> Puzzled,
> 
> Johan Berglind,
> Chalmers, Goteborg,
> Sweden.

Dear Johan,

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.

Kind regards, Hartmut


  • Prev by Date: Front-end crashes in Redhat6.1
  • Next by Date: Input Output Label
  • Previous by thread: Integrate with If
  • Next by thread: Re: Integrate with If