Está en la página 1de 9

1.

2. Un objeto est situado en un plano cuya pendiente vara a


una tasa constante w. La posicin del objeto, al instante t est
dado por la formula:
g
s(t, w) = (sinh(wt) sin(wt)).
2w2
, donde g = 9,8m/s2 es la aceleracin de la gravedad. Asu-
miendo que el objeto se ha desplazado 1 metro en 1 segundo.
Calcule el valor de w, usando el mtodo de la biseccin, con
una tolerancia de 10 2. Cuantas iteraciones se requieren para
alcanzar la tolerancia dada?

b 1 a1
|C Cn |
2n
51
10 5
2n
51
ln(2) ln( )
10 5
12,899
n
ln(2)
n 18
iteraciones

y = w2 4,9sinh(x) + 4,9sin(x).

a b c f(a) f(b) f(c)


1 1 0 2,6352 0,6352 0

raz de la funcin:0

Programa empleado:

function [raiz]=mbiseccion()
clear all
clc
fprintf(Metodo de la Biseccin);

1
syms x;
f=input(\nIngrese f(x) = );
y=inline(f);
t=linspace(-10,0.1,10);
plot(t,y(t));
grid on;
a=input(Ingrese el limite inferior : );
%a=str2mun(a)
b=input(Ingrese el limite superior : );
e=input(Ingrese el error : );
if (y(a)*y(b))>0
fprintf(Los limites ingresado son incorectos);
fprintf(\nNo existe raiz);
return;
end
while abs(b-a)>e
c=(a+b)/2;
if y(c)==0
raiz=c;
break
end
if y(a)*y(c)<0
b=c;
else
a=c;
end
end
raiz = c

Resultado del programa:

2
Grfica de la funcin:

3.

4. Un proyectil es lanzado con velocidad inicial v0 y un ngulo


en un tunel de altura h. El proyectil llega a su alcanze mximo
cuando s tal que
s
2gh
sin() = ( ).
(V0 )2

, donde g = 9,8m/s2 es la aceleracin de la gravedad. Calcule


usando el mtodo de Newton, asumiendo que vo = 10
m/s2 y h = 1
m

s
2gh
sin() =
V0
s
2 9,8 1
sin( =
102
f (x) = sin() 0,44272
f 0 (x) = cos()

3
f (0 0,3987
1 = 0
f 0 (0 ) 1
=1
0,5403 1
= 0,2621
0,1836
2 = 0,2621
0,9658 2
= 0,4522
0,1836
2 = 0,2621
0,9658 2
= 0,4522
5,773210 3
3 = 0,4522 0,99998
3 = 0,45797
4 = 0,4585
Error= 0.4585-0.45797 0,4548Error=0,11
Programa empleado:

function [raiz]=mnewton()
clear all
clc
fprintf(Metodo de Newton);
syms x;
f=input(\nIngrese f(x) = );
y=inline(f);
t=linspace(-1,0.001,2);
plot(t,y(t));
grid on;
x0=input(Ingrese un punto inicial x0 cercano a la raiz : );
e=input(Ingrese el error : );
fp=diff(f);
yp=inline(fp);
xx=0;
xy=0;
e1=0;
while y(x0)>=e
x1=x0-(y(x0)/yp(x0));
if y(x0)==0
raiz=x0;
break
else
x0=x1;
end
e=(x1-x0)/x1;
xx=[xx;x0];
xy=[xy;x1];
e1=[e1;e];
end

4
raiz =x0
resultados=[xx xy e]

Resultado con el programa:

Grfica de la funcin:

5.

6. Utilizando el mtodo de la biseccin para la solucin aproxi-


mada de races. Hallar la solucin aproximada para la ecuacin
1
2
2x = 0. en el intervalo (0,5, 1) con una exactitud de 10 2.
Realizar los clculos con cuatro decimales correctos.
Nmero de iteraciones
1 0,5
10 2
2n
1 0,5
2n
10 2
ln( 10,5
10 2
)
n (
ln(2)
n 6
iteraciones

Programa empleado:

5
function [raiz]=mbiseccion()
clear all
clc
fprintf(Metodo de la Biseccin);
syms x;
f=input(\nIngrese f(x) = );
y=inline(f);
a=input(Ingrese el limite inferior : );
b=input(Ingrese el limite superior : );
x=-10:0.0001:10;
fplot(y,x,c)
grid on;

b=input(Ingrese el limite superior : );


e=input(Ingrese el error : );
if (y(a)*y(b))>0
fprintf(Los limites ingresado son incorectos);
fprintf(\nNo existe raiz);
return;
end
while abs(b-a)>e
c=(a+b)/2;
if y(c)==0
raiz=c;
break
end
if y(a)*y(c)<0
b=c;
else
a=c;
end
end
raiz = c

Resultado con el programa:

6
7.
8.
Con x0 = 1 Y x2
f (x0
x2 = x0 x1 x0 )Resuelvalassiguientesecuaciones :
(

(2)
xlogx 10 = 0., porelmtododelasecante.

Con x0 = 1 Y x2
f (x0
x2 = x0 x1 x0 )f (x1 ) f (x0 )
(
(10)
x2 = 1 2 1)8,614 (10)
(

(5)
x2 = 8,21501

(8,614)
x3 = 2 8,614 2)7,3005 + 8,21501
(

7
(7)
x3 = 5,449

x4 = 5,7102
x5 = 5,7291

Programa empleado en Matlab:

function [raiz]=msecante()
clear all
clc
fprintf(Metodo de Secante);
syms x;
f=input(\nIngrese f(x) = );
y=inline(f)
t=linspace(-2,0.01,5);
plot(t,y(t));
grid on;
x0=input(Ingrese un punto x0 cercano a la raiz : );
x1=input(Ingrese un punto x1 cercano a la raiz : );
e=input(Ingrese el error : );
x2=x0-((y(x0)*(x1-x0))/(y(x1)-y(x0)));
xt1=0;
xt2=0;
xt3=0;
while y(x2)>=e
if y(x2)==0
raiz = x2;
break
else
x0=x1;
x1=x2;
end
x2=x0-((y(x0)*(x1-x0))/(y(x1)-y(x0)))

xt1=[xt1;x0];

8
xt2=[xt2;x1];
xt3=[xt3;x2];

end
raiz=x2;
resultados=[xt1 xt2 xt3]

Resultado en el programa:

Grfica de la funcin:

También podría gustarte