Each equation has one root. Use Newton’s Method to approximate
the root to eight correct
decimal places. (a) x3 = 2x + 2 (b) ex + x = 7 (c) ex + sin x =
4
**MUST BE DONE IN MATLAB AND NEED CODE
a) root = 1.769292354238631
Matlab code:
format long;
x=5;
h = (x^3 -2*x - 2) /(3*(x^2) - 2);;
i = 1;
while(abs(h) >= 0.00000001)
h = (x^3 -2*x - 2) /(3*(x^2) - 2);
x = x - h;
i=i+1;
end
x
b) root = 1.672821698628906
Matlab code:
format long;
x=5;
h = (exp(x) + x - 7) /(exp(x) + 1 );
i = 1;
while(abs(h) >= 0.00000001)
h = (exp(x) + x - 7) /(exp(x) + 1 );
x = x - h;
i=i+1;
end
x
c) root = 1.129980498650833
Matlab code:
format long;
x=5;
h = (exp(x) + sin(x) - 4) /(exp(x) + cos(x) );
i = 1;
while(abs(h) >= 0.00000001)
h = (exp(x) + sin(x) - 4) /(exp(x) + cos(x));
x = x - h;
i=i+1;
end
x
Get Answers For Free
Most questions answered within 1 hours.