Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE DO NOT COPY OTHER CHEGG ANSWERS, AND PLEASE USE MATLAB. Write a matlab function [x, counte r]= steffensen (f,x0,tol) to find the root of

image text in transcribed

PLEASE DO NOT COPY OTHER CHEGG ANSWERS, AND PLEASE USE MATLAB.

Write a matlab function [x, counte r]= steffensen (f,x0,tol) to find the root of the function f with initial guess x0 and a estimated relative error less than tol. The function returns the estimated root x and the number of iterations counter needed to calculated it. The Steffensen's method is a modification of the Newton's method that does not require the evaluation of the derivative of the function. The iteration proceeds as follows: xi+1=xif(xi+f(xi))f(xi)f(xi)2. One way to look at it is that h=f(xi) is used as a step, and (f(xi+h)f(xi))/h is used as an estimate of the derivative. Limit the number of interations to 100 . Function Code to call your function ? 1f=a(x)(0.5xsin(x)) 2[x, counter ]=steffensen(f,pi,1e2)

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions