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