Docsity

Programación digital ii, Guías, Proyectos, Investigaciones de Programación Java

Vista previa parcial del texto

¡Descarga Programación digital ii y más Guías, Proyectos, Investigaciones en PDF de Programación Java solo en Docsity!

SOLUCION:

GRAFICA:

Pregunta 5 Hallarla única raíz real de la ecuación algebraica Sin responder aún 2 f00) =x+2x? + 10x-20=0 Puntúa como “80 Utilizando el método de la secante Y Marcar pregunta SOLUCION: Pregunra5.m Ed 1 SWALTER JHONATAN RIOJAS ACUÑA 2 close, clc, clear 3 fplot('x"3+2*x"*2+10*x-20', [-5,5]) 4 hold on 5 fplot('x-x',[-5,51) 6 hold off 7 xr (1)=1; 8 xr(2)=2; 9 emax=0.0001; 10 i=2; 11 e=10; 12 ¡termax=30; 13 f-C (x) x3+2*8"2+10*x-205 14pwhile e > emax 4£ i < itermax 15 xr (141)=x5 (1) -£ (x5 (1))* (35 (1-1) -x3 (1)) / (£ (a1 (1-13) -£ (21 (1)))5 16 ezabs ( (xr (141) -x21 (1)) /x2 (141))5 17 i=i+1; 18 + endwhile 19 xl=1:1:i; 20. y=[x1' xr']; 21. disp('iteracion / x=r') 22. disp('-== ) 23 disp(y) A disp) 25.) disp('la sucesion converge a:') 26 disp (AH A A +1) 27) fprintf (1, '$10.4An',y' (end)) | Ventana de comandos iteracion / xr 1.0000 1.0000 2.0000 2.0000 3.0000 1.3043 4.0000 1.3579 5.0000 1.3690 6.0000 1.3688 7.0000 1.3608 AAA AAA ARA AAA AAA AAA la sucesion converge a: AOS 1.3688 >> | GRAFICA: a Figure 1 File Edit Tools +29299 (40% 300 200 100 100 200 ñ ñ ñ (4.106, -77.242)