I am interested in the convolution of a triangle function of width 2d with a cosine function (it has a useful analogy with a physics problem).
I think I should be able to break the problem down using the following:
- triangle function of width $2d$ is two convolved box-cars of width $d$
- a box-car is two Heaviside functions (one positive, one negative... I think)
- derivative of Heaviside function H: $\partial H = \delta$
- for any convolution $\partial f * g = f*\partial g$
- $\partial (f*g) = \partial f *\partial g$ (I think)
- $\delta*-\delta = 0$ (I think)
The general idea is to convert a triangle function into an equivalent set of convolved Heaviside functions with some offsets, then take the derivative and convolve a bunch of dirac delta functions with the sinusoid.
Therefore, for triangle function $T$, box-cars $B$:
$T(x)*\cos = T(x)*\partial(\sin(x))\\ = (B(x-d/2)*B(x+d/2))*\partial(\sin)\\ = ((H(x-d)-H(x))*(H(x)-H(x+d)))*\partial(\sin)\\ = \partial\big[(H(x-d)-H(x))*(H(x)-H(x+d))\big]*\sin\\ = \big[(\delta(x-d)-\delta(x))*(\delta(x)-\delta(x+d))\big]*\sin\\ = 0*\sin(x)$
Clearly, that is hilariously wrong. This convolution does not generally self-cancel.
I'm sure there is a nice analytical expression here, but I am not sure how to proceed.
PS. For future readers, the flaw is using $\partial (f*g) = \partial f *\partial g$. Differentiation is not distributive across convolution. Error thus propagates from line 4.