Assignment III, MTH501. Due date just before lecture on Wednesday Nov 28. 1.
Determine ϵ for your calculator. Explain your method. 2. Find the two zeroes of ...
Assignment III, MTH501 Due date just before lecture on Wednesday Nov 28 1. Determine for your calculator. Explain your method. 2. Find the two zeroes of f (x) = Γ(x) − 10 to a precision of 100. (a) By the bisection method, listing all the bracketing pairs. (b) By the secant method, listing all the pairs (xn , f (xn )). 3. Compute by calculator a few iterations of Newton’s Method to get an approximation to arctan(1). 4. Use the MATLAB functions fzero, optimset and sprintf to find as many real zeroes of x5 − 2x4 − 3x3 + 4x2 + x − sin x as you can to a termination tolerance on x of 10−8 . Hand in a printout of your MATLAB commands and list of zeroes. 5. Sketch a direction field plot for the O.D.E. y0 =
1 . t+y−1
6. (a) Using a calculator and the Modified Euler Method with h = 0.1 find y(1.2) approximately where y(t) is the solution to the I.V.P. 1 with y(1) = 1. y 0 (t) = t + y(t) − 1 (b) Repeat the above problem with h = 0.2 and thereby obtain an estimate of the global discretization error at t = 1.2 when using h = 0.1. 7. Using the MATLAB functions ode45, odeset, plot, sprintf and end to determine to a relative tolerance of 10−10 the solution to the I.V.P. 1 with y(1) = 1. y 0 (t) = 10 sin t + y(t) − 1 Hand in your matlab input commands, the computed value of y(30) and a plot of the solution over the interval 0 ≤ t ≤ 30. 8. Convert the following second order IVP into a first order IVP system. y 00 (t) + 100001y 0 (t) + 100000y(t) − 100000 = 0 where y(0) = 3 and y 0 (0) = −100001. If a conventional numerical solver like ode45 (Runge-Kutta) is used the step sizes required cause the calculation to take a very long time. This is because the problem is “stiff” — see the textbook. Special numerical methods are much faster in cases like this. Use the MATLAB function ode23tb to calculate y(t) to a relative tolerance of 10−10 over the interval 0 ≤ t ≤ 30 and plot the result. Hand in a printout of your MATLAB commands and the plot. 9. Let xi = i for i = −3, −4, . . . , 5. For each i = −3, −2, −1, 0, 1 let Bi (t) denote the cubic B-spline with support [xi , xi+4 ]. Let S(t) be the natural cubic spline which interpolates (0, 0), (1, 1), (2, 1). (a) Find the coefficients c−3 , c−2 , c−1 , c0 , c1 such that S(t) =
1 X
ci Bi (t) for 0 ≤ t ≤ 2.
i=−3
(b) Evaluate S(1.5) by hand or calculator. Remark if you attempt Question 9 be sure you have made note of the corrections to the notes on B-splines announced in lectures Monday, Nov 19.