Devise a robust and efficient scheme for finding all simple

Assignment Help Other Engineering
Reference no: EM131690351

Numerical Methods - Assignment

Robustness of numerical methods

Problem.

Devise a robust and efficient scheme for finding all simple roots of a given (real nonlinear scalar) equation f (x) = 0 in a given interval x ∈ [a, b].

Background. Important qualities of numerical methods, in addition to convergence, are

(a) efficiency - requires a small number of function evaluations;

(b) robustness - fails rarely, if ever;

(c) minimality - uses a minimal amount of user input, e.g. does not require the derivative in addition to the function.

No single method meets all criteria. For instance, the Newton-Raphson map g[f ](x) is guaranteed to converge quickly if the initial iterate x0 is "close enough" to a simple root so that gxj [f](x0) < 1.

However, convergence is only local and the neighbourhood of convergence is difficult to assess ahead of time for a given f(x). In contrast, the bisection method is slow but it is guaranteed to converge provided only that a bracketing interval is found on which f(x) changes sign. A natural idea, then, is to combine the two in a fast and robust hybrid method.

Question 1. Write a MATLAB function [ai,ci,bi] = bisect(f, ai, bi, niter) to per- form the interval bisection method for a given function f on an interval given by its left and right ends ai and bi. The MATLAB function must check if f (x) changes sign in the interval and if so perform a specified number of iterations niter and then return the estimated root in ci and the left and right ends of the bracket where it is located in ai and bi; else return in ci a NaN MATLAB object.

Question 2. Write a MATLAB function ci = newtonraphson(f, x0, tol) to perform the Newton-Raphson method for the function f starting from initial iterate x0. The function must check if the absolute value of the derivative of the Newton-Raphson map at x0 is less than unity, and if so perform iterations and return in ci the estimated root; else return in ci a NaN value. To avoid non-essential input all derivatives needed must be computed using the finite-difference formula gprim = (g(x + eps)-g(x -eps))/(2*eps), where eps=1e-5. Use xk xk-1 < tol(1 + xk ) as a stopping condition for iterations; what is your interpretation of this condition?

Question 3. Write a MATLAB function rts=findroots(f,a,b,n,tol) to combine the bisection and the Newton-Raphson methods as follows. Uniformly partition the given inter- val [a, b] into n intervals of equal length. For each subinterval [ai, bi] over which the function changes sign use 3 bisection steps to approach the root more closely calling your bisect. Next, call your newtonraphson to perform Newton-Raphson iterations if the method con- verges, otherwise revert back to the last bisection bracket and apply 3 further bisection steps. Loop until the stopping condition f (xk) < tol is met. Return in the array rts all roots found.

Question 4. Write a MATLAB script Q04.m where the function findroots is used to find all of the roots of the Chebyshev polinomials Tn(x) of degrees n from 1 to 20 with tolerance tol=1e-12. In one figure, plot all roots found on the abscissa axis versus the polynomial degree on the ordinate axis. In a second figure, plot together the graphs of all Chebyshev polinomials Tn(x). For the polynomial T15 compare the roots found numerically with the known exact solutions and print the absolute error in each root in the format of the following example.

Roots and their Errors for the Chebyshev polinomial T[5]:
-9.51056516295153531182e-01 +0.00000000000000000000e+00
-5.87785252292473137103e-01 +0.00000000000000000000e+00
+3.21265594383589607162e-17 +9.33588993957266210749e-17
+5.87785252292473137103e-01 +1.11022302462515654042e-16
+9.51056516295153531182e-01 +0.00000000000000000000e+00

[Hint: you may use fprintf with format +30.20e'.]

Further hints and directions.

1. Since this Assignment is largely a programming exercise, it is essential to include all MATLAB codes in the pdf files of your report. Explain the steps your codes perform, list the variables used.

2. MATLAB codes for the interval bisection method and the Newton-Raphson method appear in our MATLAB lecture notes and in past Assignments. Feel free to modify these.

3. Do not use MATLAB inbuilt root-finding functions such as roots and fzero.

4. The definition and the exact roots of the Chebyshev polinomials are given in section 2.3.2 of the Lecture Notes.

5. Formatted output can be printed to screen or file e.g. by fprintf(' +30.20e +30.20e \n', [array1; array2]).

6. Write code in a"bottom-up" approach - implement the building blocks first; then test and verify for one equation; then loop over many equations.

7. While writing code it is useful to include MATLAB statements to compute and print out errors, orders of convergence and otherwise monitor what you code does.

Verified Expert

The work is related to the numerical methods and their implementation using MATLAB. As we can see in the work we have 4 questions. First question implements the bisection method and has been implemented in MATLAB.Second question implements the Newton method and has been implemented in MATLAB.Third question implements the combination of the Newton and bisection method and has been done in MATLAB.Fourth question implements the output of third question and is done in MATLAB

Reference no: EM131690351

Questions Cloud

What is the theme of the poem : What is the theme of the poem? How do you know this is the theme?How did hearing the poem recited aloud compare to a silent reading of it?
Explanation of the texts of two debaters : Remember when you are proving your thesis right you are: 1. showing the reader how your argument is a better explanation of the texts of your two debaters.
Differentiate between a value-added and non-value-added cost : What is the difference between a value-added and a non-value-added cost? What is the product life cycle? How does it impact pricing decisions?
Anthropology in lord of the flies : Ralph wept for the end of innocence, the darkness of man's heart, and the fall through the air of a true, wise friend called Piggy.
Devise a robust and efficient scheme for finding all simple : Devise a robust and efficient scheme for finding all simple roots of a given - Write a MATLAB script Q04.m where the function findroots is used
Explain the classification of presidential stalkers : Examine the behavior of presidential stalkers from a psychological perspective
Personal exploration about the poem : What details do you find interesting in the poem and how to they relate to the reaction that you are having?
Stock price to drop on the ex-dividend day : If the shares are selling at $10 per share, how much would you expect the stock price to drop on the ex-dividend day?
Describe any four rights of users of information systems : Describe any four rights of users of information systems. Explain what is meant by outsourcing. Explain the management advantages of outsourcing.

Reviews

inf1690351

2/14/2018 2:01:08 AM

Thank you, This was my first time I got an assignment done from the web. my first time at ExpertsMind.com and I am happy, I will never go anyplace else (whatever other paper site). ALL I got the opportunity to say is WOW the work was awesome.

inf1690351

1/2/2018 5:26:43 AM

you have to find the roots of some 20 equations - The Chebyshev polynomials of degrees from 1 to 20. Question 4 revised requirements Both plots are attached PDF format also has given 25796356_1numerical_methods_2.zip

len1690351

10/25/2017 3:20:29 AM

This is my assignment and it focuses on numerical programming. I need an excellent expert in applied mathematics who is able to do it. Please follow the structures which are written in the assignment. While writing code it is useful to include MATLAB statements to compute and print out errors, orders of convergence and otherwise monitor what you code does.

len1690351

10/25/2017 3:19:52 AM

Your submission must be a .pdf file containing a written account of your solutions to all of the Questions below, together with any .m files created for use in MATLAB. All figures, tables, and MATLAB source codes MUST BE INCLUDED in the.pdf The figures must be annotated with axis labels and figure captions. All files must be zipped together in a single .zip file and uploaded to Moodle by the submission deadline. Further details on the submission format are available on Moodle. Do not deviate from the submission instructions.

Write a Review

Other Engineering Questions & Answers

  Characterization technology for nanomaterials

Calculate the reciprocal lattice of the body-centred cubic and Show that the reciprocal of the face-centred cubic (fcc) structure is itself a bcc structure.

  Calculate the gasoline savings

How much gasoline do vehicles with the following fuel efficiencies consume in one year? Calculate the gasoline savings, in gallons per year, created by the following two options. Show all your work, and draw boxes around your answers.

  Design and modelling of adsorption chromatography

Design and modelling of adsorption chromatography based on isotherm data

  Application of mechatronics engineering

Write an essay on Application of Mechatronics Engineering

  Growth chracteristics of the organism

To examine the relationship between fermenter design and operating conditions, oxygen transfer capability and microbial growth.

  Block diagram, system performance and responses

Questions based on Block Diagram, System Performance and Responses.

  Explain the difference in a technical performance measure

good understanding of Mil-Std-499 and Mil-Std-499A

  Electrode impedances

How did this procedure affect the signal observed from the electrode and the electrode impedances?

  Write a report on environmental companies

Write a report on environmental companies

  Scanning electron microscopy

Prepare a schematic diagram below of the major parts of the SEM

  Design a pumping and piping system

creating the pumping and piping system to supply cool water to the condenser

  A repulsive potential energy should be a positive one

Using the data provided on the webvista site in the file marked vdw.txt, try to develop a mathematical equation for the vdW potential we discussed in class, U(x), that best fits the data

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd