_{1}onto x

_{2}? For example if I wanted to approximate x

^{2}-5 with 6 iterations at the initial value of 100, how would I be able to take the value from x

_{5}onto x

_{6}?

Here's what I have right now. I know it is absolutely wrong.

function y = mynewton(f,a,n)

syms x

x(0)=a;

df=diff(f(x),n);

for i=1:n

x=x(i-1)-f(x(i-1))/diff(f(x),i-1)

end

y=x