ejercicio 1 - upmdma.aq.upm.es/profesor/rosado_e/proyectivamaple4sol.pdf · 2011-04-06 ·...
TRANSCRIPT
> restart: with(plots): with(linalg):Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
Ejercicio 1> Q1:=2*x0^2+x1^2-x2^2-x3^2+2*x0*x1-x0*x2+x0*x3+x1*x2;
Q1 :=
+ − − + − + + 2 x02 x12 x22 x32 2 x0 x1 x0 x2 x0 x3 x1 x2> a00:=coeff(Q1,x0,2): a11:=coeff(Q1,x1,2): a22:=coeff(Q1,x2,2): a33:=coeff(Q1,x3,2): a01:=coeff(coeff(Q1,x0,1),x1,1): a02:=coeff(coeff(Q1,x0,1),x2,1): a03:=coeff(coeff(Q1,x0,1),x3,1): a12:=coeff(coeff(Q1,x1,1),x2,1): a13:=coeff(coeff(Q1,x1,1),x3,1): a23:=coeff(coeff(Q1,x2,1),x3,1):
> A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]);
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥
2 1-12
12
1 112
0
-12
12
-1 0
12
0 0 -1
> X:=[x0,x1,x2,x3];
:= X [ ], , ,x0 x1 x2 x3> simplify(evalm(X&*A&*X));
+ − − + − + + 2 x02 x12 x22 x32 2 x0 x1 x0 x2 x0 x3 x1 x2Nótese que la ecuación anterior es la ecuación de la cuádrica Q1.> A_00:=submatrix(A,2..4,2..4);
:= A_00
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥
112
0
12
-1 0
0 0 -1> det(A); eigenvalues(A_00);
4116
, ,-15
2−
52
La cuádrica es un hiperboloide reglado o hiperbólico.> P:=[1,2,1,0];
evalm(P&*A&*P);
:= P [ ], , ,1 2 1 010
El punto P no es un punto de la cuádrica.> PlanoPolar_P:=simplify(evalm(P&*A&*X));
:= PlanoPolar_P + − + 7 x0
27 x1
2x22
x32
> Tangente_P:=simplify(evalm(P&*A&*X)^2-evalm(P&*A&*P)*evalm(X&*A&*X));
Tangente_P31 x02
49 x0 x1
213 x0 x2
213 x0 x3
2− + + − :=
9 x12
427 x1 x2
27 x1 x3
241 x22
4x2 x3
241 x32
4 + − + + − +
> Cuadrica1:=implicitplot3d(subs(x0=1,Q1),x1=-10..10,x2=-10..10,x3=-10..10,axes=normal,grid=[20,20,20]):
> Tangente1:=implicitplot3d(subs(x0=1,Tangente_P),x1=-10..10,x2=-10..10,x3=-10..10, axes=normal,color=green,grid=[20,20,20]):
> Plano:=implicitplot3d(subs(x0=1,PlanoPolar_P),x1=-10..10,x2=-10..10,x3=-10..10,axes=normal):
> display({Cuadrica1,Tangente1,Plano});
> P2:=[1, 0, 3/2, 0]; evalm(P2&*A&*P2);
:= P2⎡
⎣⎢⎢
⎤
⎦⎥⎥, , ,1 0
32
0
-74
El punto P2 no es un punto de la cuádrica.> PlanoPolar_P2:=simplify(evalm(P2&*A&*X));
:= PlanoPolar_P2 + − + 5 x0
47 x1
42 x2
x32
> Tangente_P2:=simplify(evalm(P2&*A&*X)^2-evalm(P2&*A&*P2)*evalm(X&*A&*X));
Tangente_P281 x02
1663 x0 x1
827 x0 x2
43 x0 x3 + − + :=
77 x12
1621 x1 x2
47 x1 x3
49 x22
42 x2 x3
3 x32
2 + − + + − −
> Tangente2:=implicitplot3d( subs(x0=1,Tangente_P2), x1=-10..10,x2=-10..10,x3=-10..10, axes=normal,color=green,grid=[20,20,20] ):
> Plano2:=implicitplot3d( subs(x0=1,PlanoPolar_P2), x1=-10..10,x2=-10..10,x3=-10..10,axes=normal):
> display({Cuadrica1,Tangente2,Plano2}):Calculamos primero los planos principales de la cuádrica:> eigenvectors(A_00);
⎡
⎣⎢⎢
⎤
⎦⎥⎥, ,
52
1 { }[ ], , + 5 2 1 0 ,
⎡
⎣⎢⎢
⎤
⎦⎥⎥, ,−
52
1 { }[ ], ,− + 5 2 1 0 [ ], ,-1 1 { }[ ], ,0 0 1,
> E1:=[0,0,0,1]; E2:=[0,5^(1/2)+2, 1, 0]; E3:=[0,-5^(1/2)+2, 1, 0];
:= E1 [ ], , ,0 0 0 1
:= E2 [ ], , ,0 + 5 2 1 0
:= E3 [ ], , ,0 − + 5 2 1 0Planos principales:> Pi_1:=evalm(E1&*A&*X); Pi_2:=evalm(E2&*A&*X); Pi_3:=evalm(E3&*A&*X);
:= Pi_1 − x02
x3
:= Pi_2 + + ⎛
⎝⎜⎜
⎞
⎠⎟⎟ +
32
5 x0⎛
⎝⎜⎜
⎞
⎠⎟⎟ +
52
5 x15 x22
:= Pi_3 + − ⎛
⎝⎜⎜
⎞
⎠⎟⎟ −
32
5 x0⎛
⎝⎜⎜
⎞
⎠⎟⎟ −
52
5 x15 x22
Centro:> solve({Pi_1,Pi_2,Pi_3});
{ }, , , = x1 x1 = x0 −5 x1
3 = x3 −
5 x16
= x24 x1
3> Z:=[2, -6/5, -8/5, 1];
:= Z⎡
⎣⎢⎢
⎤
⎦⎥⎥, , ,2
-65
-85
1
> Plano1:=implicitplot3d(subs(x0=1,Pi_1),x1=-10..10,x2=-10..10,x3=-10..10, axes=normal,color=green,grid=[20,20,20]): Plano2:=implicitplot3d(subs(x0=1,Pi_2),x1=-10..10,x2=-10..10,x3=-10..10, axes=normal,color=green,grid=[20,20,20]):
Plano3:=implicitplot3d(subs(x0=1,Pi_3),x1=-10..10,x2=-10..10,x3=-10..10, axes=normal,color=green,grid=[20,20,20]):
> display({Cuadrica1,Plano1,Plano2,Plano3});
Ejercicio 2> Q2:=-x1^2+3*x2^2+4*x1*x2+2*x3*x0+2*x0^2;
:= Q2 − + + + + x12 3 x22 4 x1 x2 2 x0 x3 2 x02
> a00:=coeff(Q2,x0,2): a11:=coeff(Q2,x1,2): a22:=coeff(Q2,x2,2): a33:=coeff(Q2,x3,2): a01:=coeff(coeff(Q2,x0,1),x1,1): a02:=coeff(coeff(Q2,x0,1),x2,1): a03:=coeff(coeff(Q2,x0,1),x3,1): a12:=coeff(coeff(Q2,x1,1),x2,1): a13:=coeff(coeff(Q2,x1,1),x3,1): a23:=coeff(coeff(Q2,x2,1),x3,1):
> A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]);
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥
2 0 0 10 -1 2 00 2 3 01 0 0 0
> simplify(evalm(X&*A&*X));
− + + + + x12 3 x22 4 x1 x2 2 x0 x3 2 x02
Nótese que la ecuación anterior es la ecuación de la cuádrica.> det(A);
7> A_00:=submatrix(A,2..4,2..4);
:= A_00⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
-1 2 02 3 00 0 0
> eigenvectors(A_00);
[ ], , + 1 2 2 1 { }[ ], ,1 + 1 2 0 ,
[ ], , − 1 2 2 1 { }[ ], ,1 − 1 2 0 [ ], ,0 1 { }[ ], ,0 0 1,Paraboloide hiperbólico o reglado.> implicitplot3d(subs(x0=1,Q2),x1=-10..10,x2=-10..10,x3=-10..10,axes=normal,grid=[20,20,20]);
Ejercicio 3> Q3:=27*x0^2+x1^2+2*x2^2+x3^2-10*x0*x1-4*x0*x3;
:= Q3 + + + − − 27 x02 x12 2 x22 x32 10 x0 x1 4 x0 x3> a00:=coeff(Q3,x0,2): a11:=coeff(Q3,x1,2): a22:=coeff(Q3,x2,2): a33:=coeff(Q3,x3,2): a01:=coeff(coeff(Q3,x0,1),x1,1): a02:=coeff(coeff(Q3,x0,1),x2,1): a03:=coeff(coeff(Q3,x0,1),x3,1): a12:=coeff(coeff(Q3,x1,1),x2,1): a13:=coeff(coeff(Q3,x1,1),x3,1): a23:=coeff(coeff(Q3,x2,1),x3,1):
> A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]);
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥
27 -5 0 -2-5 1 0 00 0 2 0
-2 0 0 1> simplify(evalm(X&*A&*X));
+ + + − − 27 x02 x12 2 x22 x32 10 x0 x1 4 x0 x3que es la ecuación de la cuádrica.> det(A);
-4> A_00:=submatrix(A,2..4,2..4);
:= A_00⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
1 0 00 2 00 0 1
> Elipsoide:=implicitplot3d(subs(x0=1,Q3),x1=0..10,x2=-2..2,x3=0..5,axes=normal,
grid=[20,20,20]):> P1:=[1,2,1,0]; evalm(P1&*A&*P1); PlanoPolar_P1:=evalm(P1&*A&*X); PlanoPolar:=implicitplot3d(subs(x0=1,PlanoPolar_P1),x1=0..10,x2=-2..2,x3=0..5, axes=normal,color=green,grid=[20,20,20]): display({Elipsoide,PlanoPolar});
:= P1 [ ], , ,1 2 1 013
:= PlanoPolar_P1 − + − 17 x0 3 x1 2 x2 2 x3
> P2:=[1,0,0,5]; evalm(P2&*A&*P2); PlanoPolar_P2:=evalm(P2&*A&*X); PlanoPolar2:=implicitplot3d(subs(x0=1,PlanoPolar_P2),x1=0..10,x2=-2..2,x3=0..5, axes=normal,color=green,grid=[20,20,20]): display({Elipsoide,PlanoPolar2});
:= P2 [ ], , ,1 0 0 5
32 := PlanoPolar_P2 − + 17 x0 5 x1 3 x3
> P3:=[1,5,1,2]; evalm(P3&*A&*P3); PlanoPolar_P3:=evalm(P3&*A&*X); PlanoPolar3:=implicitplot3d(subs(x0=1,PlanoPolar_P3),x1=0..10,x2=-2..2,x3=0..5, axes=normal,color=green,grid=[20,20,20]):
display({Elipsoide,PlanoPolar3});
:= P3 [ ], , ,1 5 1 20 := PlanoPolar_P3 − + 2 x0 2 x2
> solve(convert(evalm(X&*A-[1,0,0,0]),set));
{ }, , , = x2 0 = x0-12
= x3 -1 = x1-52
> Z:=[-1/2,-5/2,0,-1];
:= Z⎡
⎣⎢⎢
⎤
⎦⎥⎥, , ,
-12
-52
0 -1
Ejercicio 4> Q4:=3*x0^2-2*x1^2+2*x2^2-x3^2+4*x0*x1-2*x0*x2+2*x0*x3+4*x1*x2;
Q4 3 x02 2 x12 2 x22 x32 4 x0 x1 2 x0 x2 − + − + − := 2 x0 x3 4 x1 x2 + +
> a00:=coeff(Q4,x0,2): a11:=coeff(Q4,x1,2): a22:=coeff(Q4,x2,2): a33:=coeff(Q4,x3,2): a01:=coeff(coeff(Q4,x0,1),x1,1): a02:=coeff(coeff(Q4,x0,1),x2,1): a03:=coeff(coeff(Q4,x0,1),x3,1): a12:=coeff(coeff(Q4,x1,1),x2,1): a13:=coeff(coeff(Q4,x1,1),x3,1): a23:=coeff(coeff(Q4,x2,1),x3,1):
> A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]); A_00:=submatrix(A,2..4,2..4):
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥
3 2 -1 12 -2 2 0
-1 2 2 01 0 0 -1
> det(A);
46> eigenvectors(A_00);
[ ], ,2 2 1 { }[ ], , − 2 1 1 0 ,
[ ], ,−2 2 1 { }[ ], ,− − 2 1 1 0 [ ], ,-1 1 { }[ ], ,0 0 1,Hiperboloide hiperbólico, reglado o de una hoja.> implicitplot3d(subs(x0=1,Q4),x1=-10..10,x2=-10..10,x3=-10..10,axes=normal,grid=[20,20,20]);
Ejercicio 5> Q5:=3*x0^2-12*x1^2-4*x2^2-5*x0*x1+4*x0*x2+3*x0*x3+14*x1*x2+4*x1*x3-2*x2*x3;
Q5 3 x02 12 x12 4 x22 5 x0 x1 4 x0 x2 3 x0 x3 − − − + + := 14 x1 x2 4 x1 x3 2 x2 x3 + + −
> a00:=coeff(Q5,x0,2): a11:=coeff(Q5,x1,2): a22:=coeff(Q5,x2,2): a33:=coeff(Q5,x3,2): a01:=coeff(coeff(Q5,x0,1),x1,1): a02:=coeff(coeff(Q5,x0,1),x2,1): a03:=coeff(coeff(Q5,x0,1),x3,1): a12:=coeff(coeff(Q5,x1,1),x2,1): a13:=coeff(coeff(Q5,x1,1),x3,1): a23:=coeff(coeff(Q5,x2,1),x3,1):
> A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]); A_00:=submatrix(A,2..4,2..4):
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥
3-52
232
-52
-12 7 2
2 7 -4 -132
2 -1 0
> simplify(evalm(X&*A&*X));
3 x02 12 x12 4 x22 5 x0 x1 4 x0 x2 3 x0 x3 − − − + + 14 x1 x2 4 x1 x3 2 x2 x3 + + −
> det(A);
0
> rank(A);
2La cuádrica tiene una recta de puntos singulares.> factor(subs(x0=1,Q5));
−( )− − + 3 4 x1 2 x2 ( ) − + + 2 x2 3 x1 1 x3La recta de puntos singulares es la recta intersección de los planos:> Plano1:=-3-4*x1+2*x2; Plano2:=2*x2-3*x1+1+x3;
:= Plano1 − − + 3 4 x1 2 x2 := Plano2 − + + 2 x2 3 x1 1 x3
> Pi1:=implicitplot3d(Plano1,x1=-10..10,x2=-10..10,x3=-10..10,axes=normal): Pi2:=implicitplot3d(Plano2,x1=-10..10,x2=-10..10,x3=-10..10,axes=normal):
> display({Pi1,Pi2});
Ejercicio 6> Q6:=x1^2+6*x0*x1-x0^2+x2^2-10*x0*x2;
:= Q6 + − + − x12 6 x0 x1 x02 x22 10 x0 x2> a00:=coeff(Q6,x0,2): a11:=coeff(Q6,x1,2): a22:=coeff(Q6,x2,2): a33:=coeff(Q6,x3,2): a01:=coeff(coeff(Q6,x0,1),x1,1): a02:=coeff(coeff(Q6,x0,1),x2,1): a03:=coeff(coeff(Q6,x0,1),x3,1):
a12:=coeff(coeff(Q6,x1,1),x2,1): a13:=coeff(coeff(Q6,x1,1),x3,1): a23:=coeff(coeff(Q6,x2,1),x3,1): A:=matrix(4,4,[a00,a01/2,a02/2,a03/2,a01/2,a11,a12/2,a13/2, a02/2,a12/2,a22,a23/2,a03/2,a13/2,a23/2,a33]); A_00:=submatrix(A,2..4,2..4):
:= A
⎡
⎣
⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥
-1 3 -5 03 1 0 0
-5 0 1 00 0 0 0
> det(A); rank(A);
03
> eigenvalues(submatrix(A,2..4,2..4));
, ,1 1 0Cilindro parabólico.Tiene un punto singular.> solve(convert(evalm(X&*A),set));
{ }, , = x2 0 = x0 0 = x1 0Punto singular:> S:=[0,0,0,1];
:= S [ ], , ,0 0 0 1> implicitplot3d(subs(x0=1,Q6),x1=-5..5,x2=-5..5,x3=-5..5,axes=normal);