You define operators myPlot,myTransformB
, which internally involve iterator variables, and then make a composition of them, which is tricky. When you call myPlot[myTransformB]
there is a clash between the variable c
in FourierTransform
(which is somehow an integration variable) and the variable c
in Plot
. During the evaluation I suspect an occurrence of something meaningless like
FourierTransform[E^(-(-5.)^2), -5.`, -5.`]
that triggers a numeric integration where the integration variable is a number. Someone more expert can comment on this?
A simpler clash of variables happens if you evaluate Plot[D[x^2, x], {x, 0, 1}]
for example.
Your fix localizes one of the two variables, and this is appropriate in this situation.
As to why the localization of the variables in FourierTransform
is not built-in, I don't know for sure. Maybe what you are doing was not foreseen as the typical basic use for FourierTransform
.