write Matlab code please 4. Consider finding the root of the function f(x) = x + 4x
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4. Consider finding the root of the function f(x) = x + 4x (a) Use your Newton's method function with initial guess x1=1.5, tol- erance 10-10, and a max number of steps 20. Print a table that includes the iteration number n, the value of an at each iteration, and the error at each iteration En = n - n-1. Note: The error for cannot be computed. In order to make E the same size as a for your table, you can fill in E = 0 for the first error. (b) Use the following four fixed point iteration functions g(x) with your code from Problem 3 to approximate the root of the function f using an initial guess of x1 = 1.5, a tolerance of 10-10, and a max number of steps of 20. Print a table for each gi(x) that includes the iteration number n, the value of xn at each iteration, and the error at each iteration En|xn - n-1|- = i. 9(x) = ii. 92(x) = x- - iii. 93(x) = 10 4+x x+4x-10 3x +8x 10-23 4 10 V iv. 94(x) = x + 4x + x - 10 and En using your an- En En En-1' E-1 En- Show how these fixed point iterations find the roots of f(x) (take f(x) and rearrange it into g. (x) or take g(x) and rearrange it into f(x) for all i. You can do this by hand and submit a second pdf or type it in the text of your Matlab pdf). (c) Make a table with the ratios swer from part a and b (There should be 5 tables). What do these ratios tell us about each fixed point iteration g(x)? Why might this be? What does it tell you about Newton's method for this function? Do you notice anything between 92(x) and your Newton's method results? 6 4. Consider finding the root of the function f(x) = x + 4x (a) Use your Newton's method function with initial guess x1=1.5, tol- erance 10-10, and a max number of steps 20. Print a table that includes the iteration number n, the value of an at each iteration, and the error at each iteration En = n - n-1. Note: The error for cannot be computed. In order to make E the same size as a for your table, you can fill in E = 0 for the first error. (b) Use the following four fixed point iteration functions g(x) with your code from Problem 3 to approximate the root of the function f using an initial guess of x1 = 1.5, a tolerance of 10-10, and a max number of steps of 20. Print a table for each gi(x) that includes the iteration number n, the value of xn at each iteration, and the error at each iteration En|xn - n-1|- = i. 9(x) = ii. 92(x) = x- - iii. 93(x) = 10 4+x x+4x-10 3x +8x 10-23 4 10 V iv. 94(x) = x + 4x + x - 10 and En using your an- En En En-1' E-1 En- Show how these fixed point iterations find the roots of f(x) (take f(x) and rearrange it into g. (x) or take g(x) and rearrange it into f(x) for all i. You can do this by hand and submit a second pdf or type it in the text of your Matlab pdf). (c) Make a table with the ratios swer from part a and b (There should be 5 tables). What do these ratios tell us about each fixed point iteration g(x)? Why might this be? What does it tell you about Newton's method for this function? Do you notice anything between 92(x) and your Newton's method results? 6
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
Give Correct ANSWERS Human-Computer Interaction (a) If you had been one of the original inventors of the WIMP interface, and engineers on the technical team had been sceptical about the advantages...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Using java language and data structure In chapter 1 you learned how to merge two sorted lists and get a third list which is also sorted. Write a method named mergeUnsortedLists in an application,...
-
Is a stronger dollar good or bad for America? Explain.
-
Blue Water Kayak began operations on January 1, 2019. The owner invested $10,000 during the first year and was able to withdraw cash of $42,000 after a successful first year. During 2020, the second...
-
True or False: A rotating assembly with multiple parts can achieve an acceptable balance by balancing all the components separately and then putting all of them together.
-
Assume that you own 1,200 shares of $10 par value common stock and the company has a 5-for-1 stock split when the market price per share is $70. Required: a. How many shares of common stock will you...
-
A+ Rental Cars corporate office offers each franchise location $20,000 each month to spend on local advertising. Some franchises take advantage of this offer, while others do not. We have gone back...
-
AP Vianne is the management accountant for Divvy, a bike-sharing service in Chicago. She is trying to plan for summer activity by using the most recent ridership information provided. She needs to...
-
1. What interest rate (the nearest percent) must you earn on a $150,000 lump sum investment today so that you will have $525.000 after 12 years? 2. Tom won the Loterry that will pay him $200,000 at...
-
Sell at Split-Off or Process Further Bozo Inc. manufactures two products from a joint production process. The joint process costs $110,000 and yields 6,000 pounds of LTE compound and 14,000 pounds of...
-
Write a note on following languages, their standards, compilers and IDEs which support them. C# C++ Java Fortran Pascal Ruby PHP COBOL Python [Marks 10]
-
Discuss what management must do to show they are serious about providing a safe and healthy working environment for employees. What role/responsibility does the employee have? If working outside the...
-
5.) The cash flow forecast for the city of Typical, KY is provided on the following page. (a.) What information does a cash flow forecast provide? (b.) Based on Typical's cash flow forecast, what...
-
Draw the Nyquist plot for the system with open loop transfer function, K s(s+2)(s+10) G(s)H(s)= a) Draw the s-plane map of the system. (2m) b) Draw the Nyquist plot of the system. Show the working...
-
The management of Ballard MicroBrew is considering the purchase of an automated bottling machine for $54,000. The machine would replace an old piece of equipment that costs $14,000 per year to...
-
In Exercises, find the equation of the tangent line at the given point on each curve. 2y 2 - x = 4; (16, 2)
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Matthew borrows $250,000 to invest in bonds. During 2012, his interest on the loan is $30,000. Matthew's interest income from the bonds is $10,000. This is Matthew's only investment income. a....
-
John Williams (age 42) is a single taxpayer, and he lives at 1324 Forest Dr., Reno, NV 89501. His Social Security number is 555-94-9358. John's earnings and withholdings as the manager of a local...
-
Presented below is selected information related to Tsui Repairs at December 31, 2025. Tsui reports financial information monthly (amounts in thousands). a. Determine the total assets of Tsui Repairs...
-
Explain the career opportunities in accounting.
-
Collins Computer Timeshare entered into the following transactions during May 2025. 1. Purchased computers for R\($20,000\) from Digital Equipment on account. 2. Paid R\($4,000\) cash for May rent on...
Study smarter with the SolutionInn App