Escolar Documentos
Profissional Documentos
Cultura Documentos
a) Ubicar gráficamente el cero (o ceros) de cada una de las funciones, procurando convertir
la ecuación 𝑓(𝑥) = 0 en otra ecuación de la forma 𝑓1 (𝑥) = 𝑓2 (𝑥), donde 𝑓1 𝑦 𝑓2 sean
funciones cuyas gráficas sean conocidas.
b) Utilice el programa para el método de bisección en MATLAB para hallar en forma
aproximada el cero (o ceros) de 𝑓1 con la tolerancia especificada para dada función.
Ejercicio 1:
FUNCIÓN GENERAL:
function y=F1(x)
y=x^2-1-2*x;
end
SUBFUNCIONES:
clc
clear
x=-4:0.01:4;
y1=x^2;
y2=1+2*x
plot(x,y1,'r',x,y2,'k')
grid on
20
15
10
-5
-10
-4 -3 -2 -1 0 1 2 3 4
SOLUCIÓN: [c]=bisec('F1',2,3,10^-8)
1 2.000000000000 3.000000000000 2.500000000000 0.250000000000
c=
2.2500
Ejercicio 2:
2
F(x)=𝑥 2 − 𝑐𝑜𝑠𝑥, tolerancia = 5x10−8
3
FUNCIÓN GENERAL:
function y=F2(x)
y=x.^2-(2/3)*cos(x);
end
SUBFUNCIONES:
clc
clear
x=-1:0.01:3;
y1=x.^2;
y2=(2/3)*cos(x);
plot(x,y1,'r',x,y2,'k')
grid on
-1
-1 -0.5 0 0.5 1 1.5 2 2.5 3
SOLUCIÓN: [c]=bisec('F2',0.7,1.5,5*10^-8)
c=
0.7062
Ejercicio 3:
FUNCIÓN GENERAL:
function y=F3(x)
y=cos(3*x)+x.^3;
end
SUBFUNCIONES:
clc
clear
x=-1:0.01:1;
y1=-cos(3*x);
y2=x.^3;
plot(x,y1,'g',x,y2,'c')
grid on
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
SOLUCIÓN: [c]=bisec('F3',-2,1,10^-9)
c=
-0.5000
Ejercicio 4:
FUNCIÓN GENERAL:
function y=F4(x)
y=x.^3-x.^2+2*x+8;
end
SUBFUNCIONES:
clc
clear
x=-3:0.01:3;
y1=x.^3;
y2=x.^2-2*x-8;
plot(x,y1,'c',x,y2,'b')
grid on
30
20
10
-10
-20
-30
-3 -2 -1 0 1 2 3
SOLUCIÓN: [c]=bisec('F4',-1.5,0,5*10^-7)
c=
-1.4531
Ejercicio 5:
𝑥⁄
F(x) = 𝑥𝑒 4 – 6, tolerancia = 10−8
FUNCIÓN GENERAL:
function y=f5(x)
y=x*exp(x)^(x/4)-6;
end
SUBFUNCIONES:
clc
clear
x=-25:0.01:25;
y1=exp(x).^(x./4);
y2=6./x;
plot(x,y1,'b',x,y2,'c')
grid on
axis([-5 5 -500 500])
500
400
300
200
100
-100
-200
-300
-400
-500
-5 -4 -3 -2 -1 0 1 2 3 4 5
SOLUCIÓN: [c]=bisec('F5',2,10,10^-6)
c=
2.0625
Ejercicio 6:
FUNCIÓN GENERAL:
function y=F6(x)
y=(x-3).^3-log(2*x);
end
SUBFUNCIONES:
clc
clear
x=0:0.01:11;
y1=(x-3).^3;
y2=log(2*x);
plot(x,y1,'r',x,y2,'c')
grid on
600
500
400
300
200
100
-100
0 2 4 6 8 10 12
SOLUCIÓN: [c]=bisec('F6',4.2,9.99,10^-10)
c=
4.2905
Ejercicio 7:
FUNCIÓN GENERAL:
function y=F7(x)
y=x.^3+3-exp(x);
end
SUBFUNCIONES:
clc
clear
x=-4:0.01:4;
y1=x.^3+3;
y2=exp(x);
plot(x,y1,'r',x,y2,'b')
grid on
80
60
40
20
-20
-40
-60
-80
-4 -3 -2 -1 0 1 2 3 4
SOLUCIÓN: [c]=bisec('F7',-2,2.7,10^-6)
c=
-1.4125