Attached is the code. It is supposed to use the newton raphson method to find the root of a function. func is the function, dfunc is the derivative of the function, xr is the first "guess" (in this case it is .5), maxit is the maximum iterations to be performed.
The command I enter is: newtonraphson('@x -0.9*x^2 + 1.7*x +2.5', '@x -2*.9*x^2 + 1.7', 5, .01, 50)
but I cannot get back an answer that isn't erroneous.
Best Answer