MathGroup Archive 2003

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

Search the Archive

Sheer frustration with integration of piecewise continuous functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40907] Sheer frustration with integration of piecewise continuous functions
  • From: Madhusudan Singh <spammers-go-here at yahoo.com>
  • Date: Wed, 23 Apr 2003 05:18:23 -0400 (EDT)
  • Reply-to: spammers-get-bounced at yahoo.com
  • Sender: owner-wri-mathgroup at wolfram.com

Clear["'*"];
(*ClearAttributes[Which, HoldAll];*)

f[x_, L_, fpeak_] := (fpeak /L) Which[((0 <= x) && (x < 0.6 L)), x/(0.6 
),((0.6 L <= x) && (x <= 0.9 L)), L, ((0.9 L < x) && (x <= L)) , 10 (L 
-x)];
Plot[f[x, 1, 1], {x, 0, 1}];
Print[Integrate[f[x, L, fpeak], {x, 0, L}, Assumptions -> {L >= 0, fpeak >= 
0, x >= 0, x <= L}]];

I have struggled with the above integration (believe me, its just a test 
case, I have a much more complicated function) for an hour now.

What is missing above ? The plot evaluates but the integral does not. Why 
does Mathematica make it so damned difficult to work with piecewise 
continuous functions ?


  • Prev by Date: How to examine x=(x+a)/b
  • Next by Date: Re: Plot of Nonlinear function
  • Previous by thread: Re: How to examine x=(x+a)/b
  • Next by thread: Re: Sheer frustration with integration of piecewise continuous functions