Suppose we sample a time sinusoid at discrete time intervals. The angular frequency of the sinusoid is $\omega$ and the sampling time interval is $T$ . The sampled signal looks like:
$\large{y_k = A \, \sin(\omega \, k T)}$
In the above equation, $k$ is an integer denoting the sample number. Suppose we define two discrete differentiators: one with two coefficients (the classic difference quotient), and another with three coefficients.
$\large{f_2 = \frac{1}{T} \, y_k  \frac{1}{T} \, y_{k1} \\ f_3 = \frac{1.5}{T} \, y_k  \frac{2}{T} \, y_{k1} + \frac{0.5}{T} \, y_{k2}}$
If we take the ztransform of both of the above equations, we obtain the following transfer functions (the " $z$ " in parentheses denotes functions of $z$ ):
$\large{\frac{F_2 (z)}{Y(z)} = H_2 (z) \\ \frac{F_3 (z)}{Y(z)} = H_3 (z) \\ z = e^{j \, \omega T} \\ j = \sqrt{1}}$
For a sinusoid, the ideal transfer function is $H_{ideal} = j \omega$ . We can therefore say that the error of the differentiator is $H_{actual}  j \omega$ . As it turns out, the threecoefficient differentiator has a better response for some frequencies (given some sampling rate).
Calculate the following error ratio:
$\Huge  \large{ \frac{H_2  j \omega}{H_3  j \omega} } \Huge $
Details and Assumptions:

$\omega = 120 \pi$

$T = \frac{1}{8000}$

$\cdot$
denotes the modulus of a complex number

Hint:
Use the timeshift property of the ztransform to get the transfer functions
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
nonjavascript version of this page
. We're sorry about the hassle.
See the solution by @Karan Chatrath . I will just add some plots here. The ideal normalized magnitude response is $1$ (after normalizing by $\omega$ ), and the ideal phase response is 90 degrees. We can see from the plots that the 2coefficient differentiator has a slightly better magnitude response, and that the 3coefficient differentiator has a substantially better phase response.