Question #229339

Evaluate f(N)=3âˆšN, N=72, to five decimal places by Newton-Raphson iterative method.

Expert's answer

Newton-Raphson method is given as:

"X_{n+1} = X_n -" "\\frac{f(X_n)}{f(X_n)'}"

Therefore,

"f(x) = x^3 - 72" will give "x = 72^{\\frac{1}{3}}"

Hence,

"X_{n+1} = X_n -" "\\frac{ X_n^3 - 72}{3X_n^2}"

The above equation has been implemented in MATLAB and the code is given below. The output is show in the attached figure,

```
close all,
clear all,
clc,
e = 0.00001;
Xn = 0.5;
error = Xn;
r=0;
N=72;
fprintf('\n\tInitial Guess = X0 = %.5f',Xn);
fprintf('\n\tAccuracy = %.5f',e);
while(error>e)
Â Â Xn_1 = Xn - (((Xn*Xn*Xn) - N)/(3*Xn*Xn));
Â Â error = abs(Xn - Xn_1);
Â Â fprintf('\n\tX%d = %.5f\tX%d = %.5f\tError = %.5f',r,Xn,r+1,Xn_1,error);
Â Â Xn = Xn_1;
Â Â r=r+1;
end
fprintf('\n\n\tFinal Value (%d)^(1/3) = %.5f\n\n',N,Xn);
```

Learn more about our help with Assignments: Electrical Engineering

## Comments

## Leave a comment