Bug introduced in 9.0 or earlier and fixed in 11.0.0
Let $h[n]=(\frac{1}{2})^n u[n]-3(\frac{1}{2})^{n-1}u[n-1]$
$g[n]=3^n u[n]-\frac{1}{2}3^{n-1}u[n-1]$
I convolved $h[n]$ and $g[n]$ in Mathematica and obtained the following result:
h = (1/2)^n UnitStep[n] - 3*(1/2)^(n - 1) UnitStep[n - 1]
g = 3^n UnitStep[n] - (1/2)*3^(n - 1) UnitStep[n - 1]
DiscretePlot[DiscreteConvolve[h, g, n, m], {m, -5, 5}]
Here is the plot that Mathematica showed me:
However, after doing the convolution by hand I obtained a discrete delta function. (i.e. $h[n]*g[n]=\delta[n]$), which I know is the correct answer.
Why is Mathematica giving me an incorrect answer for the convolution?
m
and 1 form==0
. For negativem
I see negative values. $\endgroup$