Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Devise and implement in MATLAB fixed-point iterative methods for the solution of the nonlinear equation log() 1 1 = 0 (). (a) Produce a figure

Devise and implement in MATLAB fixed-point iterative methods for the solution of the nonlinear equation log() 1 1 = 0 (). (a) Produce a figure to illustrate that this equation has two positive roots in the interval (0, 3). Use red circle markers to locate the roots on the figure. (7 marks) (b) Create a MATLAB function myFixedPoint(, 0,, ) implementing a fixed iteration of the type +1 = (). The MATLAB function should take as arguments the mathematical function to be iterated , the initial guess 0, the required tolerance and a parameter specifying the maximum number of iterations allowed. The function should return a list [,] of two lists containing all values of the iterates {, = 0, } and the error measured { = | 1 |, = 0, }, respectively, computed at SIM1004 4/4 each iteration step. In the loop, display the number of iteration, the and the error measured, and make sure to produce the output in the following format, Iteration x(n) |x(n+1) x(n)| 1 2.50000 Inf 2 : : : : : : : : where both and |+1 | are diplayed up to 5 and 7 decimal digits, respectively. You are not allowed to use MATLAB function fzero to solve this problem. (13 marks) (c) Provide comments in the above MATLAB function to describe what each line does. (3 marks) (d) Consider the iterative scheme () = 1 1 on the interval (0, 1). Create another MATLAB script file for the following, (i) Call your function in 3(b) and produce figures of the iterates and the error measured in this case if accuracy of 6 decimal digits is required. Label the axes accordingly. (ii) Provide the value of the root. (5 marks) (e) Consider the iterative scheme () = 1 1 on the interval (2, 3). Create another MATLAB script file for the following, (i) Call your function in 3(b) and produce figures of the iterates and the error measured with an initial guess arbitrary close to the solution (which you may identify from the figure in (a)). (ii) Can you find the root? If not, propose a new iterative scheme () and find the root of the nonlinear equation () on the interval (2, 3).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Explain consumer behaviour.

Answered: 1 week ago

Question

Explain the factors influencing consumer behaviour.

Answered: 1 week ago