Sie sind auf Seite 1von 17

...

Roots of Nonlinear Equations Roots of Nonlinear Equations


Newton-Raphson Method Newton-Raphson Method
Non-linear Equation a=26;
n=lO; sqr.m
f(x) =O {o} x = g(x) Example - Square Root
g=l;
sq(l)-g;
fo.r i=2::n
Convergence Gritería sq(i)= O.S*(sq(i-1) + a/sq(i-1));

lg'(x11)I < k < 1 ~ lx,. - xel ~ klx11-1 - z"] f(x) x =Va{:} f(x) = x 2 - a= O
end
hold off
b1)
plot( [O n], (sqrt (a) sqrt (a)) 1
1

Fast Convergence Newton-Raphson


a)
hold on
y= f(x) plot(sq, r
=o
1 1)

!g'(x")I x~ - a 1 ( Xn '1-. ')


+-
plot(a./sq,
Xn+l = Xn - -2-- = -2 plot ( ( s q-eqr-t (a)) / sqrt (a), 'g, )
Xn Xn q r í.d on

g(x) = x + h(x)f(x), h!(:i:) #O


1 Same as Heron's formula 1
X

g'(xe) 1 + h(xe)f'(xe) + h'(x')f(:i:")

.s.:
%11~ \

1 + h(x')f'(x") f'(x,.) '

g'(x") =O{= h(x) = - f'~x)


Newton-Raphson lteratíon '¡
1

f(xn)
Xn+I = g(xn) = Xn - f'(x,J
13.002 Numerical Methods for Engineers Lecture 7 13.002 Numerical Methods for Engineers Lecture 7

Das könnte Ihnen auch gefallen