Question

In: Computer Science

In Sciland code, use the Newton Method to find the root of f(x)=10-x^2 and tol =10^-5

In Sciland code, use the Newton Method to find the root of f(x)=10-x^2 and tol =10^-5

Solutions

Expert Solution

NOTE : AS PER THE QUESTION, Sciland CODE IS MENTIONED. HOPEFULLY IT SEEMS TO BE Scilab CODE.

HERE THE PROBLEM IS SOLVED WITH Scilab PROGRAMMING CODE.

HOPE IT WILL HELP YOU.

PROGRAM

// define newton_method to calculate root
function r= newton_method(x);
h=func(x)/derivative(x);
// as per question tolerance value is 10^-5
tol=10^-5;
while(abs(h)>=10^-5)
h=func(x)/derivative(x);
x=x-h;
end
r=x;
disp("Root is :");
disp(r);

  
endfunction

// define function func with actual function
function f = func(m);
// return value
f= 10-m^2;
endfunction

// define function derivative,which stores derivative of actual function
function d = derivative(n);
// return value
d= -2*n;
endfunction

newton_method(3); //here initial value of x as x0=3 is taken

SCREEN SHOT

OUTPUT


Related Solutions

MatLab code for Bisection and Newton Method to find root for f(k) = p(k)^3+2*(p(k)^2)-10 on interval...
MatLab code for Bisection and Newton Method to find root for f(k) = p(k)^3+2*(p(k)^2)-10 on interval [-1,2]. P(o)=1.5, P(1)=2. Answer= 1.654249
Use the secant Method to find a root for the function: f(x) = x^3 + 2x^2...
Use the secant Method to find a root for the function: f(x) = x^3 + 2x^2 + 10x -20, with x_0 = 2, and x_1 = 1.
Use the Fixed-Point Iteration Method to find the root of f ( x ) = x...
Use the Fixed-Point Iteration Method to find the root of f ( x ) = x e^x/2 + 1.2 x - 5 in the interval [1,2].
Using Newton-Raphson method, find the complex root of the function f(z) = z 2 + z...
Using Newton-Raphson method, find the complex root of the function f(z) = z 2 + z + 1 with with an accuracy of 10–6. Let z0 = 1 − i. write program c++ or matlab
Determine the root of f (x) = 10.5X² - 1.5X - 5 by using Newton Raphson...
Determine the root of f (x) = 10.5X² - 1.5X - 5 by using Newton Raphson method with x0 = 0 and perform the iterations until ɛa < 1.00%. Compute ɛt for each approximation if given the true root is x = 0.7652.
f(x)= x^3-5sinx-23 use Newton iteration to estimate the root Find A, R, Theoritically and Numerically
f(x)= x^3-5sinx-23 use Newton iteration to estimate the root Find A, R, Theoritically and Numerically
Use the False Position method to find a guess of the root of f(x) = cos(x2...
Use the False Position method to find a guess of the root of f(x) = cos(x2 ) with lower and upper bounds of 0 and 2, respectively. Then, narrow the interval and find a new guess of the root using False Position. What is your relative approximate error? a. 8.47% answer b. 12.45% c. 0.112 d. 0.243 e. None of the above Please provide complete solution how the answer is a thumbs up for correct and neat solution! step by...
Find a root of an equation f(x)=5x3-3x2+8 initial solution x0=-0.81, using Newton Raphson method
Find a root of an equation f(x)=5x3-3x2+8 initial solution x0=-0.81, using Newton Raphson method
GIVEN: COS(x) +3xe^-x=0 USING NEWTON RAPHSON METHOD Find: 1.) The POSITIVE ROOT USING X0=2 2.) THE...
GIVEN: COS(x) +3xe^-x=0 USING NEWTON RAPHSON METHOD Find: 1.) The POSITIVE ROOT USING X0=2 2.) THE NEGATIVE ROOT USING X0=-0.5 *STOPPING CRITERION ≤ 0.01% use radian mode in calcu and i dont want a program answers pls i need the manual method.
Use the Newton’s method to find the root for ex+1 = 2 + x, over [−2,...
Use the Newton’s method to find the root for ex+1 = 2 + x, over [−2, 2]. Can you find a way to numerically determine whether the convergence is roughly quadratic using error produced at each iteration? Include your answers as Matlab code comments
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT