I want to evaluate a convolution for a stripe function and a Gaussian:
stripe[x_, d_] := If[EvenQ[Quotient[x, d]], 1, 0] gaussian[x_, \[Mu]_, \[Sigma]_] = 1/(Sqrt[2 \[Pi]] \[Sigma]) Exp[-((x - \[Mu])^2/(2 \[Sigma]^2))]; Plot[{stripe[\[Tau], 1], gaussian[\[Tau], 0, 0.5]}, {\[Tau], -10, +10}]
Then, the convolution I want to evaluate is:
Convolve[UnitStep[\[Tau] + 5] stripe[\[Tau], 1] UnitStep[5 - \[Tau]], gaussian[\[Tau], 0, 0.5], \[Tau], x]
the result was 0, although it should not be 0.
I also tried to evaluate it via Integrate
:
Integrate[stripe[\[Tau], 1] gaussian[x - \[Tau], 0, 0.5], {\[Tau], -5, +5}]
the result was 0 again.
I don’t know why the results were zero. How can I evaluate it correctly?
Any advice is appreciated.