[Maxima] unit_step() and integrate()
Richard Hennessy
rich.hennessy at verizon.net
Sun Jan 15 19:41:54 CST 2012
I meant the indefinite integral of the square wave function is continuous
everywhere. Sorry. In general if a function involves step functions the
integral in usually continuous, even though the original function is not.
Rich
-----Original Message-----
From: Richard Hennessy
Sent: Sunday, January 15, 2012 8:32 PM
To: Brian ; maxima at math.utexas.edu
Subject: Re: [Maxima] unit_step() and integrate()
"I expect f2(x) to be a "ramp" with a slope of 2...starting at vx=0 to x=2
(where f2(2)=4). f2(x) is zero everywhere else."
You said "f2(x) is zero everywhere else". That is wrong. The indefinite
integral of the unit_step function is continuous everywhere. If it dropped
down to zero at the point x=2 that would be a discontinuity which would be
an error. The answer from integrate is correct.
Rich
-----Original Message-----
From: Richard Hennessy
Sent: Sunday, January 15, 2012 8:16 PM
To: Brian ; maxima at math.utexas.edu
Subject: Re: [Maxima] unit_step() and integrate()
Brian:
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.
Rich
-----Original Message-----
From: Brian
Sent: Sunday, January 15, 2012 8:37 AM
To: maxima at math.utexas.edu
Subject: [Maxima] unit_step() and integrate()
Hello,
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
"unit_step()"
and "integrate()".
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
zero
everywhere else. I expect f2(x) to be a "ramp" with a slope of 2...starting
at
x=0 to x=2 (where f2(2)=4). f2(x) is zero everywhere else. I expect f3(x) to
equal f2(x).
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.
Thanks!
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
More information about the Maxima
mailing list