Newtons Method

for f(x)= x^3-6*x^2+11*x-6.1

You are now following this Submission

for f(x)= x^3-6*x^2+11*x-6.1
a) Use Newton's Method
%bşıkkı - Newton's Method
x0=3;
error=x0.^3-6*x0.^2+11*x0-6.1;
while abs(error)>= 1e-6
%F fonksiyonuna tahmini değer üzerinden hesaplama yapıyoruz.
f=x0.^3-6*x0.^2+11*x0-6.1;
% F fonksiyonunun türevini alıyoruz.
df=3*x0.^2-12*x0+11;
x1=x0-f./df;
error=x1.^3-6*x1.^2+11*x1-6.1;
x0=x1;
end
fprintf('%f %f\n',x0,x1);

Cite As

Arthur Matlabus (2026). Newtons Method (https://uk.mathworks.com/matlabcentral/fileexchange/167361-newtons-method), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0