Upload
kevin-brain-ramirez
View
8
Download
6
Embed Size (px)
DESCRIPTION
Trabajo de Metodos Numericos
Citation preview
UNIVERSIDAD NACIONAL DE INGENIERIA"UNI, Ciencia y Tecnologa al servicio del Pas"
TRABAJOSALUMNO: RAMIREZ MENDIZABAL KEVIN BRAINCURSO: METODOS NUMERICOS ESPECIALIDAD: Ing. De MinasPROFESOR: AYALA DE CAMPO, Jorge GerardoCODIGO: 20137002CCICLO: 2015 I
UNI
METODO DE NEWTON RAPHSON
%metodo de newton raphsonclear, clccf=input('ingrese funcion a evaluar: ');symsxf = 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
METODO DE REGLA FALSA
format longx = 3.5;fx = 65000*x.^3 - 115.51*x.^2 + 0.86*x-0.1.57*10.^2;dfx =195000*x.^2 - 231.02*x + 0.86; xr = x-(fx/dfx); error = 0.00001; k = 1; error1 = 1;while error1 > error fxr = exp(-xr)-xr; dfxr = -exp(-xr)-1; xr1 = xr-(fxr/dfxr); error1 = abs(xr1-xr); xr = xr1; k = k+1;endxr,k
METODO DE LA SECANTE
clearall; 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;
symsuAreaAna=int((1-u-4*(u^3)+3*(u^5)),a,b);
for i=1:nx(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-1suma=suma+y(i);Area=0.5*h*(y(1)+2*suma+y(n));ep=(abs((AreaAna-Area)/AreaAna))*100;ifAreaAna-Area