exo1.mw

> restart;with(linalg);

Warning, the protected names norm and trace have been redefined and unprotected

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...

>

>

> Exercice 1

>

question a)

> C1:=[2,3,4]:C2:=[-1,-5,-7]:C3:=[3,1,1]:

> tA:=array(1..3,1..3,[C1,C2,C3]):

> A:=transpose(tA);

A := matrix([[2, -1, 3], [3, -5, 1], [4, -7, 1]])

> Gsyst(A,[x,y,z],[9,-4,5]);

L[1],

L[2],

L[3],

L[2],

L[3],

12 = 0

L[1],

PAS DE SOLUTIONS

>

question b)

> C1:=[5,2,3]:C2:=[2,-2,4]:C3:=[3,5,2]:Y:=[-2,0,-10]:

> tA:=array(1..3,1..3,[C1,C2,C3]):

> A:=transpose(tA);

A := matrix([[5, 2, 3], [2, -2, 5], [3, 4, 2]])

> Gsyst_cramer(A,[x,y,z],Y);

L[1],

L[2],

L[3],

L[2],

L[3],

L[3],

L[1],

L[2],

L[1],

question c)

> C1:=[0,-2,-2,1]:C2:=[2,0,-1,-2]:C3:=[2,1,0,2]:Y:=[a,b,c,d]:

> tA:=array(1..3,1..4,[C1,C2,C3]):

> A:=transpose(tA);

A := matrix([[0, 2, 2], [-2, 0, 1], [-2, -1, 0], [1, -2, 2]])

> Gsyst(A,[x,y,z],Y);

L[2], ", L[1], matrix([[-2*x, 0, z], [0, 2*y, 2*z], [-2*x, -y, 0], [x, -2*y, 2*z]]), "=", matrix([[b], [a], [c], [d]])" align="center">

L[1],

L[3],

L[4],

L[2],

L[3],

L[4],

L[4], ", L[3], matrix([[x, 0, -1/2*z], [0, y, z], [0, 0, 9/2*z], [0, 0, 0]]), "=", matrix([[-1/2*b], [1/2*a], [d+1/2*b+a], [c-b+1/2*a]])" align="center">

L[3],

c-b+1/2*a = 0

L[1],

L[2],

question d)

> C1:=[2,4,1,2]:C2:=[-14,-10,2,-2]:C3:=[7,5,-1,1]:

> C4:=[-7,-5,1,-1]:C5:=[11,7,-2,1]:Y:=[-1,1,1,1]:

> tA:=array(1..5,1..4,[C1,C2,C3,C4,C5]):

> A:=transpose(tA);

A := matrix([[2, -14, 7, -7, 11], [4, -10, 5, -5, 7], [1, 2, -1, 1, -2], [2, -2, 1, -1, 1]])

> Gsyst(A,[x,y,z,t,u],Y);

L[1],

L[2],

L[3],

L[4],

L[2],

L[3],

L[4],

C[3], ", C[4], matrix([[x, -7*y, -7/2*t, 7/2*z, 11/2*u], [0, y, 1/2*t, -1/2*z, -5/6*u], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), "=", matrix([[(-1)/2], [1/6], [0], [0]])" align="center">

C[3], ", C[5], matrix([[x, -7*y, 11/2*u, 7/2*z, -7/2*t], [0, y, -5/6*u, -1/2*z, 1/2*t], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), "=", matrix([[(-1)/2], [1/6], [0], [0]])" align="center">

C[4], ", C[5], matrix([[x, -7*y, 11/2*u, -7/2*t, 7/2*z], [0, y, -5/6*u, 1/2*t, -1/2*z], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), "=", matrix([[(-1)/2], [1/6], [0], [0]])" align="center">

0 = 0

0 = 0

L[1],

question e)

> C1:=[2,-1,0,0]:C2:=[-1,2,-1,0]:C3:=[0,-1,2,-1]:

> C4:=[0,0,-1,2]:Y:=[5,10,10,5]:

> tA:=array(1..4,1..4,[C1,C2,C3,C4]):

> A:=transpose(tA);

A := matrix([[2, -1, 0, 0], [-1, 2, -1, 0], [0, -1, 2, -1], [0, 0, -1, 2]])

> Gsyst_cramer(A,[x,y,z,t],Y);

L[1],

L[2],

L[2],

L[3],

L[3],

L[4],

L[4],

L[3],

L[2],

L[1],

question f)

> C1:=[1,2,0,0]:C2:=[-1,-2,0,0]:C3:=[2,1,-1,1]:

> C4:=[0,-1,1,1]:Y:=[a,b,c,d]:

> tA:=array(1..4,1..4,[C1,C2,C3,C4]):

> A:=transpose(tA);

A := matrix([[1, -1, 2, 0], [2, -2, 1, -1], [0, 0, -1, 1], [0, 0, 1, 1]])

> Gsyst(A,[x,y,z,t],Y);

L[2],

C[2], ", C[3], matrix([[x, 2*z, -y, 0], [0, -3*z, 0, -t], [0, -z, 0, t], [0, z, 0, t]]), "=", matrix([[a], [b-2*a], [c], [d]])" align="center">

L[2],

L[3],

L[4],

C[3], ", C[4], matrix([[x, 2*z, 0, -y], [0, z, 1/3*t, 0], [0, 0, 4/3*t, 0], [0, 0, 2/3*t, 0]]), "=", matrix([[a], [-1/3*b+2/3*a], [c-1/3*b+2/3*a], [d+1/3*b-2/3*a]])" align="center">

L[3],

L[4],

d+1/2*b-a-1/2*c = 0

L[2],

L[1],

>