Re: Piecewise function integrated thrice
- To: mathgroup at smc.vnet.net
- Subject: [mg13983] Re: [mg13942] Piecewise function integrated thrice
- From: BobHanlon at aol.com
- Date: Sat, 12 Sep 1998 16:59:09 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Use the standard package "Calculus`DiracDelta`" Needs["Calculus`DiracDelta`"]; h[x_]:=UnitStep[x] Plot[h[x], {x, -1, 3}]; f[x_]:=Integrate[h[t],{t,0,x}]; Plot[f[x], {x, -1, 3}]; g[x_]:=Integrate[f[t],{t,0,x}]; Plot[g[x], {x, -1, 3}]; m[x_]:=Integrate[g[t],{t,0,x}]; Plot[m[x], {x, -1, 3}]; p[x_]:=Integrate[m[t],{t,0,x}]; Plot[p[x], {x, -1, 3}]; Bob Hanlon In a message dated 9/11/98 6:35:40 PM, dclement at mail.cpod.fr wrote: >Why can't Mathematica integrate thrice a piecewise defined function? >Here is what I mean: > >This is a step function: >h[x_]:=If[x>0,1,0] >It can (of course) be plotted and integrated. Then let: >f[x_]:=Integrate[h[t],{t,0,x}] >f, as well as h, can be plotted and if I put >g[x_]:=Integrate[f[t],{t,0,x}] >then g can be plotted, but any integral (definite or not) that I attempt >to compute about g leads to an error message (though g can be >NIntegrated).