MATLAB: Find roots through iterative method

iterationrootstranscendent equation

I need to find 3 roots of an equation (e^x=3*x^2 – transcendent equation) through the iteration method in Matlab. What algorithm should I use?

Best Answer

You can use FZERO, e.g.,
>> f=@(x) exp(x)-3*x.^2
>> [xroot,res]=fzero(f,.1)
You will need to provide an initial guess of each of the three roots, which you can obtain by plotting the function f(x)=e^x-3*x^2