I don't know if this is going to seem like a dumb question, I am new to this and to matlab, but I'm trying to construct an iterative scheme in MATLAB to compute $\sqrt(b)$ for a given b>0, and program it to make tests to see if it works. The book is very vague and doesn't really say how to construct or program the scheme. But this is what I have so far:
I've set $x=1/\sqrt(b)$. Therefore $b=x^2$, $b-x^2=0$ and I set f(x)=$x^2-b$.
I use the formula $f(x_0)+(x_1-x_0)f'(x_0)=0$, $x_1=x_0-f(x_0)/f'(x_0)$
Plugging in the values I get $x_0-(x^2-b)/2x$=$(x(2x)-(x^2-b))/2x$=$(2x^2-x^2+b)/2x$.
I am stuck here as to where to go with my scheme or how to use this? Then once I have my scheme how do I program it?