Sei sulla pagina 1di 5

2.

El promedio del aumento de la temperatura (ΔT) de la superficie del planeta en funcion del
tiempo, debido al efecto invernadero, se calcula por medio de la ecuación.
21 127 1293
∆𝑇 = 𝑡3 − 𝑡2 + 𝑡
5000000 1000000 50000
Donde t esta expresado en años, y t=0 corresponde al año 1980 y el rango es de 0≤t≤60.

A) realice un grafico de Cco2 vs t y ubique y calcule (en el mismo gráfico) el año en que la
temperatura promedio se eleve 1°C.

>> t=[0:1:60];

>> T=21*t.^3/5000000-127*t.^2/1000000+1293*t/50000;

>> plot(T,t)

>> grid on

>> xlabel(' Aumento de la temperatura')

>> ylabel('t en años donde t=0 corresponde al año 1980')

>> title('GRAFICO DEL CAMBIO DE TEMPERATURA RESPECTO AL TIEMPO t')

>> ylabel('t en años donde t=0 corresponde al año 1980')


B) Esta ecuación anterior es un polinomio de tercer grado, por tanto, deberá tener tres raíces.
Aplique el método de la secante para encontrar estas. Aplique también el método de cardano para
verificar que se tienen los mismos valores, y comparar los resultados anteriores.
function raiz=secan(x1,x2,ff)
%METODO DE LA SECANTE
Nmax=50; % Numero maximo de interaciones
epsi=1e-5; %Tolerancia de convergencia
y1=feval(ff,x1); y2=feval(ff,x2);
iter=1;
convergio=false;
while (iter<= Nmax & ~convergio)
x3=x1-y1*(x2-x1)/(y2-y1); y3=feval(ff,x3);
convergio=abs((x2-x3)/x2)<=epsi;
if ~convergio
x1=x2;
y1=y2;
x2=x3;
y2=y3;
iter=iter+1;
end
end
if convergio
raiz=x3;
else
raiz=NaN;
end
>> f=@(x)21*x.^3/5000000-127*x.^2/1000000+1293*x/50000

f = function_handle with value:

@(x)21*x.^3/5000000-127*x.^2/1000000+1293*x/50000

>> raiz=secan(1,2,f)

raiz =

NaN

Comprobación haciendo uso del comando roots


>> x=[21/5000000,-127/1000000,1293/50000,0]

x=

0.0000 -0.0001 0.0259 0

>> roots(x)

ans =

0.0000 + 0.0000i

15.1190 +76.9971i

15.1190 -76.9971i
LOCALIZACION DE RAICES-METODO DE LA SECANTE

Lim izq= 1
Lim der= 2
NoDivisn's= 10
Y=21X^3/5000000-
incremento= 0.1
127X^2/1000000+1293X/50000
0
-2 -1.92 -1.84 -1.76 -1.68 -1.6 -1.52 -1.44 -1.36 -1.28 -1.2
X Y
-0.01
1 0.0257372
1.1 0.02829792 -0.02
1.2 0.03085638
1.3 0.0334126 -0.03

1.4 0.0359666 -0.04


1.5 0.03851843
1.6 0.04106808 -0.05
1.7 0.0436156
-0.06
1.8 0.04616101
1.9 0.04870434
2 0.0512456

|(x2-
Iter x1 x2 y1 y2 x3 y3 x3)/x2|
- -
1 1 2 0.0257372 0.0512456 0.00896959 0.00023196 1.0044848
- 9.88414E-
2 2 0.008969590.0512456 -0.00023081 3.8404E-05 07 1.00428159
- 4.87672E-
3 -0.00896959 3.8404E-05 0.00023196 9.8825E-07 1.8948E-07 09 0.99506612
2.40671E-
4 3.84041E-05 1.8948E-07 9.9313E-07 4.8759E-09 9.3511E-10 11 0.9950649
1.18778E-
5 1.89481E-07 9.3511E-10 4.9E-09 2.4063E-11 4.615E-12 13 0.9950647
5.86206E-
6 9.3511E-10 4.615E-12 2.4182E-11 1.1876E-13 2.2777E-14 16 0.9950647
7 4.61504E-12 2.2777E-14 1.1934E-13 5.8611E-16 1.1241E-16 2.8931E-18 0.9950647
1.42783E-
8 2.27766E-14 1.1241E-16 5.89E-16 2.8926E-18 5.5477E-19 20 0.9950647
7.04677E-
9 1.12409E-16 5.5477E-19 2.9069E-18 1.4276E-20 2.738E-21 23 0.9950647
3.47779E-
10 5.54773E-19 2.738E-21 1.4346E-20 7.0456E-23 1.3513E-23 25 0.9950647
1.71639E-
11 2.73797E-21 1.3513E-23 7.0804E-23 3.4772E-25 6.6689E-26 27 0.9950647
8.47091E-
12 1.35127E-23 6.6689E-26 3.4944E-25 1.7161E-27 3.2913E-28 30 0.9950647
4.18065E-
13 6.66892E-26 3.2913E-28 1.7246E-27 8.4695E-30 1.6244E-30 32 0.9950647
2.06327E-
14 3.29131E-28 1.6244E-30 8.5113E-30 4.18E-32 8.0167E-33 34 0.9950647
1.01829E-
15 1.62436E-30 8.0167E-33 4.2006E-32 2.0629E-34 3.9565E-35 36 0.9950647
5.02555E-
16 8.01669E-33 3.9565E-35 2.0731E-34 1.0181E-36 1.9526E-37 39 0.9950647
2.48026E-
17 3.95648E-35 1.9526E-37 1.0231E-36 5.0247E-39 9.6369E-40 41 0.9950647
1.22408E-
18 1.95264E-37 9.6369E-40 5.0495E-39 2.4799E-41 4.7561E-42 43 0.9950647
19 9.63685E-40 4.7561E-42 2.4921E-41 1.2239E-43 2.3473E-44 6.0412E-46 0.9950647
2.98151E-
20 4.75607E-42 2.3473E-44 1.2299E-43 6.0402E-46 1.1584E-46 48 0.9950647

EJERCICIO 2: METODO DE CARDANO

COEFICIENTES t= 1950.78735
-
a3= 1 u= 30006.0464
a2= -30.2380952 d= 8324223163
a1= 6157.142857 Ɵ
a0= 0

S1= 39.4146283
-
S2= 49.49399338

TIPO DE RAICES:
UNA RAIZ REAL Y DOS COMPLEJAS CONJUGADAS

X1= -3.55271E-15
X2= 15.11904762 + 76.997125 i
X3= 15.11904762 - 76.997125 i

Potrebbero piacerti anche