Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

function x = NRCubeRoot(R, x0, nmax, delta, eps) % Applies Newton's Method to find cube root of R. % % Input: % R = number

function x = NRCubeRoot(R, x0, nmax, delta, eps)
% Applies Newton's Method to find cube root of R.
%
% Input:
% R = number whose cube root we want.
% x0 = initial iterate.
% nmax = maximum number of iterates to use.
% delta = tolerance for small derivatives (break if df(x) is too small).
% eps = stopping tolerance. Stop when relative magnitude of f is small
% enough.
% Output:
% x = approximate cube root of f.
%% Initialization.
% Initalize x. Stores sequence of iterates.
x = zeros(nmax + 1,1);
x(1) = x0;
%% Run Newton's Method.
for n = 2 : nmax + 1
% Check if df is small.
df = ?; % CHANGE THIS. % df is derivative evaluated at last iterate x(n-1).
if (% INSERT STOPPING CONDITION)
x = x(n-1); % extract root from sequence of approximate solutions.
break % leave the loop.
end
% Compute step length to check for convegence.
d = ?; % CHANGE THIS.
% Stop if absolute step length is sufficiently small.
if (% INSERT STOPPING CONDITION.)
x = x(n-1); % extract root from sequence of approximate solutions.
break % leave the loop.
end
% Update x using the formula from Part(a).
x(n) = ?; % INSERT UPDATE FORMULA.
end
image text in transcribed
image text in transcribed
We can use Newton's Method to evaluate the cube root of a positive number as follows. The number a is the cube root of the positive number R if and only if That is, the cube root(s) of R are the roots of the polynomial equation we can use the Newton- Raphson Method to mumerically approximate the This implies that of any positive number by finding the roots of (6.1.1)

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 Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Who is responsible for this project?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago