Documente Academic
Documente Profesional
Documente Cultură
Rezolvarea ecuatiilor
neliniare
6 octombrie 2015
Utilizatori de nivel II
Metode de determinare a
radacinilor ecuatiilor
2.1 Metoda Bisectiei
2.2 Metoda Regulei Falsi si Metoda Secantei
2.3 Metoda Newton
2.4 Metoda Muller
2.5 Metoda Punctului Fix
2.6 Metode implementate in MATLAB
Radacinile Ecuatiilor
Exemplu
1
2/3 1/2
Q AR S
n
Ecuatia Manning
Raza hidraulica se defineste astfel
A
R
P
unde A este aria transversala
P este perimetrul udat
1 A
Q A
n P
2/3
1/2
h
b
1 bh
1/2
Q
S
2/3
n b 2h
5/3
1 bh
1/2
Q
S
2/3
n b 2h
5/3
Metoda Grafica
Examplu:
1 bh
1/2
Q
S
2/3
n b 2h
5/3
1 bh
1/2
f(h) Q
S
0
2/3
n b 2h
5/3
Script MATLAB :
Reprezentarea grafica a ecuatiei Manning
% Manning's equation for open channel flow
% channel water depth = h
b = input('channel width b(m) = ')
Q = input('volume flow rate Q(m^3/s) = ')
S = input('energy gradient S =')
n = input('Manning coefficient n = ')
h=0:0.5:10;
y = Q -1/n*(b*h).^(5/3)./(b+2*h).^(2/3)*sqrt(S);
format short g; [h' y']
H=plot(h,y,'ro-'); grid on;
set(H,'LineWidth',2.0); set(H,'MarkerSize',7.0);
xlabel('Water Depth h'); ylabel('f(h)');
Title('Manning Equation for Open Channel Flow');
h
f(h)
0
1000
0.5
981.21
1
941.58
1.5
887.51
2
821.89
2.5
746.59
3
663.00
3.5
572.17
4
474.94
4.5
372.03
5
264.01
5.5
151.39
6
34.586
6.5
-86.02
7
-210.10
7.5
-337.38
8
-467.59
8.5
-600.52
9
-735.95
9.5
-873.71
10 -1013.60
Evaluarea Functiei
b = 30m, Q =1000m3/s, S = 0.002, n = 0.022
Metoda Grafica
Metoda
In
Metoda Bisectiei
f(x)
Metoda Bisectiei
xl xu a b
2
2
a
f(a)
m
f(m)
x1 x*
x3
x2
Examplu de calcul
Exemplu : fie f ( x ) x 2 2 x 3 0
Metoda
Bisectiei estimarea initiala este a,b 2.0, 3.2
iter
1
2
3
4
5
6
a
2.0
2.6
2.9
2.9
2.975
2.975
b
3.2
3.2
3.2
3.05
3.05
3.0125
xi
f ( xi )
x i
2.6
1.44
1.2
2.9
0.39
0.6
3.05
0.2025
0.3
2.975
0.0994
0.15
3.0125
0.0502
0.075
2.99375 0.02496 0.0375
incheiere: se
termina cu bucla
for sau while
yb
ya
a
y
x
1 bh
1/2
f(h) Q
S 0
2/3
n b 2h
5/3
f(x)e
x 0
2
f ( x ) x 3x 1 0
3
Metode de determinare a
radacinilor ecuatiilor
2.1 Metoda Bisectiei
2.2 Metoda Regulei Falsi si Metoda Secantei
2.3 Metoda Newton
2.4 Metoda Muller
2.5 Metoda Punctului Fix
2.6 Metode implementate in MATLAB
y(x)
linie secanta
a xi
b
x*
y(a)
Aproximare liniara a curbei graficului functiei
y (b) y ( a ) y (b) y ( xi )
panta
ba
b xi
y b
xi b b a
y (b) y (a)
y b
xi b b a
y (b) y (a )
Exemplu de Calcul
Exemplu : f ( x ) x 2 2 x 3 0
Metoda
Pozitiei false
iter
1
2
3
4
2.0
2.9375
2.99698
2.999856
xi
a,b 2.0,
f ( xi )
3.2
2.9375
0.2461
3.2
2.9968
0.01207
3.2 2.999856
0.000576
3.2 2.99999315 0.0000274
3.2
1 bh
1/2
f(h) Q
S 0
2/3
n b 2h
5/3
f(x)e
2 x
x 0
2
f ( x ) x3 3 x 1 0
Erori relative
pentru
f(x) = x3-3x+1
Viteza de convergenta
f(x)= x3-3x+1
Metoda
Bisectiei
Metoda
pozitiei
false
Viteza de Convergenta
Convergenta
xk x *
x k 1 x *
pentru un 0
p = 1 convergenta liniara
Metoda Bisectiei : p = 1
p = 2 convergenta patratica
Metoda Pozitiei False : p = 1.4 - 1.6
Viteza de Convergenta
De ce nu utilizam mereu Metoda pozitiei false ?
Pentru ca sunt cazuri in care poate converge foarte lent.
Exemple:
f ( x ) x 3x 4 0
f ( x ) x 3x 4 0
a ,b 0 ,3
4
Convergenta mai
lenta decat metoda
bisectiei
1 23
root
Punct median
Metoda Bisectiei
[x,y]=bisect('my_func1',0,3,0.00001,100)
Bisection method has converged
step
a
b
x
y
1.0000
0 3.0000 1.5000 5.5625
2.0000
0 1.5000 0.7500 -1.4336
3.0000 0.7500 1.5000 1.1250 0.9768
4.0000 0.7500 1.1250 0.9375 -0.4150
5.0000 0.9375 1.1250 1.0312 0.2247
6.0000 0.9375 1.0312 0.9844 -0.1079
7.0000 0.9844 1.0312 1.0078 0.0551
8.0000 0.9844 1.0078 0.9961 -0.0273
9.0000 0.9961 1.0078 1.0020 0.0137
10.0000 0.9961 1.0020 0.9990 -0.0068
11.0000 0.9990 1.0020 1.0005 0.0034
12.0000 0.9990 1.0005 0.9998 -0.0017
13.0000 0.9998 1.0005 1.0001 0.0009
14.0000 0.9998 1.0001 0.9999 -0.0004
15.0000 0.9999 1.0001 1.0000 0.0002
16.0000 0.9999 1.0000 1.0000 -0.0001
17.0000 1.0000 1.0000 1.0000 0.0001
18.0000 1.0000 1.0000 1.0000 0.0000
19.0000 1.0000 1.0000 1.0000 0.0000
f ( x ) x4 3 x 4 0
Sa incercam un exemplu
Sa
x 3x 2 0
2
Se