Hi AlireaA

You are on the right track by breaking this problem into two parts. Let's look at the first part

yp1 = ztrans((1/3)^n)

yp1 =

Yp = yp1-yp2

Yp =

YPs = simplify(Yp)

YPs =

That result is correct, and could also have been obtained as follows:

sympref('HeavisideAtOrigin',1);

simplify(ztrans((1/3)^n*u(n-2)))

ans =

We can use ztrans here because the sequence in question is zero for n < 0. Also, it's very important to note that the Region of Convergence (ROC) for Yps is abs(z) > 1/3.

Now, moving onto the second component .... it looks like you're trying to use symsum to compute the z-transform explicitly. However, because the sequence is left-sided we need to use the bi-lateral z-transform (which I'm sure is the point of the exercise). Furthermore, because the sequence is zero for n > -1, we can take the sum from -inf to -1 (instead of -inf to inf),

v = symsum(y1,n,-inf,-1)

v =

The z-transform of this sequence only coverges over the ROC abs(z) < 2. Combined with result above, the ROC for the z-transform of the sum of the two sequences is

assume(1/3 < abs(z) < 2);

Recompute v with this assumption to get a compact form

v = simplify(symsum(y1,n,-inf,-1))

v =

BTW, you could also have obtained this result from a standard, z-transform table.

Consequently, the z-transform of x[n] is

X(z) = YPs + v

X(z) =

with ROC

assumptions(z)

ans =