Assume is an integer for clarity
To get the expected result, we have to ensure the correct value of heaviside at n = 0 sympref('HeavisideAtOrigin',1);
These assumptions ensures 0 < a < 1, which is fine, but shouldn't be necessary to obtain the expected result
This assumption is incorrect. The region of convergence of the z-transform of a non-causal signal extends inwards from the abs of the smallest pole.
assumeAlso(abs(z) < abs(a))
The expected result only follows if the function is -(a^n)*heaviside(-n-1).
S = symsum(-(a/z)^n*heaviside(-n-1), n, -Inf, Inf)
S =
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1822234/image.png)
This result can be simplified, but still can't find a closed form expression for some reason.
S = simplify(S)
S =
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1822235/image.png)
However, if we get rid of the heaviside and write the sum over only the non-zero terms, we get
S = symsum(-(a/z)^n,n,-inf,-1)
S =
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1822236/image.png)
which is the expected result noting that the limit is zero. Unclear why the limit isn't known to be zero based on the assumptions and unclear why including the heaviside from the outset caused a problem. I think there was another thread that showed that limit doesn't always respect assumptions. assumptions
ans = ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1822237/image.png)
●
We could also get the expected result directly using ztrans along with relevant properties of the z-transform to account for ztrans only applying to causal signals.