On Thu, 2008-05-29 at 22:33 +0100, Paul wrote:
> I didn't know unit_step existed (so much to learn in Maxima!).
> Strange
> that it doesn't seem to evaluate numerically though, e.g.
> (%i35) unit_step(0.5), numer;
> (%o35) unit_step(0.5)
You have to load an additional package to use unit_step (sorry, I had
forgotten that). Try:
(%i15) load("orthopoly")$
(%i16) unit_step(0.5);
(%o16) 1
In fact, the integral you asked works with unit_step too:
(%i17) g(t):=unit_step(t+1/2)-unit_step(t-1/2)$
(%i18) quad_qags(g(t),t,-2,0);
(%o18) [0.5, 5.495603971894525e-15, 105, 0]
Finally, notice the following:
(%i19) g(-1/2);
(%o19) 0
(%i20) g(1/2);
(%o20) 1
Regards,
Jaime