macdy07

15 Reputation

One Badge

8 years, 237 days

MaplePrimes Activity


These are replies submitted by macdy07

@John Fredsted and @mmcdara

There is another problem I found for simplification of Heaviside's step function, H(x). This problem is more simple inconsistency. It seems that Maple always use this formula,

H(x)^2 = H(x),

for simplification otherwise the value of Heaviside's step function at x=0 is very naive. This result can be easily checked by

"
restart:
NumericEventHandler(invalid_operation=`Heaviside/EventHandler`(value_at_zero=1/2)):
simplify(Heaviside(x)^2);
Heaviside(0);
Heaviside(x)^2;
Heaviside(0)^2;

"

Maple's answers are "Heaviside(x), 1/2, Heaviside(x)^2 , 1/4".

Hmm...
So Maplesoft should modifty the specification of these peculiar functions, I think.

@Markiyan Hirnyk I thought I chose the proper condition of Heaviside(x) at x=0. However, this condition was not consisitent to other operation on Maple.

So I should check more detail of this calculation.

@John Fredsted Thank you for your comment!
At first, I agreed with your approach II.
So I checked your second proposal below code by single Dirac's function. The f(x) in my code is general function.

"restart:
int(Dirac(x)*f(x),x=-infinity..infinity)
"

Then, Maple returned "f(0)". In the next, we wrote the below code,

"restart:
int(Dirac(x)*f(x),x=0..infinity)
"

Maple's answer was "1/2*f(0)", because I think Maple create this answer by using the mathematical definition of Dirac(x). Its definition gives the propaties which is even-parity of Dirac(x).
 
So, I think, your approach II shoud be denied.., and my convension of Heaviside(0)=1 should be changed by Heaviside(0)=1/2 too. Then, the difference from the order of integration, DH and HD will vanish.

So I wrote the new code like this.

"restart:
NumericEventHandler(invalid_operation='Heaviside/EventHandler'(value_at_zero=1/2)):
#This sentence set Heaviside(0) to 1/2.
Heaviside(0)
"

Then, Maple's answer was "1/2".
So I wrote the final code, 

"restart:

NumericEventHandler(invalid_operation='Heaviside/EventHandler'(value_at_zero=1/2)):

NumericEventHandler(invalid_operation=`Heaviside/EventHandler`
(value_at_zero=1/2)):

int( Dirac(x)*f(x), x=-infinity..infinity );
int( Dirac(x)*f(x), x=0..infinity );
int( Dirac(x)*Heaviside(x)*f(x), x=-infinity..infinity );
int( simplify( Dirac(x)*Heaviside(x)*f(x) ), x=-infinity..infinity )
"

Comment: I made a mistake in line 2. I thank @John Fredsted.

Then Maple's answers were "f(0), 1/2*f(0), 1/2*f(0), 0" in turn.
By this result, I think simplification should have some problems for Dirac or Heaviside functions and this inconsistence should be removed from Maple.

Page 1 of 1