Hi,
I am unable to obtain piecewise representations of integrals of piecewise functions beyond the first integral. I am pasting the code used below. For better readability, I have also attached the pdf of the notebook. I would appreciate any help in resolving this issue.
Thanks and regards,
Sunil
f[intervals_]:= Function[{x}, Plus@@Map[Function[{a,b,c},UnitStep[x-a]UnitStep[b-x]c]@@#&,intervals]]
g:=f[{{0,1,1},{2,3,-1},{4,5,-1}}]
assum:= 0<=t<=10 && t\[Element]Rationals && p\[Element]Rationals && q\[Element]Rationals && r\[Element]Rationals
ig[t_] := PiecewiseExpand[FullSimplify[Integrate[g[p],{p,0,t}],Assumptions->assum]]
iig[t_]:= PiecewiseExpand[FullSimplify[Integrate[ig[q],{q,0,t}],Assumptions-> assum]]
iiig[t_]:= PiecewiseExpand[FullSimplify[Integrate[iig[r],{r,0,t}],Assumptions->assum]]
Plot[{g[t],ig[t],iig[t],iiig[t]},{t,0,10}]
Attachments: