% SECOND EXAM \centerline{\bf CS/MATH 3414 SECOND EXAM} \bigskip\rightline{Name \leaders\hrule\hskip 2.5in} \medskip\hrule\noindent Show your answers on these pages. Either show your work on these pages or on attached sheets.\smallskip\hrule\medskip \def\urule{\hbox{\leaders\hrule\hskip 40pt}} \item{1. (15)}Consider the root finding problem $$f(x)=x^2\,\cos{\pi x\over 4} =0.\eqno\rm(R)$$ \item{A.}Does Newton's method applied to (R) converge to {\it some} root of (R) for any starting point $x_0$? Justify your answer.\vskip 1in \item{B.}For $x_0=1$, Newton's method applied to (R) has rate of convergence $p=\urule$. \item{C.}For $x_0=1.9$, $x_1=2.1$, the secant method applied to (R) has rate of convergence $p=\urule$. \filbreak \item{2. (15)}Consider the problem of finding the best discrete least squares aproximation $p(x)=\alpha_0+\alpha_1\sin x+\alpha_2\cos x$ to the data points $(x_i,f_i)$, $i=1$, \dots, 5, where $x_i=0.1i$, $f_i=\sqrt{x_i}$. Set this up (do not solve) as a linear algebra problem: minimize $\n{Au-b}_2$, where \vskip 1in $$A=\hskip 2in,u=\hskip 1in,b=\hskip 1in.$$ \vskip 1in \filbreak \item{3. (20)}The first two orthogonal polynomials $\psi_0$, $\psi_1$ with respect to the inner product $$ \langle p,q \rangle=\int_0^1 p(x)q(x)\,dx \qquad\hbox{are}\qquad \psi_0(x)=1,\qquad \psi_1(x)=x-{1\over2}. $$ Find the third orthogonal polynomial $\psi_2(x)$ with respect to this inner product. $\psi_2(x)=\urule\urule$. \vskip 2in \filbreak \item{4. (15)}Find constants $w_0$, $\tilde w_0$, $w_1$ such that the integration formula $$\int_0^2 f(x)dx \approx w_0f(0)+\tilde w_0f'(0) +w_1f(1)$$ is exact if $f(x)$ is a polynomial of degree $\le2$. $w_0=\urule$, $\tilde w_0=\urule$, $w_1=\urule$. \vskip 1in \filbreak \item{5. (10)}The best technique for the integral $$\int_0^1 {\sin\bigl(x^2+3\bigr)\over\sqrt{x}}dx$$would be \urule\urule. \filbreak \item{6. (10)}Suppose that an integration formula ${\cal F}(f;h)$ satisfies $$\int_a^b f(x)\,dx={\cal F}(f;h)+a_3h^3+a_6h^6+a_9h^9+ \cdots,$$where the $a_i$ are constants independent of $h$. Then an ${\cal O}\bigl(h^6\bigr)$ accurate estimate of $\int_a^b f(x)dx$, in terms of ${\cal F}(f;h)$ and ${\cal F}(f;h/2)$, is $$\urule\urule\urule.$$ \filbreak \item{7. (15)}Let $S(x)$ be a $C^1$ cubic spline with breakpoints at $x_i=i/10$, $i=0,1,\ldots,10$. Simpson's rule with $h=0.05$ is exact for $\int_0^1 S(x)dx$, but it is not exact with $h=0.04$. Explain why. \vskip 2in \vfill\eject