Chebyshev Method

A simple code for demonstration of the "Chebyshev Method" , to solve various polynomial and transcendental equations
31 Downloads
Updated 14 Jan 2022

View License

syms x;
f=input('Enter the function:'); %Enter the function
n=input('Enter the number of decimal places:');
x0 = input('Enter the intial approximation:');
f1 = diff(f); %derivative of function
f2 = diff(f,2); %double derivative of function
for i=1:100
A=subs(f,x,x0); %Calculates the value of f at x0
B=subs(f1,x,x0); %Calculates the value of f1 at x0
C=subs(f2,x,x0); %Calculates the value of f2 at x0
y=x0-(A/B)-(0.5*(A^2/B^2)*(C/B)); %chebyshev formula
y = round(y,n);
if y == x0 %checking the amount of error at each iteration
break
end
x0=y;
end
fprintf('The Root is : %f \n',y);
fprintf('No. of Iterations : %d\n',i);

Cite As

Praveen Prasad Handigol (2026). Chebyshev Method (https://www.mathworks.com/matlabcentral/fileexchange/105215-chebyshev-method), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0