Documentos de Académico
Documentos de Profesional
Documentos de Cultura
5ex - 2x – 10 = 0
(x2 + 1) cos (x) = 1
X3 - 4X2 - 4x + 16 - log(x) = 0
5ex - 2x – 10 = 0
>> f='5*exp(x)-2*x-10';
>> ezplot(f); grid on
>> fzero(f,-6.28)
ans =
-4.9829
>> fzero(f,-6)
ans =
-4.9829
>> fzero(f,-4.31)
ans =
-4.9829
>> fzero(f,-2)
ans =
0.8502
>> fzero(f,-0)
ans =
0.8502
>> fzero(f,1.11)
ans =
0.8502
>> f='(x^2+1)*cos(x)'
f=
(x^2+1)*cos(x)
>> ezplot(f);grid on
>> fzero(f,-4.72)
ans =
-4.7124
>> fzero(f,-4.72)
ans =
-4.7124
>> fzero(f,-1.55)
ans =
-1.5708
>> fzero(f,1.52)
ans =
1.5708
>> fzero(f,4.72)
ans =
4.7124
X3 - 4X2 - 4x + 16 - log(x) = 0
>> f='x^3-4*x^2-4*x+16-log(x)';
>> ezplot(f);grid on
>> fzero(f,1.90)
ans =
1.9200
>> fzero(f,4.14)
ans =
4.1097
>> f='x^3-4*x^2-4*x+16-log(x)';
>> format long
>> ezplot(f);grid on
>> xa=1, xb=5
xa =
xb =
xp =
-2.46468263
xp =
-0.31362835 + 0.17701253i
xp =
-1.52666849 + 0.27887326i
xp =
-1.90186429 + 0.18776173i
xp =
-1.96808901 + 0.14461871i
xp =
-1.97729389 + 0.13352031i
xp =
-1.97833344 + 0.13057745i
xp =
-1.97834703 + 0.13059479i
xp =
-1.97834700 + 0.13059479i
xp =
-1.97834700 + 0.13059479i
xp =
-1.97834700 + 0.13059479i
b. Se diseña un tanque esférico para almacenar agua en un pueblo pequeño. El
volumen de líquido se calcula como V=πh2(3R-h)/3. Si R=3 metros, a que
profundidad h debe llenarse de manera que contenga V=30 m3 de agua. Emplee
falsa posición.
Aplique el método de Newton Raphson a los siguientes problemas. (Realice sus cálculos
con Excel y Matlab).
a. Determine las raíces de f(x) = 2x3 – 11.7x2 + 17.7x – 5. Primero en forma gráfica.
Empleando el método de Newton con seis lugares exactos después del punto
decimal. Intervalo [0,4]
b. Determine la raíz real más grande de f(x) = 0.95x3 – 5.9x2 + 10.9x – 6: por el
método de Newton.
1. Método gráfico.
2. Halle los intervalos y el intervalo para la raíz más grande.
[0,6]
3.8728
3. Plantilla en Excel.
c. El polinomio f(x) = 0.0074x4 – 0.284x3 + 3.355x2 – 12.183x + 5 tiene una raíz real
entre 15 y 20. Aplique el método de Newton-Raphson a dicha función.
Compruebe el resultado aplicando el comando fzero y grafique.
4. Raíces de polinomios (Newton Raphson Modificado) y Sistema de ecuaciones no
lineales:
NRM
a. Aplique el método de Newton Raphson modificado al siguiente problema:
1) Grafique
2) Encuentre los intervalos
[0,2]
3) Determines las raíces
0.90
SENL
b. y = x2 + ln(x-1)
ey = 5sen(x)
x=
y=
1
n=
x=
89.7923
y=
7.8786e+03
n=
1
>> x =-eval(u*vy - uy*v - ux*vy*x + uy*vx*x)/eval(ux*vy - uy*vx)
y =eval(u*vx - ux*v + ux*vy*y - uy*vx*y)/eval(ux*vy - uy*vx), n=n+1
x=
1.6087
y=
3.0844
n=
93
Aplique el método de Gauss y Matriz inversa para los siguientes sistemas de ecuaciones:
>> M=[M(2,:);M(1,:);M(3,:)]
M=
>> M(2,:)=M(2,:)-M(1,:)*M(2,1)/M(1,1);
>> M(3,:)=M(3,:)-M(1,:)*M(3,1)/M(1,1);
>> M
M=
>> M(3,:)=M(3,:)-M(2,:)*M(3,2)/M(2,2);
>> M
M=
>> x3=M(3,4)/M(3,3)
x3 =
1.1317
>> x2=(M(2,4)-M(2,3)*x3)/M(2,2)
x2 =
1.0309
>> x1=(M(1,4)-M(1,3)*x3-M(1,2)*x2)/M(1,1)
x1 =
1.5956
>> x=inv(A)*b
x=
1.5956
1.0309
1.1317
x=
1.0000 0 0 1.5956
0 1.0000 0 1.0309
0 0 1.0000 1.1317
M=
>> M=[M(2,:);M(1,:);M(3,:)]
M=
>> M(2,:)=M(2,:)-M(1,:)*M(2,1)/M(1,1);
>> M(3,:)=M(3,:)-M(1,:)*M(3,1)/M(1,1);
>> M
M=
>> M(3,:)=M(3,:)-M(2,:)*M(3,2)/M(2,2);
>> M
M=
0.5000 0.8000 -0.2700 0
0 -0.9700 0.5060 0.1000
0 0 0.2114 0.6422
>> x3=M(3,4)/M(3,3)
x3 =
3.0383
>> x2=(M(2,4)-M(2,3)*x3)/M(2,2)
x2 =
1.4819
>> x1=(M(1,4)-M(1,3)*x3-M(1,2)*x2)/M(1,1)
x1 =
-0.7303
>> x=inv(A)*b
x=
-0.7303
1.4819
3.0383
>> % Gauss Jordan
>> x=rref(M)
x=
1.0000 0 0 -0.7303
0 1.0000 0 1.4819
0 0 1.0000 3.0383
Aplique el método de Jacobi y Gauss Seidel a los siguientes sistemas de ecuaciones, use
Excel y Matlab.
a. 9x1 – x2 + 2x3 = 9
x1 + 8x2 + 2x3 = 19
x1 – x2 + 11x3 = 10
Metodo de Jacobi
Ti =
0 0 0
1 0 0
1 -1 0
>> Ts=triu(A,1)
Ts =
0 -1 2
0 0 2
0 0 0
>> D=diag(diag(A))
D=
9 0 0
0 8 0
0 0 11
x=
1.0000
2.3750
0.9091
n=
1
>> x=inv(D)*(b-(Ti+Ts)*x), n=n+1
x=
1.0000
2.0000
1.0000
n=
8
>> x=inv(A)*b
x=
1.0000
2.0000
1.0000
b. 4x1 – x2 + 2x3 = 4
x1 + 4x2 + 2x3 = 11
x1 – x2 + 3x3 = 2
Metodo de Gauss-Seidel
x=
1.0000
2.5000
1.1667
n=
1
>> x=inv(Ti+D)*(b-Ts*x),n=n+1
x=
1.0000
2.0000
1.0000
n=
8
>> x=inv(A)*b
x=
1.0000
2.0000
1.0000
ans =
>> p=polyfit(x,y,4)
p=
>> y2=polyval(p,x1);
>> hold on
>> plot(x,y,x1,y2,'b');grid on
>> plot(x,y,x1,y2,'*b');grid on
>> polyval(p,[-2.5,0.6,2,3,5.12])
ans =
8. Método de Lagrange:
Dados los valores obtenidos en una medición determine un polinomio de interpolación
por el método de Lagrange. Evalué para x=0.27. Represéntelo gráficamente.
>> p=expand(sym('(x-2.4)*(x-3.18)*(x-4.21)*-1.2/((-1.5-2.4)*(-1.5-3.18)*(-1.5-
4.21))+(x+1.5)*(x-3.18)*(x-4.21)*-5.24/((2.4+1.5)*(2.4-3.18)*(2.4-4.21))+(x-2.4)*(x+1.5)*(x-
4.21)*-2.37/((3.18-2.4)*(3.18+1.5)*(3.18-4.21))+(x-2.4)*(x-3.18)*(x+1.5)*1.12/((4.21-
2.4)*(4.21-3.18)*(4.21+1.5))'))
p=
- 0.20462528089057921280804604033784*x^3 +
1.8424319612866861336874655829084*x^2 - 1.7916887123279990892711334226251*x -
8.7236153043927472779306530816219
>> subs(p,[0.27])
ans =
-9.0770856061472768835337436349487
>> ezplot(p);grid on
>> ezplot(p,[-2,6]);grid on
x 1 2 3 4
f(x) 250 200 140 95
>> p=expand(sym('(x-2)*(x-3)*(x-4)*250/((1-200)*(1-140)*(1-95))+(x-1)*(x-3)*(x-4)*200/((2-
250)*(2-140)*(2-95))+(x-2)*(x-1)*(x-4)*140/((3-200)*(3-250)*(3-95))+(x-2)*(x-3)*(x-1)*95/((4-
200)*(4-140)*(4-250))'))
p=
- (5631824842164654275*x^3)/27506255912344428553152 +
(23021041437774684905*x^2)/13753127956172214276576 -
(118028478576270375905*x)/27506255912344428553152 +
15581066086181975395/4584375985390738092192
>> subs(p,[3.6])
ans =
1763411283169051/19165451443941212760
>> ezplot(p);grid on
9. Método de Interpolación Inversa:
X 0 1 2.5 3 4.5 5 6
y 2 5.4375 7.3516 7.5625 8.4453 9.1875 12
>> p=expand(sym('(x-2.5)*(x-3)*(x-4.5)*5.4375/((1-2.5)*(1-3)*(1-4.5))+(x-1)*(x-3)*(x-
4.5)*7.3516/((2.5-1)*(2.5-3)*(2.5-4.5))+(x-2.5)*(x-1)*(x-4.5)*7.5625/((3-2.5)*(3-1)*(3-4.5))+(x-
2.5)*(x-3)*(x-1)*8.4453/((4.5-2.5)*(4.5-3)*(4.5-1))'))
p=
0.14585714285714285714285714285714*x^3 - 1.3752047619047619047619047619048*x^2 +
4.6671761904761904761904761904762*x + 1.9996714285714285714285714285714
>> x=solve('0.14585714285714285714285714285714*x^3 -
1.3752047619047619047619047619048*x^2 + 4.6671761904761904761904761904762*x +
1.9996714285714285714285714285714=7.94','x')
x=
3.9051960133550384056572449236701
2.7616200801654452111446063987594 + 1.6740336759331577502292220918213i
2.7616200801654452111446063987594 - 1.6740336759331577502292220918213i
p=
>> x=solve('0.1459*x^3-1.3752*x^2+4.6672*x+1.9997=7.94','x')
x=
3.9006182907522127587131695447155
2.76250785256769074195938507 + 1.6752929991510622585564307736665i
2.76250785256769074195938507 - 1.6752929991510622585564307736665i