Convolution of Signal with a Gaussian Filter / Kernel Following up on Analytical Solution for the Convolution of Signal with a Box Filter, I am now trying to convolve a Gaussian filter with the sine signal by hand. 

My method is to use the definition of convolution and attempt to integrate:
\begin{align*}
  \overline{\phi} &amp;= \phi(x) * h(x) = \int_{-\infty}^{+\infty} \! \phi(x') h(x - x') \, \mathrm{d} x' \\
  \Rightarrow \overline{\phi} &amp;= \int_{-\infty}^{+\infty} \! \sin(x') \left( \frac{6}{\pi \Delta^2} \right)^{1/2} \exp(-\frac{6 (x - x')^2}{\Delta^2}) \, \mathrm{d} x' \\
  \overline{\phi} &amp;= \left( \frac{6}{\pi \Delta^2} \right)^{1/2} \int_{-\infty}^{+\infty} \! \sin(x') \exp(-\frac{6 (x - x')^2}{\Delta^2}) \, \mathrm{d} x' \\
\end{align*}
At this stage, the integration seems impossible by hand (e.g., integration by parts).

I also tried moving to wave space by taking Fourier transforms and instead using multiplication:

\begin{align*}
  \mathscr{F}\{\phi(x)*h(x)\} &amp;= \mathscr{F}\{\phi(x)\} \cdot \mathscr{F}\{h(x)\} \\
\end{align*}

I get the Fourier transform of sine as $\sqrt{\pi/2} i (\delta(k - 1) - \delta(k + 1)$, but am not sure how to multiply this with the exponential and how the inverse Fourier transform will work.
Am I missing something clever and/or elegant? Is such a solution possible? I don't have a good understanding of the Dirac delta and how to multiply it with an exponential in wave space.
If you have an implementation you want to validate the best way to do it is by validating it versus a reference implementation.

For instance, the above, in MATLAB, would be something like:



% Setting the Grid Parameters
leftBound = -10;
rightBound = 10;
numSamples = 10000;

% Signals Parameters
gaussianKernelStd   = 2;
gaussianKernelMean  = -1; %&lt;! Basically its shift on the grid
sineAmp             = 0.1;
sineFreq            = 1;
sinePhase           = 0;

% Generating the grid
vX = linspace(leftBound, rightBound, numSamples + 1);
vX = vX(:);

samplingInterval    = mean(diff(vX));
samplingFrequency   = 1 / samplingInterval;

% Generating the Sine Signal
vS = sineAmp * sin((2 * pi * sineFreq * vX) + sinePhase);
% Generating the Gaussian Kernel
vK = exp(-((vX - gaussianKernelMean) .^ 2) / (2 * gaussianKernelStd * gaussianKernelStd));
vK = vK / sum(vK * samplingInterval); %&lt;! Normalization

vY = conv(vS, vK, 'same');

figure();
% plot(vX, vK);
% figure();
% plot(vX, vS);
plot(vX, [vS, vK, vY], 'LineWidth', 2);
legend({['Sine Signal'], ['Gaussian Kernel'], ['Convolution Result']});


The result is given by: