Write the algorithm i. Write a code in Octave that implements Newton's method (commenting throughout your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write the algorithm i. Write a code in Octave that implements Newton's method (commenting throughout your code to briefly explain what is being done) Implement the algorithm ii. i. Use your algorithm to solve Exercise 1 (d, e) of the textbook on page 77. Use your algorithm to approximate √2 with an error tolerance of 10-10. How many iterations were required, and how does this compare with the number of iterations for the corresponding problem using bisection method? iii. Provide an example where using your Newton's method code does not converge to a desired root. Explain why it didn't converge to the desired root. 1. Use the bisection method with a hand calculator or computer to find the indicated roots of the following equations. Use an error tolerance of € = 0.0001. (a) The real root of x³ - x² - x - 1 = 0. (b) (c) (d) (e) (f) The root of x = 1+0.3 cos(x). The smallest positive root of cos(x) The root of x = e-*. The smallest positive root of e-* = The real root of x³ - 2x - 2 = 0. All real roots of x²-x-1=0. + sin(x). = sin(x). Write the algorithm i. Write a code in Octave that implements Newton's method (commenting throughout your code to briefly explain what is being done) Implement the algorithm ii. i. Use your algorithm to solve Exercise 1 (d, e) of the textbook on page 77. Use your algorithm to approximate √2 with an error tolerance of 10-10. How many iterations were required, and how does this compare with the number of iterations for the corresponding problem using bisection method? iii. Provide an example where using your Newton's method code does not converge to a desired root. Explain why it didn't converge to the desired root. 1. Use the bisection method with a hand calculator or computer to find the indicated roots of the following equations. Use an error tolerance of € = 0.0001. (a) The real root of x³ - x² - x - 1 = 0. (b) (c) (d) (e) (f) The root of x = 1+0.3 cos(x). The smallest positive root of cos(x) The root of x = e-*. The smallest positive root of e-* = The real root of x³ - 2x - 2 = 0. All real roots of x²-x-1=0. + sin(x). = sin(x).
Expert Answer:
Answer rating: 100% (QA)
Certainly heres an algorithm for implementing Newtons method in Octave octave Newtons method implementation function root iterations newtonsmethodf df x0 tol maxiter f Function for which we want to fi... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these programming questions
-
he average speed of plate movement is slow, but sudden movements do occur. Plates can stick to each other, accumulate stress, and then release the stress suddenly. That's what happened, for example,...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
In Mertons functional analysis of society which of the following concepts are central? (a) Functions and Dysfunctions (b) Structural elements and functional pre-requisites (c) Subjective and...
-
What minimum force f , applied horizontally to the wheel axis, is needed to bring the wheel up to the height step h ? Tomer as the wheel radius and w as its weight. Tip: apply the equilibrium...
-
Determine the normal force, shear force, and moment at a section passing through point D of the two-member frame. Units Used: kN = 103 N Given: w = 0.75kN/m F = 4 kN a = 1.5 m d = 1.5 m b = 1.5 m e =...
-
1. Look up how much you've made in stock market. I''ve made $295.02. Assume you are single and make $101,500 a year.And answer the 2 parts below. Show your work, no work no points. A. Calculate your...
-
Show that if \(\mathbf{X}^{\prime} \mathbf{X}\) is in correlation form, \(\boldsymbol{\Lambda}\) is the diagonal matrix of eigenvalues of \(\mathbf{X}^{\prime} \mathbf{X}\), and \(\mathbf{T}\) is the...
-
Eilers Company has two producing departments and two support departments. The following budgeted data pertain to these four departments: Required: 1. Allocate the overhead costs of the support...
-
based on information below, what would be the profit per cookie if they were sold $ 6 per cookie? what price should i sell it to make a profit and what should i change? 1 . Direct Materials (...
-
Each of the following compounds is characterized by a 1H NMR spectrum that consists of two peaks, both singlets, having the chemical shifts indicated. Identify each compound. (a) C6H8; 2.7 ppm (4H)...
-
1. Suppose the random variable A is determined by three variables, B, C, and u in the following way: A = 0 + 1B + 2C + u Where the following relationships hold: Cov(A, B) = 10 Cov(B, C) = 40 V...
-
A generous benefactor donates $500,000 to a state university. The donation is to be used to fund student scholarships. Determine the dollar amount of scholarships that can be given out each year...
-
An FIR filter with the transfer function \[H(z)=\left(z^{-L}-1 ight)^{N}\] with \(N\) and \(L\) integers is also a comb filter. Discuss the properties of this filter regarding its zero positions and...
-
Show that if two given networks are described by \(Y_{i}=\sum_{j=1}^{M} T_{i j} X_{j}\) and \(Y_{i}^{\prime}=\) \(\sum_{j=1}^{M} T_{i j}^{\prime} X_{j}^{\prime}\), then these networks are...
-
Reconsider Problem 28. Determine which oven should be purchased based on an incremental present worth analysis. Data from problem 28 Octavia Bakery is planning to purchase one of two ovens. The...
-
Think about the informative, persuasive, instructional, and collaborative presentations you have experienced as a student, an employee, a consumer, or a citizen. Select two, and compare and contrast...
-
7:51 Java Assessment What statement returns true if "nifty" is of type String? "nifty".getType() == String "nifty".getClass().getSimpleName() "String" "nifty".getType().equals("String") "nifty"...
-
The maximum pressure that can be developed for a certain fluid power cylinder is 15.0 MPa. Compute the required diameter for the piston if the cylinder must exert a force of 30 kN.
-
Give asymptotically tight bounds on the following summations. Assume that r ? 0 and s ? 0 are constants. a. b. c. . in k=1
-
Consider n chords on a circle, each defined by its endpoints. Describe an O(n lg n)- time algorithm to determine the number of pairs of chords that intersect inside the circle. (For example, if the n...
-
Show how to solve the subset-sum problem in polynomial time if the target value t is expressed in unary.
-
A lot of compensation information is available to employees today on the Web (e.g., www.salary.com), and much of it is inaccurate. How can an organization assure employees that they are fairly...
-
Flexible benefit plans are common today. Discuss ways in which employers can ensure that employees make good choices about the benefits and benefit levels that they choose within the benefits...
-
Payroll and benefits are commonly outsourced. Discuss which parts of PM, compensation, benefits, and payroll you would consider outsourcing; justifying your views.
Study smarter with the SolutionInn App