We want to find $\displaystyle x$ such that $\displaystyle x^{10}=2$, that is we want roots of $\displaystyle f(y)=y^{10}-2$.

Newtons method is the itteration:

$\displaystyle

x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}

$

So in this case it is:

$\displaystyle

x_{n+1}=x_n-\frac{x_n^{10}-2}{10x^9_n}

$

The Matlab code will look something like:

Code:

`function xn=tenthroot(n,x0)`

%

% n is the number we want the 10-th root of

% x0 is an initial guess

%

xn=x0;del=100

while del>1e-12

xo=xn;

xn=xo-(xo^10-n)/(10*xo^9);

del=abs(xn-xo);

end %while

This is untested code, so try it first in the debugger or whatever

RonL