Sunteți pe pagina 1din 5

ALUMNO: CRISTOBAL MENDOZA IRVING PIERO EAP de Ing.

Química Industrial

CORRECCION DEL 2 y 3°PARCIAL DE METODOS NUMERICOS

1. Hallar la I=… No utilizar el método simple ni compuesto del trapecio


ni de Simpson de 1/3…
Haciendo un Programa:
%INTEGRAL DOBLE CUANDO n=4
%ESTA INTEGRAL NO SE PUEDE SEPARAR
clc
syms y z
ay=-1.2;
by=1.2;
az=-2;
bz=2;
n=4;
hy=(by-ay)/n;
hz=(bz-az)/n;
fy=(y^3+sin(z))*sinh(z);
y=[ay ay+hy ay+2*hy ay+3*hy by];
Fy=[eval(fy)];
Iy=(2*hy/45)*(7*Fy(1)+32*Fy(2)+12*Fy(3)+32*Fy(4)+7*Fy(5));
fz=Iy;
z=[az az+hz az+2*hz az+3*hz bz];
Fz=[eval(fz)];
Iz=(2*hz/45)*(7*Fz(1)+32*Fz(2)+12*Fz(3)+32*Fz(4)+7*Fz(5));
disp('La solucion de la integral es:')
disp('I=')
disp(Iz)

Corriendo el programa:

La solucion de la integral es:

I=

11.6757

2. Para un sistema binario liquido-liquido el modelo de Wilson permite


evaluar el coeficiente …
 A 12 A 21 
Lnγ1   Lnx 1  A 12 x 2   x 2   
 x 1  A 12 x 2 x 2  A 21 x 1 
 A 12 A 21 
Lnγ 2   Lnx 2  A 21 x 1   x 1   
 x 1  A 12 x 2 x 2  A 21 x 1 
x1  x 2  1

Reduciendo las ecuaciones con los valores dados:


ALUMNO: CRISTOBAL MENDOZA IRVING PIERO EAP de Ing. Química Industrial

f1= (0.48+0.52*x)*exp(0.2704*x-0.0208*x*y-0.2496*y)-1.12

f2= (0.52+0.48*y)*exp(0.2304*y+0.0192*x*y-0.2496*x)-1.6

Haciendo un Programa:
clc
clear all
disp('***********************************************************')
disp(' MÉTODO DE NEWTON RAPHSON MODIFICADO ')
disp(' (Iteración Jacobi) ')
disp('***********************************************************')
x0=0; y0=0; e=1*10^-3; d=1;
fprintf(' k x(k)=A12 y(k)=A21 d\n')
disp('***********************************************************')
fprintf (' %3d %14.5f %14.5f\n',0,x0,y0)

for k=1:30;
f1=(0.48+0.52*x0)*exp(0.2704*x0-0.0208*x0*y0-0.2496*y0)-1.12;
df1x=exp(0.2704*x0-0.0208*x0*y0-
0.2496*y0)*0.52+(0.48+0.52*x0)*exp(0.2704*x0-0.0208*x0*y0-
0.2496*y0)*(0.2704-0.0208*y0);
x1=x0-(f1/df1x);
f2=(0.52+0.48*y0)*exp(0.2304*y0+0.0192*x0*y0-0.2496*x0)-1.6;
df2y=exp(0.2304*y0+0.0192*x0*y0-
0.2496*x0)*0.48+(0.52+0.48*y0)*exp(0.2304*y0+0.0192*x0*y0-
0.2496*x0)*(0.2304+0.0192*x0);
y1=y0-(f2/df2y);
d=((x1-x0)^2+(y1-y0)^2)^0.5;
fprintf(' %3d %14.5f %14.5f %14.5f\n',k,x1,y1,d)
if d<e
break
end
x0=x1;y0=y1;
end
disp('***********************************************************')

Corriendo el programa:

***********************************************************
MÉTODO DE NEWTON RAPHSON MODIFICADO
(Iteración Jacobi)
***********************************************************
k x(k)=A12 y(k)=A21 d
***********************************************************
0 0.00000 0.00000
1 0.98493 1.80058 2.05236
2 1.52202 1.70566 0.54542
3 1.43355 1.90347 0.21669
4 1.51865 1.86450 0.09359
5 1.50033 1.89485 0.03545
6 1.51356 1.88811 0.01485
7 1.51058 1.89285 0.00560
8 1.51265 1.89178 0.00233
9 1.51218 1.89252 0.00088
***********************************************************
ALUMNO: CRISTOBAL MENDOZA IRVING PIERO EAP de Ing. Química Industrial

NOTA.- Tomando como valor 1*10^-4 para el criterio de convergencia de la distancia


los valores de los parámetros son: A12=1.51218 y A21=1.89252

3. Se tiene las siguientes ecuaciones diferenciales de un circuito


eléctrico…
Se tiene las siguientes ecuaciones:
i1’+i2’+400i1=100……………………….. (1)
200i2’’+3i2-2i1’=0……………………….. (2)
Despejando i1’ de (2)
i1’=100i2’’+1.5i2………………………..(3)
Reemplazando (3) en (1)
100i2’+i2’+1.5i2+400i1=100
Despejando la derivada de mayor orden para obtener una sola EDO DE
ORDEN SUPERIOR:
i2’’=1-0.01i2’-0.015i2-4i1 …………………………..(4)
haciendo cambio de variable:
w=i1
x=i2
y=i2’
derivando (x=i2) x’ = i2’ entonces x’ = y
derivando (y=i2’) y’ = i2’’
Despejando en (4):
y’=1-0.01y-0.015x-4w entonces y’=f (y, x, w)
para el tiempo 10s
i1+i2=0 entonces i1=-i2 ………… w-x
por lo tanto:
y’=1-0.01y+3.985x
En el Matlab:
ALUMNO: CRISTOBAL MENDOZA IRVING PIERO EAP de Ing. Química Industrial

%Euler modificado
clear,clc
format short
syms x y
ft=1-0.01*y+3.985*x;
f=inline(ft);
to=10;
yo=0;
tf=25;
n=10;
h=(tf-to)/n;
disp('====================================================')
disp(' i to yi yf error')
disp('====================================================')
for i=1:n
y1=yo+h*f(to,yo);
yf=yo+h/2*(f(to,yo)+f(to+h,y1));
to=to+h;
error=abs(yo-yf);
disp([i to y1 yf error])
yo=yf;
end

Corriendo el programa:

====================================================
i to yi yf error
====================================================
1.0000 11.5000 61.2750 65.2986 65.2986

2.0000 13.0000 134.5603 138.5240 73.2254

3.0000 14.5000 215.6536 219.5583 81.0343

4.0000 16.0000 304.4387 308.2852 88.7269

5.0000 17.5000 400.8009 404.5902 96.3050

6.0000 19.0000 504.6276 508.3604 103.7702

7.0000 20.5000 615.8075 619.4848 111.1244

8.0000 22.0000 734.2313 737.8538 118.3690

9.0000 23.5000 859.7910 863.3596 125.5058

10.0000 25.0000 992.3804 995.8959 132.5363

Entonces: i2’’=995.8959
ALUMNO: CRISTOBAL MENDOZA IRVING PIERO EAP de Ing. Química Industrial

4. La ecuación de la onda y sus ecuaciones son…


𝒅𝟐 𝒖 𝒅𝟐 𝒖
𝟐
𝒂 = 𝟐
𝒅𝒛𝟐 𝒅𝒕
0<z<L, t>0
u(0,t)=0
u(L,t)=0
u(z,0)=sen(2z)
u’(z,0)=cos(3z)
a=10
Construyendo la malla:

y
60.0
59.75

Cf(10,y)=0 ; y>0
Cf(0,y)=0 ; y>0

.
.
.

0.75
0.50
0.25
0
0 1 2 3 … 9 10 z
Ci(z,0)=0.5

Aproximando por diferencias hacia atrás:

𝒅𝟐 𝒖 𝒅𝟐 𝒖
𝟐
𝒂 = 𝟐
𝒅𝒛𝟐 𝒅𝒕
u(i+1,j)− 2u(i,j) +C(i−1,j) u(i+1,j) −u(i,j) u(i+1,j)− 2u(i,j) +u(i−1,j)
𝒂𝟐 ( − )=( )
a2 a a2

u(i+1,j)− 2u(i,j) + u(i−1,j) u(i+1,j) − u(i,j)


u(i,j) − u(i,j−1)− = b ∗ ( − )
a2 a

S-ar putea să vă placă și