Find the average value of the unit pulse using NIntegrate and Unit Steps?

As shown in the attached notebook, I form a unit pulse function (pt[]) with two time displaced unit steps (UnitStep[]). Then I integrate (NIntegrate[]) to find the average value of the unit pulse. However NIntegrate doesn’t seem to want to give me an answer. Any ideas why this might be so?

Thanks.

support.nb (5.23 KB)

Good Morning,

The function NIntegate was spelt incorrectly in your file. Note that you also set the limits of the integration the same. I’m pretty sure you intended {t, -tper/2.0, tper/2.0}. Also, I often find in these kinds of problems using the function HeavisideTheta works better than UnitStep.

Jesse Sheinwald

support rev A.nb (7.23 KB)

Thank you.