# Which version of Mathematica did DiracDelta become to the derivative of HeavisideTheta from that of UnitStep?

The mathematica's version of my coworkers is 5.0, they use UnitStep to derive formula, However, I also want to use the parallel features so used the latest version 11.3. then I found UnitStep in the two versions is different, the UnitStep's derivative in 5.0 is DiracDelta, but not in 11.3. In version 11.3, DiracDelta becomes HeavisideTheta's derivative. I want to know:

1. Which is the first version where the difference appeared?
2. If HeavisideTheta[0]=1, is HeavisideTheta in v11.3 equal to UnitStep in v5.0?
3. Can I replace UnitStep to HeavisdeTheta?

Thanks!

In version 5.0

In version 11.3

This script is from a Mathematica version 6.0 session using 'math.exe'

Mathematica 6.0 for Microsoft Windows (32-bit)

In[1]:= D[#@x, x] & /@ {UnitStep, HeavisideTheta}

Out[1]= {Piecewise[{{Indeterminate, x == 0}}], DiracDelta[x]}

In[2]:=

• Thank you for providing these information, you verified my guess at the same time. MMA 6.0 substitutes ArrayFlatten, ConstantArray, Take... for BlockMatrix, ZeroMatrix, TakeMatrix..., so I guess from where UnitStep and HeavisideTheta came to an change. would you proceed to answer question 2 and 3 mentioned above? – likehust Apr 19 at 0:35
• @likehust I would if I had access to version 5.0 but I don't. – Somos Apr 19 at 1:04

If HeavisideTheta[0] = 1, is HeavisideTheta in v11.3 equal to UnitStep in v5.0?

For calculus purposes, sure.

Can I replace UnitStep with HeavisideTheta?

HeavisideTheta[] is what you should be using in version 6 and later versions, because it's the one now supported extensively by the calculus functions. In earlier functions, you have to settle for UnitStep[].

You can always use $VersionNumber along with conditionals (e.g. If[], Which[]) to write code that does different things depending on the version the code is evaluated in. If[$VersionNumber >= 6., HeavisideTheta'[x], UnitStep'[x]]

• Yesterday, My coworker got different results in MM10 and MM5.0 while running same program codes. Now, I am transferring my own codes from MM10 to MM5.0 in hoping to find a good luck by changing HeavisideTheta[] to UnitStep[], certainly, it's a hard work because involving the replacement of other functions such as ParallelMap, ArrayFlatten, ParallelNeeds, ConstantArray, and so on. – likehust Sep 26 at 1:34