Why is the int (integral) of the dirac function sign/2 instead of the heaviside function?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 30 Jul. 2019
Bearbeitet: MathWorks Support Team
am 29 Aug. 2024
In MATLAB, the result of taking the integral of the "dirac" function is sign/2.
In many resources online and in textbooks the integral of the dirac delta function is defined as the heavyside step function. One such example can be found at:
Why is there a discrepancy?
Akzeptierte Antwort
MathWorks Support Team
am 29 Jul. 2024
Bearbeitet: MathWorks Support Team
am 29 Aug. 2024
Int(f(x), x) in MATLAB does not explicitly include the +C (an arbitrary constant that must be included when integrating).
The output of the heavyside function is 0 if negative, 1 if positive. The output of the sign function is 1 if positive and -1 if negative. if you divide the sign function output range by two your possible results become [-1/2, 1/2].
Adding 1/2 to this set of possible answers produces [0, 1], identical outputs to the heavyside function. The 1/2 that we added is included in that implicit +C.
Please run the below command in the command window of installed MATLAB R2019a version to get release specific documentation on the implicit +C for the "dirac" function:
>> web(fullfile(docroot, 'symbolic/dirac.html'))
As we can see, in the context of integrals, the heavyside function and the sign function divided by 2 are equivalent when each has an arbitrary constant. These are both equally valid solutions.
Please follow the below link to search for the required information regarding the current release:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Special Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!