Solutions Preliminary Examination in Numerical Analysis January, 07 Root Finding The roots are -,0, a) First consider x 0 > Let x n+ = + ε and x n = + δ with δ > 0 The iteration gives 0 < ε δ < 3, which implies that < x n+ < x n Newton's method will converge monotonically to Next consider / 3 < x 0 < As the signs of the numerator and denominator in the rational part of the iteration does not change on the interval under consideration we nd that x > Finally, x 0 = produces x = Note that an iteration starting at / 3 < x 0 < is not monotonic since it rst moves up past x = then monotonically decreases bac towards To answer b), rewrite the iteration as x n+ = x3 n, and note that for 0 x 3x 0 < / 3 the n next iterate will be non-positive Insisting that x 0 < x 0, so that x will be closer to zero than x 0 gives the limiting case x = x 0, or α 3α ) = α 3, which has the solution α = / 5 Furthermore, whenever x n < / 5 one nds that x n+ < x n so the sequence of absolute values decreases monotonically and must converge, the only possible limit being 0 Finally, for c) we may consider the case f x) > 0 otherwise consider fx) = 0) Assume rst that f x) > 0 in the interval, fx 0 ) 0 by assumption The situation is as the one pictured in Figure and we thus conclude that x < x 0 and that since the tangent lies to the right of the curve it is also true that α > x The case f x) < 0 is handled similarly and the results follows by induction Numerical quadrature The error in the trapezoid rule over a single interval is b a fx)dx = b a b a)3 fb) + fa)) f ξ) for some unnown ξ [a, b] In our example fx) = lnx) and each interval has unit length from to + ) The exact relationship between the integral and the composite trapezoid rule approximation in our case is therefore n lnx)dx = n ln) + ln + )) + n where ξ [, + ] Plugging this bac in to the formula for lnn!) we nd lnn!) = n lnx)dx n ξ + lnn) ξ
x = α x = x x = x 0 Figure : Monotonicity and convexity yields monotone convergence for Newton's method Evaluating the integral Exponentiating: lnn!) = The coecient in Stirling's formula is clearly { The sum can be bounded as follows n n + ) lnn) n + n ξ n! = nn/e) n e n ξ C n = exp ξ n n ξ } = π 6 which means that the coecient is bounded by } { exp { π C n exp } 7 There are, in fact, sharper estimates on C n
3 Interpolation/Approximation a) Let W = V, and the the elements of W be w ij Note that W V = I, ie that row i satises n w ij x j = δ i, =,, n j= This interpolation problem is solved by l i x), that is: l i x ) = n x x i ) n x j x i ) = w ij x j = δ i, =,, n, i= i j j= which shows that V is non-singular if and only if x i x j 0 when i j b) Finding the elements w ij is equivalent to nding the coecients of l i x), i =,, n Noting that l i x) = q i x)/q i x i ) we must thus nd all the coecients of each q i x) in On) operations We must also evaluate q i x i ) Horner's rule can be used to carry out both tass Recall that for the synthetic division of a polynomial P x) = m l=0 α lx l by x x i ) we must nd the polynomial Qx) = m l= β lx l that satises P x) = x x i )Qx) + β 0, with β 0 = P x i )) A direct computation, matching the coecients on the sides of the equality sign, shows that the coecients β can be computed by the Horner recursion: β = α + β + x i, = m, m,,, 0, and β m = α m Applying this to Φ n x)/x x i ) we thus may nd the n coecients of each q i x) at cost On) Once the coecients are nown n additional applications of Horner's rule yields the n scalars q i x i ) at a cost of On) each Linear Algebra We present a solution with C = uv T based on the ideas presented in the classic 977 SIAM Review paper Eigenproblems for Matrices Associated with Periodic Boundary Conditions by Bjorc and Golub but note that since the ran matrix is not unique other solutions are possible For example the choice C = e e T N + e Ne T will leave the tridiagonal part of the matrix intact allowing for the possibility to exploit the diagonal dominance of the resulting A For a) notice that = 0 5 + 0 0 0 0 So A is the tridiagonal matrix on the RHS, and u = [, 0,, 0, ] T, v = [, 0, 0, /] For b) let B = A and use the Sherman-Morrison-Woodbury formula B + uv T ) = B B uv T B + v T B u 3 )
Now By = g can be solved with CN cost C is a small integer lie 7 or so) To solve Aw = f, we perform the following Solve Bz = f at CN cost Solve By = u at CN cost 3 Compute both α = v T z and β = v T y; each dot product costs N Form z α + β) y at N cost or so 5 ODEs a) Explicit and Implicit Euler applied to the scalar problem ẋ = λx yield x n+ = + µ)x n, µ)x n+ = x n where µ = hλ and h is the time step size The methods are stable when + µ and µ, respectively, for µ C Explicit Euler is stable for µ in a circle of unit radius centered at in the complex plane; implicit Euler is stable for µ outside a circle of unit radius centered at in the complex plane b) Explicit Euler applied to this problem yields Tae absolute values: u n+ = u n hu n) u n+ = u n γ n, γ n = hu n If γ n < for every n then the sequence of absolute values is monotone decreasing and bounded below, so it must converge γ n < when u n < /h Clearly, if u 0 < /h then u n < /h for every n, so the sequence of absolute values converges The limit must satisfy u = u h u ) so the only possible limit is u n 0 Conversely, when u 0 > /h all subsequent iterates also satisfy u n > /h and u n+ > u n ; the sequence {u n } alternates sign and can't converge c) Implicit Euler applied to this problem yields u n+ + hu n+) = u n Since the function gu) = u + hu 3 is a bijection for every h 0, the nonlinear system gu n+ ) = u n has a unique solution for every h 0 and u n It's easy to see that u n+ < u n for every u n, so the sequence of absolute values is monotone decreasing and bounded below, and must converge The limit must satisfy u + h u ) = u, so the limit is lim n u n = 0 for every u 0 and every h 0 d) Taylor series says u 0 = uh) + huh) 3 3h uξ) for some ξ [0, h] The implicit Euler approximation is Subtracting yields 3h u 0 = u + hu 3 uξ) = uh) u ) + huh) + uh)u + u ))
Note that uh) + uh)u + u 0 for every uh) and u, so uh) u = 3h uξ) + huh) + uh)u + u )) 3h uξ) If you wish you can further use the fact that uξ) u0) The method has secondorder truncation error As h this bound on the truncation error also goes to As h the implicit Euler approximation satises u 0, and so does the true solution, so the error also goes to zero 6 PDEs Using the exact solution u x at), we have to evaluate ψ h t, h x ) = u x j at n+ ) c u x j at n ) c 0 u x j at n ) c u x j+ at n ) given that x j = x j h x, x j+ = x j + h x and t n = t n+ h t Denoting x j at n+ = s for convenience and using the Taylor expansion, we have u s h x + ah t ) = u s) + u s) ah t h x ) + u s) ah t h x ) + u s + ah t ) = u s) + u s) ah t + u s) ah t ) + and u s + h x + ah t ) = u s) + u s) ah t + h x ) + u s) ah t + h x ) + Thus, we obtain ψ h t, h x ) = u s) c c 0 c ) u s) [c ah t h x ) + c 0 ah t + c ah t + h x )] [ u s) c ah t h x ) + c 0 ah t ) + c ah t + h x ) ] + and arrive at the linear system c + c 0 + c = c ah t h x ) + c 0 ah t + c ah t + h x ) = 0 c ah t h x ) + c 0 ah t ) + c ah t + h x ) = 0 Setting we obtain c = ν = a h t h x ν + ν ), c 0 = ν, and c = ν ν ) Assuming periodic boundary conditions, the matrix of this explicit scheme is circulant so that we now the eigenvectors and use them to compute the eigenvalues For the th eigenvector e πihxj we have e πihxj ) c + e πihxj c 0 + e πihxj+) c = e πihxj e πihx c + c 0 + e πihx c ) = e πihxj ν + ν cos πh x ) + iν sin πh x ) ) 5
and compute the absolute value of the eigenvalues, λ ν) = ν cos πh x )) ) + ν sin πh x ) We require λ for all It is optional to show that this inequality holds if ν 6