# Infinite long sequence convolution error

I use version 11.2.

Convsum[f_, g_, k_] :=
Sum[Function[k, f][i] Function[k, g][
k - i], {i, -\[Infinity], \[Infinity]}]
F[k_] := a^k UnitStep[k]
G[k_] := b^k UnitStep[k]
Convsum[F[k], G[k], k];
Simplify[PowerExpand[%], Element[{k}, Integers]]


When b=2,

Why?

• Please don't use the bugs tag; it is reserved for things that have been vetted by the community as an actual bug (as explained in the bugs tag wiki). Can you please explain more in your post about why you think this is in error? – march Jan 11 '18 at 4:54
• Please forgive me for asking the question for the first time. – yonghui wang Jan 12 '18 at 12:58

When using 2 instead of b, Mathematica can use the fact that 2>0. So, you can get the simplification you want by adding the assumption b>0:

sum = Assuming[
k ∈ Integers && b>0,
Sum[a^i UnitStep[i] b^(k-i) UnitStep[k-i], {i,-Infinity,Infinity}]
];
sum //TeXForm


$\begin{cases} \frac{a^{k+1}-b^{k+1}}{a-b} & k\geq 0 \\ 0 & \operatorname{True} \end{cases}$

• Thank you very much. – yonghui wang Jan 12 '18 at 12:57

There is also a built-in function for convolution -- you don't need to program it yourself:

f[k_] := a^k UnitStep[k];
g[k_] := b^k UnitStep[k];
DiscreteConvolve[f[k], g[k], k, n]


• Thank you very much. It's a great solution to my problem. – yonghui wang Jan 12 '18 at 12:57