Question: Bug in abs/Heaviside

Hi folks, here's a bug in converting abs to Heavisides:

Converting the derivative of the abs function to a piecewise function is fine: 
convert(abs(1,x),piecewise);
returns
piecewise(x < 0, -1, x = 0, undefined, 0 < x, 1);

Whereas, 
convert(abs(1,x),Heaviside);
returns 1.

abs_problem.mw


 

restart;
interface(version);

`Standard Worksheet Interface, Maple 2020.2, Mac OS X, November 11 2020 Build ID 1502365`

(1)

convert(abs(1,x),piecewise);
convert(abs(1,x),Heaviside);

convert(%%,Heaviside);

piecewise(x < 0, -1, x = 0, undefined, 0 < x, 1)

 

1

 

-1+2*Heaviside(x)+undefined*Dirac(x)

(2)

abs(x)=convert(abs(x),Heaviside);
diff(%,x);
strange:=convert(%,Heaviside);
eval(subs(x=-1,%));

abs(x) = -x+2*x*Heaviside(x)

 

abs(1, x) = -1+2*Heaviside(x)+2*x*Dirac(x)

 

1 = -1+2*Heaviside(x)

 

1 = -1

(3)

plot([(abs(x)),lhs(strange),rhs(strange)],x=-5..5,colour=[black,red,blue]);

 

 

 


 

Download abs_problem.mw

Please Wait...