I have a question related to "FourierCosTransform" command in Mathematica. I have tested the following codes:
g0[Z_] = Z^2
g1[t_] = InverseFourierCosTransform[g0[Z], Z, t]
g2[Z_] = FourierCosTransform[g1[t], t, Z]
g3[Z_] = Sqrt[2/Pi]*Integrate[g1[t]*Cos[Z*t], {t, 0, Infinity}]
My question is since both g2 and g3 represent the "FourierCosTransform" operation, g2 uses Mathematica command directly, g3 uses the definition of "FourierCosTransform" as explained in HELP document. Why these two can not produce the exactly same result. The result shown by Mathematica 12.0 on my laptop is:
Z^2
-Sqrt[2 \[Pi]] (DiracDelta^\[Prime]\[Prime])[t]
Z^2
-2 Z^2 (-1+HeavisideTheta[0])
Thank you very much for your help!