Weitere ähnliche Inhalte Ähnlich wie Problema 6.2 método newton raphson (20) Kürzlich hochgeladen (20) Problema 6.2 método newton raphson 1. 1
INSTITUTO TECNOLÓGICO DE MATEHUALA
Equipo # 1
09660007 Carrizalez Cisneros Hugo René
09660022 Licea Morales José Alberto
09660026 Martínez Silva José Isaac
09660035 Orozco López Iván Guadalupe
09660058 Vázquez Torres Jonathan Cruz
MÉTODOS NUMÉRICOS
Título del Trabajo
Carrera: Ingeniería Civil
Semestre: Quinto
Docente: Ing. Martín Luis Ledezma Hernández
Periodo: Agosto-Diciembre 2011
Matehuala, S.L.P. 30 de Octubre 2011
2. 2
Resuelva el poblema propuesto, genere y publique un documento en pdf con la solución del problema y la
siguiente estructura:
Portada
-Enunciado
-Grafica de solución
-Código Matlab método de punto fijo
-Resultados punto fijo
-Código Matlab método de Newton-Raphson
-Resultados Newton-Raphson
3. 3
GRAFICA RAIZ NEGATIVA:
x=-2:0.001:3; y=-0.9*x.^2+1.7*x+2.5; plot(x,y), grid, title('y=-0.9*x.^2+1.7*x+2.5');
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3
-5
-4
-3
-2
-1
0
1
2
3
4
X: -0.975
Y: -0.01306
y=-0.9*x.2
+1.7*x+2.5
PUNTO FIJO:
clc;
et=0; ea=100;
es=0.01;
vv=-0.975;
x=-1;
i=0;
disp (' i x et ea')
while es < ea,
et=((vv-x)/vv)*100;
if i~=0; ea=abs((x-xa)/x)*100; end
xa=x;
fprintf('%2.0f %9.8f %5.4f %4.5fn ' , i,x,et,ea);
x=-(sqrt((1.7*x+2.5)/0.9));
i=i+1;
end
RESULTADOS:
i x et ea
0 -1.00000000 -2.5641 100.00000
1 -0.94280904 3.3016 6.06602
2 -0.99845694 -2.4058 5.57339
3 -0.94435352 3.1432 5.72915
4 -0.99699494 -2.2559 5.28001
5 -0.94581452 2.9934 5.41125
6 -0.99560998 -2.1138 5.00150
7 -0.94719647 2.8516 5.11124
8 -0.99429819 -1.9793 4.73718
9 -0.94850354 2.7176 4.82810
10 -0.99305588 -1.8519 4.48639
11 -0.94973973 2.5908 4.56084
12 -0.99187950 -1.7312 4.24848
13 -0.95090883 2.4709 4.30858
14 -0.99076569 -1.6170 4.02283
15 -0.95201443 2.3575 4.07045
16 -0.98971122 -1.5088 3.80887
17 -0.95305994 2.2503 3.84564
18 -0.98871302 -1.4065 3.60601
19 -0.95404860 2.1489 3.63340
20 -0.98776818 -1.3096 3.41371
4. 4
21 -0.95498348 2.0530 3.43301
22 -0.98687390 -1.2178 3.23146
23 -0.95586747 1.9623 3.24380
24 -0.98602755 -1.1310 3.05875
25 -0.95670335 1.8766 3.06513
26 -0.98522660 -1.0489 2.89510
27 -0.95749371 1.7955 2.89640
28 -0.98446867 -0.9711 2.74005
29 -0.95824102 1.7189 2.73706
30 -0.98375147 -0.8976 2.59318
31 -0.95894763 1.6464 2.58657
32 -0.98307287 -0.8280 2.45406
33 -0.95961574 1.5779 2.44443
34 -0.98243080 -0.7621 2.32231
35 -0.96024745 1.5131 2.31017
36 -0.98182333 -0.6998 2.19753
37 -0.96084474 1.4518 2.18335
38 -0.98124861 -0.6409 2.07938
39 -0.96140948 1.3939 2.06355
40 -0.98070490 -0.5851 1.96751
41 -0.96194344 1.3391 1.95037
42 -0.98019054 -0.5324 1.86159
43 -0.96244831 1.2874 1.84345
44 -0.97970396 -0.4825 1.76131
45 -0.96292567 1.2384 1.74243
46 -0.97924367 -0.4352 1.66639
47 -0.96337702 1.1921 1.64698
48 -0.97880827 -0.3906 1.57653
49 -0.96380377 1.1483 1.55680
50 -0.97839641 -0.3483 1.49149
51 -0.96420727 1.1069 1.47159
52 -0.97800684 -0.3084 1.41099
53 -0.96458879 1.0678 1.39106
54 -0.97763834 -0.2706 1.33480
55 -0.96494952 1.0308 1.31497
56 -0.97728980 -0.2349 1.26270
57 -0.96529059 0.9958 1.24307
58 -0.97696013 -0.2010 1.19447
59 -0.96561309 0.9628 1.17511
60 -0.97664832 -0.1691 1.12991
61 -0.96591802 0.9315 1.11089
62 -0.97635340 -0.1388 1.06881
63 -0.96620634 0.9019 1.05020
64 -0.97607447 -0.1102 1.01100
65 -0.96647895 0.8740 0.99283
66 -0.97581065 -0.0831 0.95630
67 -0.96673672 0.8475 0.93861
68 -0.97556114 -0.0576 0.90455
69 -0.96698045 0.8225 0.88737
70 -0.97532515 -0.0333 0.85558
71 -0.96721090 0.7989 0.83893
72 -0.97510197 -0.0105 0.80926
73 -0.96742881 0.7765 0.79315
74 -0.97489089 0.0112 0.76543
75 -0.96763485 0.7554 0.74987
76 -0.97469126 0.0317 0.72396
77 -0.96782968 0.7354 0.70897
78 -0.97450247 0.0510 0.68474
79 -0.96801389 0.7165 0.67030
80 -0.97432391 0.0693 0.64763
81 -0.96818808 0.6987 0.63374
82 -0.97415505 0.0867 0.61253
83 -0.96835279 0.6818 0.59919
84 -0.97399536 0.1030 0.57932
85 -0.96850853 0.6658 0.56652
86 -0.97384433 0.1185 0.54791
87 -0.96865579 0.6507 0.53564
88 -0.97370150 0.1332 0.51820
89 -0.96879504 0.6364 0.50645
90 -0.97356643 0.1470 0.49009
91 -0.96892671 0.6229 0.47885
92 -0.97343869 0.1601 0.46351
93 -0.96905121 0.6101 0.45276
94 -0.97331789 0.1725 0.43836
95 -0.96916894 0.5981 0.42809
96 -0.97320364 0.1842 0.41458
97 -0.96928026 0.5866 0.40477
98 -0.97309561 0.1953 0.39208
99 -0.96938553 0.5758 0.38273
100 -0.97299344 0.2058 0.37081
101 -0.96948506 0.5656 0.36188
102 -0.97289682 0.2157 0.35068
103 -0.96957918 0.5560 0.34217
104 -0.97280545 0.2251 0.33165
105 -0.96966818 0.5469 0.32354
106 -0.97271904 0.2339 0.31364
107 -0.96975234 0.5382 0.30592
108 -0.97263732 0.2423 0.29661
109 -0.96983192 0.5301 0.28927
110 -0.97256005 0.2503 0.28051
111 -0.96990717 0.5223 0.27352
112 -0.97248697 0.2577 0.26528
113 -0.96997832 0.5150 0.25863
114 -0.97241787 0.2648 0.25087
115 -0.97004561 0.5081 0.24455
116 -0.97235251 0.2715 0.23725
117 -0.97010923 0.5016 0.23124
118 -0.97229071 0.2779 0.22437
119 -0.97016939 0.4954 0.21865
120 -0.97223227 0.2839 0.21218
121 -0.97022628 0.4896 0.20675
122 -0.97217701 0.2895 0.20066
5. 5
72 -0.97510197 -0.0105 0.80926
73 -0.96742881 0.7765 0.79315
74 -0.97489089 0.0112 0.76543
75 -0.96763485 0.7554 0.74987
76 -0.97469126 0.0317 0.72396
77 -0.96782968 0.7354 0.70897
78 -0.97450247 0.0510 0.68474
79 -0.96801389 0.7165 0.67030
80 -0.97432391 0.0693 0.64763
81 -0.96818808 0.6987 0.63374
82 -0.97415505 0.0867 0.61253
83 -0.96835279 0.6818 0.59919
84 -0.97399536 0.1030 0.57932
85 -0.96850853 0.6658 0.56652
86 -0.97384433 0.1185 0.54791
87 -0.96865579 0.6507 0.53564
88 -0.97370150 0.1332 0.51820
89 -0.96879504 0.6364 0.50645
90 -0.97356643 0.1470 0.49009
91 -0.96892671 0.6229 0.47885
92 -0.97343869 0.1601 0.46351
93 -0.96905121 0.6101 0.45276
94 -0.97331789 0.1725 0.43836
95 -0.96916894 0.5981 0.42809
96 -0.97320364 0.1842 0.41458
97 -0.96928026 0.5866 0.40477
98 -0.97309561 0.1953 0.39208
99 -0.96938553 0.5758 0.38273
100 -0.97299344 0.2058 0.37081
101 -0.96948506 0.5656 0.36188
102 -0.97289682 0.2157 0.35068
103 -0.96957918 0.5560 0.34217
104 -0.97280545 0.2251 0.33165
105 -0.96966818 0.5469 0.32354
106 -0.97271904 0.2339 0.31364
107 -0.96975234 0.5382 0.30592
108 -0.97263732 0.2423 0.29661
109 -0.96983192 0.5301 0.28927
110 -0.97256005 0.2503 0.28051
111 -0.96990717 0.5223 0.27352
112 -0.97248697 0.2577 0.26528
113 -0.96997832 0.5150 0.25863
114 -0.97241787 0.2648 0.25087
115 -0.97004561 0.5081 0.24455
116 -0.97235251 0.2715 0.23725
117 -0.97010923 0.5016 0.23124
118 -0.97229071 0.2779 0.22437
119 -0.97016939 0.4954 0.21865
120 -0.97223227 0.2839 0.21218
121 -0.97022628 0.4896 0.20675
122 -0.97217701 0.2895 0.20066
123 -0.97028008 0.4841 0.19550
124 -0.97212474 0.2949 0.18976
125 -0.97033095 0.4789 0.18486
126 -0.97207532 0.3000 0.17945
127 -0.97037905 0.4739 0.17480
128 -0.97202858 0.3048 0.16970
129 -0.97042454 0.4693 0.16529
130 -0.97198439 0.3093 0.16048
131 -0.97046755 0.4649 0.15630
132 -0.97194259 0.3136 0.15176
133 -0.97050823 0.4607 0.14780
134 -0.97190307 0.3176 0.14352
135 -0.97054669 0.4568 0.13975
136 -0.97186569 0.3215 0.13572
137 -0.97058306 0.4530 0.13215
138 -0.97183035 0.3251 0.12834
139 -0.97061745 0.4495 0.12496
140 -0.97179693 0.3285 0.12137
141 -0.97064997 0.4462 0.11816
142 -0.97176532 0.3318 0.11478
143 -0.97068072 0.4430 0.11174
144 -0.97173543 0.3348 0.10854
145 -0.97070980 0.4400 0.10566
146 -0.97170717 0.3377 0.10264
147 -0.97073730 0.4372 0.09991
148 -0.97168044 0.3405 0.09706
149 -0.97076330 0.4345 0.09448
150 -0.97165517 0.3431 0.09179
151 -0.97078789 0.4320 0.08934
152 -0.97163126 0.3455 0.08680
153 -0.97081114 0.4296 0.08448
154 -0.97160866 0.3478 0.08208
155 -0.97083313 0.4274 0.07988
156 -0.97158729 0.3500 0.07762
157 -0.97085392 0.4252 0.07554
158 -0.97156708 0.3521 0.07340
159 -0.97087358 0.4232 0.07143
160 -0.97154797 0.3541 0.06941
161 -0.97089218 0.4213 0.06755
162 -0.97152989 0.3559 0.06564
163 -0.97090976 0.4195 0.06387
164 -0.97151280 0.3577 0.06207
165 -0.97092638 0.4178 0.06040
166 -0.97149664 0.3593 0.05870
167 -0.97094210 0.4162 0.05711
168 -0.97148136 0.3609 0.05551
169 -0.97095697 0.4147 0.05401
170 -0.97146690 0.3624 0.05249
171 -0.97097103 0.4132 0.05107
172 -0.97145324 0.3638 0.04964
173 -0.97098432 0.4119 0.04829
6. 6
174 -0.97144031 0.3651 0.04694
175 -0.97099689 0.4106 0.04567
176 -0.97142809 0.3663 0.04439
177 -0.97100878 0.4094 0.04318
178 -0.97141653 0.3675 0.04198
179 -0.97102002 0.4082 0.04083
180 -0.97140561 0.3687 0.03969
181 -0.97103065 0.4071 0.03861
182 -0.97139527 0.3697 0.03754
183 -0.97104070 0.4061 0.03651
184 -0.97138550 0.3707 0.03550
185 -0.97105021 0.4051 0.03453
186 -0.97137626 0.3717 0.03357
187 -0.97105919 0.4042 0.03265
188 -0.97136752 0.3726 0.03174
189 -0.97106769 0.4033 0.03088
190 -0.97135925 0.3734 0.03002
191 -0.97107573 0.4025 0.02920
192 -0.97135144 0.3742 0.02838
193 -0.97108333 0.4017 0.02761
194 -0.97134405 0.3750 0.02684
195 -0.97109052 0.4010 0.02611
196 -0.97133706 0.3757 0.02538
197 -0.97109731 0.4003 0.02469
198 -0.97133045 0.3764 0.02400
199 -0.97110374 0.3996 0.02335
200 -0.97132420 0.3770 0.02270
201 -0.97110982 0.3990 0.02208
202 -0.97131830 0.3776 0.02146
203 -0.97111557 0.3984 0.02088
204 -0.97131271 0.3782 0.02030
205 -0.97112100 0.3978 0.01974
206 -0.97130742 0.3787 0.01919
207 -0.97112614 0.3973 0.01867
208 -0.97130243 0.3792 0.01815
209 -0.97113100 0.3968 0.01765
210 -0.97129770 0.3797 0.01716
211 -0.97113559 0.3963 0.01669
212 -0.97129323 0.3802 0.01623
213 -0.97113994 0.3959 0.01579
214 -0.97128901 0.3806 0.01535
215 -0.97114405 0.3955 0.01493
216 -0.97128501 0.3810 0.01451
217 -0.97114793 0.3951 0.01412
218 -0.97128123 0.3814 0.01372
219 -0.97115161 0.3947 0.01335
220 -0.97127766 0.3818 0.01298
221 -0.97115508 0.3944 0.01262
222 -0.97127428 0.3821 0.01227
223 -0.97115837 0.3940 0.01194
224 -0.97127109 0.3825 0.01161
225 -0.97116148 0.3937 0.01129
226 -0.97126807 0.3828 0.01097
227 -0.97116441 0.3934 0.01067
228 -0.97126521 0.3831 0.01038
229 -0.97116719 0.3931 0.01009
230 -0.97126251 0.3833 0.00981
7. 7
GRAFICA RAIZ POSITIVA:
x=-2:0.001:3; y=-0.9*x.^2+1.7*x+2.5; plot(x,y), grid, title('y=-0.9*x.^2+1.7*x+2.5');
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3
-5
-4
-3
-2
-1
0
1
2
3
4
X: 2.862
Y: -0.00654
y=-0.9*x.2
+1.7*x+2.5
PUNTO FIJO:
clc;
et=0; ea=100;
es=0.01;
vv=2.862;
x=5.0;
i=0;
disp (' i x et ea')
while es < ea,
et=abs(((vv-x)/vv)*100);
if i~=0; ea=abs((x-xa)/x)*100; end
xa=x;
fprintf('%2.0f %9.8f %5.4f %4.5fn' , i,x,et,ea);
x=sqrt((1.7*x+2.5)/0.9);
i=i+1;
end
RESULTADOS:
i x et ea
0 5.00000000 74.7030 100.00000
1 3.49602949 22.1534 43.01939
2 3.06290533 7.0198 14.14096
3 2.92630580 2.2469 4.66799
4 2.88188207 0.6947 1.54148
5 2.86728666 0.1847 0.50903
6 2.86247510 0.0166 0.16809
7 2.86088713 0.0389 0.05551
8. 8
8 2.86036286 0.0572 0.01833
9 2.86018975 0.0633 0.00605
METODO NEWTON-RAPHSON
RAIZ NEGATIVA:
clc;
et=0; ea=100;
es=0.01;
vv=-0.975;
x=-1;
i=0;
disp ('i x et ea')
while es < ea,
et=((vv-x)/vv)*100;
if i~=0; ea=abs((x-xa)/x)*100; end
xa=x;
fprintf('%2.0f %9.7f %5.4f %5.4fn' , i,x,et,ea);
x=xa-((-0.9*x.^2+1.7*x+2.5)/(-1.8*x+17));
i=i+1;
end
i x et ea
0 -1.0000000 -2.5641 100.0000
1 -0.9946809 -2.0185 0.5348
2 -0.9903484 -1.5742 0.4375
3 -0.9868184 -1.2121 0.3577
4 -0.9839413 -0.9171 0.2924
5 -0.9815959 -0.6765 0.2389
6 -0.9796834 -0.4804 0.1952
7 -0.9781238 -0.3204 0.1594
8 -0.9768518 -0.1899 0.1302
9 -0.9758142 -0.0835 0.1063
10 -0.9749678 0.0033 0.0868
11 -0.9742772 0.0741 0.0709
12 -0.9737138 0.1319 0.0579
13 -0.9732541 0.1791 0.0472
14 -0.9728791 0.2175 0.0386
15 -0.9725730 0.2489 0.0315
16 -0.9723233 0.2745 0.0257
17 -0.9721195 0.2954 0.0210
18 -0.9719532 0.3125 0.0171
19 -0.9718175 0.3264 0.0140
20 -0.9717068 0.3378 0.0114
21 -0.9716164 0.3470 0.0093
9. 9
METODO NEWTON-RAPHSON
RAIZ POSITIVA:
clc;
et=0; ea=100;
es=0.01;
vv=2.862;
x=-1;
i=0;
disp ('i x et ea')
while es < ea,
et=((vv-x)/vv)*100;
if i~=0; ea=abs((x-xa)/x)*100; end
xa=x;
fprintf('%2.0f %9.7f %5.4f %5.4fn' , i,x,et,ea);
x=xa-((-0.9*x.^2+1.7*x+2.5)/(-1.8*x+17));
i=i+1;
end
i x et ea
0 -1.0000000 134.9406 100.0000
1 -0.9946809 134.7547 0.5348
2 -0.9903484 134.6034 0.4375
3 -0.9868184 134.4800 0.3577
4 -0.9839413 134.3795 0.2924
5 -0.9815959 134.2975 0.2389
6 -0.9796834 134.2307 0.1952
7 -0.9781238 134.1762 0.1594
8 -0.9768518 134.1318 0.1302
9 -0.9758142 134.0955 0.1063
10 -0.9749678 134.0660 0.0868
11 -0.9742772 134.0418 0.0709
12 -0.9737138 134.0221 0.0579
13 -0.9732541 134.0061 0.0472
14 -0.9728791 133.9930 0.0386
15 -0.9725730 133.9823 0.0315
16 -0.9723233 133.9736 0.0257
17 -0.9721195 133.9664 0.0210
18 -0.9719532 133.9606 0.0171
19 -0.9718175 133.9559 0.0140
20 -0.9717068 133.9520 0.0114
21 -0.9716164 133.9489 0.0093