Hi Alexandre,
There is another way to do this.
load(pw);
piecewise([minf, 0, a, 'und, 0, x-a, inf], x, 'ropen); /* this works fine if a < 0 otherwise see next line. */
piecewise([minf, 0, 0, x-a, a, inf], x, 'ropen); /* this is for the case where a > 0 */
Notice that the function is undefined in the first case when x >= a and x<0. You did not give enough information to
determine the value when x is between [a, 0) in the case where a < 0.
You can get pw.mac from here. http://mysite.verizon.net/res11w2yb/id2.html
Rich
From: Alexandre Campos
Sent: Thursday, March 18, 2010 1:11 PM
To: maxima at math.utexas.edu
Subject: discontinuos function
Dear all,
how can I express and plot a function (singular function) like:
f(x) = <x-a>
where
<x-a> = 0 --------------if x<a
(x-a) --------------if x>=0
Thanks in advance,
alexandre
--
"No man can serve two masters; for either he will
hate the one, and love the other; or else he will hold
to the one, and despise the other. Ye cannot serve
God and mammon." Matthew 6:24
--------------------------------------------------------------------------------
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima