Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Piecewise and Integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75256] Re: Piecewise and Integral
  • From: Bhuvanesh <lalu_bhatt at yahoo.com>
  • Date: Sun, 22 Apr 2007 05:11:10 -0400 (EDT)

First, conditional assignments such as

f[x_]:=f[x-T]/;x >T/2

are not used by Integrate in any way. Integrate uses whatever you get by evaluating f[x], that is,

Piecewise[{{0, Inequality[-1, LessEqual, x, Less, -1/2]}, {10, -1/2 <= x <= 1/2}}]

When \[Lambda]==T/2==1, the integration limits are from 0 to 2, so we get:

Integrate[Piecewise[{{0, Inequality[-1, LessEqual, x, Less, -1/2]}, {10, -1/2 <= x <= 1/2}}], {x,0,2}]

which is Integrate[10, {x,0,1/2}] == 5.

In order to get what you want, you have to include the periodicity information in the initial function definition, e.g. something like

f[x_] = 10*UnitStep[Sin[Pi*x + 3/2]]

Bhuvanesh,
Wolfram Research


  • Prev by Date: question
  • Next by Date: strange behavior of Integrate
  • Previous by thread: Re: Piecewise and Integral
  • Next by thread: Re: Piecewise and Integral