# $\mathcal Z$-transform of an equation [Exam question]: Verifying the solution

I'm studying for exams at the moment and I'm trying to reproduce a solution from my professor (I have the solutions). The following signal is given: The excercise says:

Calculate the Fourier transforms for i = 13 to 15 and N = 64.

The signal in the time domain looks like this (this is where I'm still on par with the solution): $$f(k) = \left( -\frac{1}{N}k + 1 \right)\left( \sigma(k) - \sigma(k-N) \right)$$

The problem starts when trying to transform the whole thing to the $z$-domain. This is my take: $$f(k)=-\frac{1}{N}k\sigma(k) + \frac{1}{N}k\sigma(k-N) + \sigma(k) - \sigma(k-N)$$ Corrected for delay: $$f(k)=-\frac{1}{N}k\sigma(k) + \frac{1}{N}(k-N)\sigma(k-N) + N\sigma(k-N) + \sigma(k) - \sigma(k-N)$$

Transformed: $$F(z) = -\frac{z}{(z-1)^2}\frac{1}{N} + \frac{z}{(z-1)^2}\frac{1}{N}z^{-N} + \frac{z}{z-1}Nz^{-N} + \frac{z}{z-1} - \frac{z}{z-1}z^{-N}$$

But the solution only gives me three summands and I can't figure out how he is able to simplify the rest of the equation (Being well aware that the solution given by the professor might be wrong). He states:

\begin{align} F(z) &= - \frac{1}{N}\frac{z}{(z-1)^2} + \frac{1}{N}\frac{z}{(z-1)^2}z^{-N} + \frac{z}{z-1}\\ F(z) &= \frac{z}{(z-1)^2}\left[-\frac{1}{N} + \frac{1}{N}z^{-N} + {z-1}\right] \end{align}

• What am I doing wrong / am I doing anything wrong?
• Can you please sanity check me?

Your mistake is quite simple, originating from a subtle inaccuracy in the reformulation from here $$f(k)=-\frac{1}{N}k\sigma(k) + \frac{1}{N}k\sigma(k-N) + \sigma(k) - \sigma(k-N)$$ to here: $$f(k)=-\frac{1}{N}k\sigma(k) + \frac{1}{N}(k-N)\sigma(k-N) + N\sigma(k-N) + \sigma(k) - \sigma(k-N).$$
The 3rd term of the second equation is only $\sigma(k-N)$ because the $N$ is cancelled by the $1/N$ from the original term. Then, the (corrected) third term cancels with the last one. And then, transforming this to Z-domain gives exactly the result your professor has provided.