[Maxima] unit_step() and integrate()
rich.hennessy at verizon.net
Sun Jan 15 19:16:14 CST 2012
You are probably forgetting that the indefinite integral has an arbitrary
constant which may result in the answer from integrate to be different by a
constant amount than from what you expect. To get the results you want you
have to add the appropriate constant yourself.
Sent: Sunday, January 15, 2012 8:37 AM
To: maxima at math.utexas.edu
Subject: [Maxima] unit_step() and integrate()
I am using a very old computer to run Maxima 5.21.1 so all of my work is
performed using a maxima file and command line. My issue is with
f1a(x):= +2 * unit_step( x )$
f1b(x):= -2 * unit_step( x - 2 )$
f1(x):= f1a(x) + f1b(x)$
f2a(x):= integrate( f1a(x), x );
f2b(x):= integrate( f1b(x), x );
f2(x):= integrate( f1(x), x );
f3(x):= f2a(x) + f2b(x);
I expect f1(x) to be a squarewave with the value of 2 from x=0 to x=2 and
everywhere else. I expect f2(x) to be a "ramp" with a slope of 2...starting
x=0 to x=2 (where f2(2)=4). f2(x) is zero everywhere else. I expect f3(x) to
My maxima script-> http://pastebin.com/hhnbckqy
When I run my script, a plot is generated of f1(x), f2(x), and f3(x). f1(x)
plots as I expected. I see that f2(x) and f3(x) have the correct shape. But
f2(x) is shifted down by 2. f3(x) is the result I expect.
Is my understanding of elementary functions incorrect (unit step, unit ramp,
impulse)? Am I missing a something?
I am reviewing some classes I had years ago (Signals & Systems). Tools like
Maxima and Octave have been wonderful.
Maxima mailing list
Maxima at math.utexas.edu
More information about the Maxima