COMPUTER PROBLEMS 10.2

\(\def\ds{\displaystyle} \) 1 (a) Applying the DFT to \([0,1,2,3,4,5,6,7]^T\) gives \[F_8 \left[\begin{array}{r} 0\\1\\2\\3\\4\\5\\6\\7\\ \end{array}\right]= \frac{1}{\sqrt{8}} \left[\begin{array}{c} 28\\-4+4(1+\sqrt{2})i\\ -4+4i\\-4+4(\sqrt{2}-1)i\\-4\\-4-4(\sqrt{2}-1)i\\-4-4i\\-4-4(1+\sqrt{2})i\\ \end{array}\right], \] so \(a_0=7\sqrt{2}, a_1=a_2=a_3=a_4=-\sqrt{2}, b_1=\sqrt{2}+2, b_2=\sqrt{2}, b_3=2-\sqrt{2}\). Corollary 10.8 implies that \[\textstyle P_8(t)=\frac{7}{2}-\cos 2\pi t - (1+\sqrt{2})\sin 2\pi t-\cos 4\pi t-\sin 4\pi t -\cos 6\pi t+(1-\sqrt{2})\sin 6\pi t -\frac{1}{2}\cos 8\pi t.\] The interpolating function can be plotted using the Matlab program dftinterp. The interpolant and the data points are plotted below.


1 (b) Applying the DFT to \([2, -1, 0, 1, 1, 3, -1, -1]^T\) gives \[F_8 \left[\begin{array}{r} 2\\-1\\0\\1\\1\\3\\-1\\-1\\ \end{array}\right]= \frac{1}{\sqrt{8}} \left[\begin{array}{c} 4\\1-3\sqrt{2}+(\sqrt{2}-1)i\\ 4-2i\\1+3\sqrt{2}+(\sqrt{2}+1)i\\0\\1+3\sqrt{2}-(\sqrt{2}+1)i\\4+2i\\1-3\sqrt{2}-(\sqrt{2}-1)i\\ \end{array}\right], \] so \(a_0=\sqrt{2}, a_1=(-6+\sqrt{2})/4, a_2=\sqrt{2}, a_3=(6+\sqrt{2})/4, a_4=0, b_1=(2-\sqrt{2})/4, b_2=-\sqrt{2}/2, b_3=(2+\sqrt{2})/4\). Corollary 10.8 implies that \(P_8(t)=\frac{1}{2}+\frac{1-3\sqrt{2}}{4}\cos 2\pi t + \frac{1-\sqrt{2}}{4}\sin 2\pi t+ \cos 4\pi t+\frac{1}{2}\sin 4\pi t +\frac{1+3\sqrt{2}}{4}\cos 6\pi t- \frac{1+\sqrt{2}}{4}\sin 6\pi t.\) See below for the plot from dftinterp.


1 (c) Applying the DFT to \([3,1,4,2,3,1,4,2]^T\) gives \[F_8 \left[\begin{array}{r} 3\\1\\4\\2\\3\\1\\4\\2\\ \end{array}\right]= \frac{1}{\sqrt{8}} \left[\begin{array}{c} 20\\0\\ -2+2i\\0\\8\\0\\-2-2i\\0\\ \end{array}\right], \] so \(a_0=5\sqrt{2}, a_1=a_3=0, a_2=-\sqrt{2}/2, a_4=2\sqrt{2}, b_1=b_3=0, b_2=\sqrt{2}/2\). In Corollary 10.8, \(c=0\) and \(d=8\). Equation (10.19) becomes \[P_8(t)=\frac{5}{2}-\frac{1}{2}\cos \frac{\pi}{2}t -\frac{1}{2}\sin\frac{\pi}{2}t +\cos\pi t.\] The interpolant is plotted below.


1 (d) Applying the DFT to \([1,-2,5,3,-2,-3,1,2]^T\) gives \[F_8 \left[\begin{array}{r} 1\\-2\\5\\3\\-2\\-3\\1\\2\\ \end{array}\right]= \frac{1}{\sqrt{8}} \left[\begin{array}{c} 5\\3-(4+\sqrt{2})i\\ -7+10i\\3+(4-\sqrt{2})i\\5\\3-(4-\sqrt{2})i\\-7-10i\\3+(4+\sqrt{2})i\\ \end{array}\right]. \] In Corollary 10.8, \(c=1\) and \(d=9\). Equation (10.19) becomes \begin{eqnarray*} P_8(t)&=&\frac{5}{8}+\frac{3}{4}\cos \frac{\pi}{4}(t-1) +(1+\frac{\sqrt{2}}{4})\sin \frac{\pi}{4}(t-1)-\frac{7}{4}\cos \frac{\pi}{2}(t-1) -\frac{5}{2}\sin \frac{\pi}{2}(t-1)\\ &+&\frac{3}{4}\cos \frac{3\pi}{4}(t-1) -(1-\frac{\sqrt{2}}{4})\sin \frac{3\pi}{4}(t-1)+\frac{5}{8}\cos \pi(t-1). \end{eqnarray*} The trigonometric interpolant is plotted below.



3 Apply the \(8\times 8\) DFT to the data \((0,e^0), (\frac{1}{8},e^{1/8}), \ldots, (\frac{7}{8},e^{7/8})\) and use Corollary 10.8 with \([c,d]=[0,1]\). The trigonometric interpolant is \begin{eqnarray*} P_8(t)&=&1.6131-0.1253\cos 2\pi t-0.5050\sin 2\pi t -0.1881\cos 4\pi t-0.2131\sin 4\pi t \\&& - 0.1991\cos 6\pi t -0.0886\sin 6\pi t -0.1007\cos 8\pi t. \end{eqnarray*} A plot of \(P_8(t)\) follows.



5 Similar to Computer Problem 3, but interpolating the function \(f(t)=\ln t\) at the evenly-spaced points \(1, 9/8, 10/8,\ldots, 15/8\). The trigonometric interpolating function is \begin{eqnarray*} P_8(t)&=&0.3423\\ &&-0.1115\cos 2\pi (t-1)-0.2040\sin 2\pi (t-1)\\ && -0.0943\cos 4\pi (t-1) -0.0859\sin 4\pi (t-1)\\ && - 0.0912\cos 6\pi (t-1) -0.0357\sin 6\pi (t-1)\\ && -0.0453\cos 8\pi (t-1). \end{eqnarray*} A plot of \(P_8(t)\) follows.