MATH205 – NUMERICAL ANALYSIS, HOMEWORK 1 MATH205 – NUMERICAL ANALYSIS HOMEWORK 1: ERRORS AND ROOTS Due date 31/03/2016 1. Theory [20] 1.1 What is the biggest number that MATLAB can represent? What is the smallest non-zero number in MATLAB? Why is that so? 1.2 Name four numerical methods for finding roots of a function, and explain graphically how each of them works. Name some advantages/disadvantages for each method! 1.3 What is convergence of a method? What is opposite of convergence? 1.4 One of the methods is said to have quadratic convergence. Which one? Explain what quadratic convergence is, and how to verify whether convergence is quadratic or not! 2. Finding roots [40] 2.1 Show that the sequence xn = 5 -2n converges quadratically to zero as n -> infinity 2.2 As Heron found a way to determine square root of a number in a few iterations, you are asked to prove that the following formula gives the next guess for finding cubic root of a number A, if Newton-Raphsons method is used: 2 xn x n1 A xn2 3 2.3 Write a MATLAB program that implements this method and show in a table first six iterations and how the error evolves for a) A = 25, x0 = 4 and b) A = 9, x0 = 3 The table should have the format shown below. Comment the results. Number of iteration n 0 1 2 3 Guess xn Error ... En+1 / En2 MATH205 – NUMERICAL ANALYSIS, HOMEWORK 1 2.4 Consider the function f x x 3 5 x 2 7 x 3 a) Can you use the bisection method to find the root at x=1? Explain! b) If you use the bisection method, how many steps would you need at most to find the root in the interval [2.3, 4.4] with tolerance 10-8? Demonstrate this in MATLAB! c) Use the MATLAB fzero function to find the roots with starting intervals [0, 5], [2, 4] and [0, 2]. Plot the function, the line y=0 and the found roots in the interval [-1, 5] using the command scatter. Comment the results. d) In the textbook, page 161, there is an implementation of Newton-Raphsons method in MATLAB. Use this function to solve f(x) = 0 starting in x0 = 0.5 and set the tolerance to 0, while enforcing maximum number of iterations to 6. Make the method tell the value of the guess in each iteration with 10 digits precision. Compare fzero and newtraph. Make a table of iterations. Does fzero give results that converge quadratically? 2.5 Explain why is t=fzero(@(y)(sin(y)-x) [0 pi/2]) equivalent with setting t=asin(x), where asin(x) is the inverse function (arcsin) of sin(x)! Demonstrate in MATLAB! 2.6 A uniform rope or cable hanging freely only under its own weight between two points in a uniform gravitational field attains the shape of a catenary. This shape is mathematically described by the function x f x a cosh , where a is a positive constant called the catenary constant. a This function looks a lot like a parabola, but it is not a parabola! Sketch the functions f(x) , with a = 1, and the parabola g(x ) = x2(cosh(1) -1) + 1 in the same plot in different colors, in the interval -2 ≤ x ≤ 2. g(x) is scaled and translated to fit f(x) as much as possible. Now plot the difference and ratio between functions f and g in two subplots that are on the same plot. What and where are the maximum absolute and maximum relative differences in f and g? Express the maximum relative difference in the said interval in percent! MATH205 – NUMERICAL ANALYSIS, HOMEWORK 1 3. Problem – Electric Power Line [40] The following problem demonstrates the use of numerical methods for finding roots of non-trivial functions. The problem is about tensions in a power cable hanging between two pylons. Tension is a force that exists in a cable that is under the action of two forces in opposite direction. Thus, a cable hanging on a pole is under tension and gets under more tension if the cable is made tighter. Obviously, the shorter the cable, the higher the tension on the cable and pylons. Consequently, pylons get more expensive and the cable can break! On the other hand, the longer the cable, the cost of cable increases, the transmission losses increase, and the cable may get too close to the ground! Let us set up a model that describes the problem! 3.1 Imagine there are two pylons holding a cable. The pylons are 100 m apart. The hanging cable is put in coordinate system symmetrically around vertical axis, as shown in figure to the right. The height h of the point on the pylons holding the cable is 40m. The function of cable position can be written as C x T xw T cosh h S w T w that is, the catenary constant a (3.1) T where T is the horizontal tension (force) on the cable and w w is the unit weight of the cable. S is the sag, or how much the cable comes closer to the ground. The cable length is calculated by the integral B L 1 C ' x dx 2 (3.2) A Show analytically that in this case L 2T Bw sinh w T (3.3) MATH205 – NUMERICAL ANALYSIS, HOMEWORK 1 3.2 Now assume that the density of the cable is = 8.9 g/cm3, the diameter is D = 10 cm and the Earth acceleration is g = 9.81 m/s2 . The cross-sectional area of the cable is assumed to be constant. Show that the unit load is w = 685.72 N/m. Assume also that the cable length is L = 105 m. Setup an equation that finds the tension T by finding the root (use fzero) of the function from Equation (3.3) ! You may need to plot the function to be able to make a qualified first guess. The cable and the pylons can withstand a tension of Tmax = 100 kN. Comment on the length of the cable – is it appropriate? What is the hight above the ground of the lowest point on the cable? If the height is below 32m, it is a problem since it may touch trees! Find out is it hanging too low? 3.4 Now you need to put the constraint that C(50) = C(0) +10 C(0) – C(50) + 8 = 0, that is, the sag S = 10 m. Using these values and Newton-Raphsons method, find the new tension T! Comment on the new tension T! How many iterations did you make? Why? What is a realistic tolerance? Having T and w, you can find the length that satisfies the lowest point criterion using the previously found equation (3.3) for L. 3.5 This model did not take into account parameters like contraction and elongation of the cable as the ambient temperature changes, wind loads, snow and ice formation on cables, nonuniformity of the cable as a result of different tension along the cable... Comment on whether it can be justified to use the approximation that the cable position is described by a parabola, rather than a catenary! (Try finding the length of the cable if its position were following a parabola!) 3.6 Can you suggest what to do if the tension is too high, and the cable length cannot be longer because of the lowest point is too close to the ground? What is the “price“ of these actions? --- TO BE CONTINUED IN HW2 ---

Download PDF

- Similar pages
- Welcome to the Quadratic Equation Solver User Manual
- CSC 336F Due: 1 December 2014. Assignment #4
- MATLAB installation instructions for students
- Assignment 4
- CS 315 Software Design Homework 10 Model-View
- Short user guide for SIMCEP simulation tool
- Camera-based Visible Light Communication with Display Monitors
- Homework 5
- Matlab Style tips