Introduction To Numerical Analysis For Engineers: - Roots of Non-Linear Equations 2.1-2.4
Introduction To Numerical Analysis For Engineers: - Roots of Non-Linear Equations 2.1-2.4
Introduction To Numerical Analysis For Engineers: - Roots of Non-Linear Equations 2.1-2.4
Mathews
• Roots of Non-linear Equations 2.1-2.4
– Heron’s formula
– Stop criteria
– General method 2.1-2.3
• Convergence
• Examples
– Newton-Raphson’s Method 2.4
• Convergence Speed
• Examples
– Secant Method 2.4
• Convergence and efficiency
• Examples
– Multiple roots 2.4
– Bisection 2.2
hold off
plot([0 n],[sqrt(a) sqrt(a)],'b')
hold on
plot(sq,'r')
plot(a./sq,'r-.')
plot((sq-sqrt(a))/sqrt(a),'g')
grid on
Guess root
i value
1.0000 2.0000
2.0000 1.5000
Mean is better guess 3.0000 1.4167
4.0000 1.4143
5.0000 1.4143
( )/2 6.0000 1.4143
Iteration Formula
( )/2
13.002 Numerical Methods for Engineers Lecture 7
Roots of Nonlinear Equations
Stop-criteria
Unrealistic stop-criteria
Realistic stop-criteria
Machine
Use combination of the two criteria
Accuracy
f(x) f(x)
‘flat’ f(x) ‘steep’ f(x)
G x x
Iteration
Convergence
y
then
Convergence Criteria
Apply successively
x
Convergence
Mean-value Theorem
x1 x0 x
Convergence
y=x >
y y=g(x)
Divergent
x0 x1 x
Absolute error
Convergence Criteria
f(x)
Fast Convergence
Newton-Raphson Iteration
a=10;
n=10;
g=0.19; div.m
sq(1)=g;
for i=2:n
sq(i)=sq(i-1) - sq(i-1)*(a*sq(i-1) -1) ;
end
hold off
plot([0 n],[1/a 1/a],'b')
hold on
plot(sq,'r')
plot((sq-1/a)*a,'g')
grid on
legend('Exact','Iteration','Error');
title(['x = 1/' num2str(a)])
Approximate Guess
Newton-Raphson
Taylor Expansion
Relative Error
Quadratic Convergence
f(x)
Approximate Derivative
Absolute Error
Error Exponent
Relative Error
Newton-Raphson
=>
f(x)
Convergence
Algorithm
f(x)
n = n+1
yes
yes
no