Newton-Raphson Iterative Method
M.M. Yovanovich
NRMETHODCECART1.MWS
Newton-Raphson iterative method applied to the characteristic equation in cartesian coordinates.
Use Maple to illustrate how a hand calculation can be done.
> restart:
> nr:= x - f/f1;
Define the function and its derivative.
> f:= x*sin(x) - Bi*cos(x);
> f1:= diff(f,x);
Set the value of the independent parameter and set the initial guess for the first root of the characteristic equation. Here we find the first root of the characteristic equation for .
> Bi:= 2; x1:= 1.0;
Iterate to convergence.
> x2:= evalf(subs(x=x1, nr));
> x3:= evalf(subs(x=x2, nr));
> x4:= evalf(subs(x=x3, nr));
> x5:= evalf(subs(x=x4, nr));
> x6:= evalf(subs(x=x5, nr));
Convergence has occurred after 3 iterations. Check the function with the converged value.
> subs(x=x6, f); evalf(%);
A Maple procedure for calculating the roots of the characteristic equation.
> restart:
> nr:= x-> x - f(x)/df(x);
> f:= x-> x*sin(x) - Bi*cos(x);
> df:= x->diff(f(x),x);
Set the values of the independent parameter , the initial guess for the first root of the characteristic equation, and the number of iterations.
>
Bi:= 2; x1:= 1; n:= 1: N:= 10:
while n < N do x1:= evalf(subs(x = x1, nr(x)));
n:= n + 1;
print('x'[n] = x1); od:
Now we use Maple's capability to find roots.
> fsolve(x*sin(x)-2.*cos(x), x=0..Pi/2);
This is a convenient way to find one or many roots.