Assignment A3

340 Does any three of the four exercises.
501 Does all.

Exc 1. Finding Function Roots

Solve Heath Computer Problem 5.1 (p 250) First plot the graph and find the brackets where the roots are, then derive (show your steps) Newton's method to accurately solve for each root. Illustrate the convergence by showing the numeric sequence for the first root. For the rest of roots you can just show the final value. Optional: Devise a routine to automatically search for brackets where there is a root, i.e., replace the step above of graphing the funcion and manually locating the root brackets and hence starting values for Newton's method.

Exc 2. Lateral Displacement of Rail Tracks

Rail transportation played an important role in settling Alberta. While safe in comparison with other means of transportation (e.g. automobiles), accidents happen also to trains. To the right is a picture of a train derailed in 1899 as it was crossing the whitemud creek, just south of Edmonton (photo: Provincial archives of Alberta). Several Galician immigrants were injured in this event.

A particular problem is de-railing due to curving of the tracks. This problem is sometimes also called sun curves, since it is caused by the sun heating the rails. When the rails heat up they expand slightly. When the endpoints are fixed instead of expansion along the track the rail will curve out in a circle segment. Perhaps surprisingly even a small expansion can cause a significant lateral displacement. A particular rail has a base length L=20m. During the day it has expanded with 2mm = 0.002m. Determine the lateral displacement h caused by this. Use Newton's method to solve the problem. How can you find a good starting approximation for h?

hint

Exc 3. Finding Extents in a Chemical Reaction

Exc 4. Computing the square root by a fixed point algorithm.

(When submit, I only need the plots and explanations. You may or may not submit your matlab code.)

Fix a positive number z > 1. Choose your initialization point x(0) > sqrt(z) in the following.

Procedure 1: Define the recursion: x(n+1) = (z+x(n))/(1+x(n)). Implement the above recursion on Matlab, run it for a while. Is it converging to the square root of z? (You might want to use some square number as your test case first since then you know what the sequence is expected to converge to) What can we say about the odd sequence (i.e., x(1), x(3), ...) and the even sequence? Plot the sequence and the absolute error. Try to figure out the convergence rate, i.e., linear or quadratic or something else?

Procedure 2: Define the recursion: x(n+1) = .5 * (x(n) + z/x(n)). Implement the recursion again on Matlab, run it. Is x(n) monotonically converging to the square root of z? Plot the sequence, absolute error, and figure out the convergence rate.

How shall we compute the square root of z, if z < 1?

Now, by slightly modifying the second procedure, you can easily compute the k-th root. (Hint: the second procedure can be interpreted as Newton's method for the nonlinear equation x^2=z.) Implement the algorithm and test it for a few cases. (Don't forget that you might need to change the initialization point as well!)