5
TRABAJO ENCARGADO ALUMNO: ARZAPALO GONZALES, Horeb Pedro CURSO: METODOS NUMERICOS ESPECIALIDAD: Ing. De Minas CODIGO: 2092578i CICLO: 2014 – II 22 DE OCTUBRE DEL 2014 UNIVERSIDAD NACIONAL DE INGENIERIA " UNI , Ciencia y Tecnología al servicio del País"

Trabajo de Metodos Numericos

Embed Size (px)

DESCRIPTION

trabajo de metodos numericos

Citation preview

Page 1: Trabajo de Metodos Numericos

TRABAJO ENCARGADO

ALUMNO: ARZAPALO GONZALES, Horeb Pedro

CURSO: METODOS NUMERICOS

ESPECIALIDAD: Ing. De Minas

CODIGO: 2092578i

CICLO: 2014 – II

22 DE OCTUBRE DEL 2014

UNIVERSIDAD NACIONAL DE INGENIERIA

"UNI, Ciencia y Tecnología al servicio del País"

Page 2: Trabajo de Metodos Numericos

METODO DE NEWTON RAPHSON

%metodo de newton raphsonclear, clccf=input('ingrese funcion a evaluar: ');syms xf = inline(cf);derivada = diff(cf, x);df= inline(derivada);tol= input('ingrese tolerancia: ');error=50;x=input('ingrese un valor inicial: ');n=0;disp(' n x1 error')while(error>tol) fprintf('\t%i\t%3.5f\t%f\n',n,x,error); n=n+1; x= x - f(x)/df(x); error= abs( f(x) );end

Page 3: Trabajo de Metodos Numericos

METODO DE LA SECANTE

clear all; clc; a=input('Ingrese limite inferior: ');b=input('Ingrese limite sup?rior: ');n=input('Ingrese numero de segmentos: '); h=(b-a)/n;n=n+1;y=zeros(n,1);x=zeros(n,1);suma=0; syms uAreaAna=int((1-u-4*(u^3)+3*(u^5)),a,b); for i=1:n x(i)=a+h*(i-1); y(i)=1-x(i)-4*x(i).^3+3*x(i).^5; %y(i)=funcion(x(i)); endfor i=2:n-1 suma=suma+y(i); Area=0.5*h*(y(1)+2*suma+y(n)); ep=(abs((AreaAna-Area)/AreaAna))*100; if AreaAna-Area<0.0001 fprintf('%8.4f %8.4f %8.4f\n',Area,ep,i) endend

Page 4: Trabajo de Metodos Numericos

METODO DEL PUNTO FIJO

clear all; clc; a=input('Ingrese limite inferior: ');b=input('Ingrese limite sup?rior: ');n=input('Ingrese numero de segmentos: '); h=(b-a)/n;n=n+1;y=zeros(n,1);x=zeros(n,1);suma=0; syms uAreaAna=int((1-u-4*(u^3)+3*(u^5)),a,b); for i=1:n x(i)=a+h*(i-1); y(i)=1-x(i)-4*x(i).^3+3*x(i).^5; %y(i)=funcion(x(i)); endfor i=2:n-1 suma=suma+y(i); Area=0.5*h*(y(1)+2*suma+y(n)); ep=(abs((AreaAna-Area)/AreaAna))*100; if AreaAna-Area<0.0001 fprintf('%8.4f %8.4f %8.4f\n',Area,ep,i) endend