Items tagged with linearalgebra

Feed

plot3d of procedure Sievert correctly displays the constant curvature Sievert surface, but the procedure uses the deprecated command evalm.

What Maple 2016 statement(s) would create the same value of X in Sievert?

Sievert := proc (B)

local a, b, denom, m, X;

a := sinh(B)*u; b := cosh(B)*v;

denom := sinh(B)*((cosh(2*a)-cos(2*b))*cosh(2*B)+2+cosh(2*a)+cos(2*b));

m := cosh(B)*[sinh(a), sin(b)*cos(v), sin(b)*sin(v)]+[0, -cos(b)*sin(v), cos(b)*cos(v)];

X := evalm([u, 0, 0]-8*cosh(B)*cosh(a)*m/denom);

end proc:

plot3d(Sievert(.75), u = -2.5 .. 2.5, v = -10.5 .. 10.5, scaling = constrained, grid = [30, 100], style = patch, shading = xy, lightmodel = light3, orientation = [-3, 140], title = "Sievert's surface", titlefont = [Courier, bold, 14]);

how to calculate basis <1,4,0>, <1,0,4> for eigenvalue 2;

how to calculate basis <1,0,1> for eigenvalue -1;

with(LinearAlgebra):
A := Matrix([[-2,1,1],[0,2,0],[-4,1,3]]);

sys1 := Eigenvalues(A)[1]*IdentityMatrix(3)-A;

sys1 := Eigenvalues(A)[2]*IdentityMatrix(3)-A;
sys1 := Eigenvalues(A)[3]*IdentityMatrix(3)-A;

 

B:=[<sys1[1,1],sys1[2,1],sys1[3,1]>,<sys1[1,2],sys1[2,2],sys1[3,2]>,<sys1[1,3],sys1[2,3],sys1[3,3]>,<0,0,0>];
LinearAlgebra:-Basis(B);

but not <1,4,0>, <1,0,4> for eigenvalue 2


 

I solve a mechanical exercise but i had a problem.

I know M (mass) and K (stifness) matrices (4x4).

I want to solve the (λ2M+K)v=0  eigenvalue problem, where λ are the eigenvalues and v eigenvectors.

How can i solve this problem.  I tried with the Eigenvectors() command but it didn't give the right solution.

The Eigenvalues are okay, but the eigenvectors not

K := Matrix([[4*10^7,-1.50*10^7,2*10^7,0],[-1.50*10^7,1.50*10^7,0,1.50*10^7],[2*10^7,0,8*10^7,2*10^7],[0,1.50*10^7,2*10^7,4*10^7]]);

M:=Matrix([[121.90,99.048,-91.429,0],[99.048,594.29,0,-99.048],[-91.429,0,243.81,-91.429],[0,-99.048,-91.429,121.90]]);

w1,w2:=Eigenvectors(K,M);

Acoording with the book the right eigenvectors(shape mode) are:

[0.013 991,  0.034 233,  0.073 683,  0.090 573]
[0.035 637, 0, -0.032 213, 0]
[0 ,-0.034 233, 0, 0.090 573]
[-0.013 991, 0.034 233, -0.073 683, 0.090 573]

Thank you
 

hi.i cant write english very well. excuse me

i solve the Eigenvectors of two matrix. first i want to delete complex numbers in solve. and then sort the little vector in first matrix of vector. as this picture

1.mw

 

code

k__1 := (12*2)*10^6/3^3; k__2 := k__1; k__3 := (3*1.5)*10^6/3^3; k__4 := (12*1.5)*10^6/3^3; k__5 := 12*10^6/3^3; m__1 := 8000; m__2 := 7000; m__3 := 6000; m__4 := 5000; m__5 := 10000; K := Matrix(5, 5, [[k__1+k__2, -k__2, 0, 0, 0], [-k__2, k__2+k__3, -k__3, 0, 0], [0, -k__3, k__3+k__4, -k__4, 0], [0, 0, -k__4, k__4+k__5, -k__5], [0, 0, 0, -k__5, k__5]]); M := Matrix(5, 5, [[m__1, 0, 0, 0, 0], [0, m__2, 0, 0, 0], [0, 0, m__3, 0, 0], [0, 0, 0, m__4, 0], [0, 0, 0, 0, m__5]])

hello. i want to write this function with  "for"loop. but i don't know
1.mw

How to write a code find fundamental matrix of the following Matrix?

restart; with(LinearAlgebra): A:=Matrix([[0, 1, 0, 0], [-a, 0, b, 0], [0, 0, 0, 1], [c, 0, -d, 0]]);eigenvectors(A);

where a,b,c,d∈IR.

I want to find eigenvalues and eigenvectors and then want to calculate e^( λ i)*ri  where λi's are eigenvalues, ri's are eigenvectors of A for i=1,2,3,4  respectively.

Then, I want to calculate Wronskian of the matrix which consists of vectors e^(λi)*ri in the columns. Could you help me?

See: Fundamental Matrix

hello . how can i get 7 given parameters(b1,a1,b1,a2,b2,.....) in this equation with maple. thanks

 

 

 

1.mw

How do you recommend to calculate the square root of big Matrices (e.g, 300*300) with Maple??

My machine couldnt calculate the square root of Matrices (9*9) as you see below:


 

``

restart

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

with(LinearAlgebra):

``

A := Matrix([[1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9]])

A := Matrix(9, 9, {(1, 1) = 1, (1, 2) = 2, (1, 3) = 3, (1, 4) = 4, (1, 5) = 5, (1, 6) = 6, (1, 7) = 7, (1, 8) = 8, (1, 9) = 9, (2, 1) = 9, (2, 2) = 8, (2, 3) = 7, (2, 4) = 6, (2, 5) = 5, (2, 6) = 4, (2, 7) = 3, (2, 8) = 2, (2, 9) = 1, (3, 1) = 1, (3, 2) = 2, (3, 3) = 3, (3, 4) = 4, (3, 5) = 5, (3, 6) = 6, (3, 7) = 7, (3, 8) = 8, (3, 9) = 9, (4, 1) = 9, (4, 2) = 8, (4, 3) = 7, (4, 4) = 6, (4, 5) = 5, (4, 6) = 4, (4, 7) = 3, (4, 8) = 2, (4, 9) = 1, (5, 1) = 1, (5, 2) = 2, (5, 3) = 3, (5, 4) = 4, (5, 5) = 5, (5, 6) = 6, (5, 7) = 7, (5, 8) = 8, (5, 9) = 9, (6, 1) = 9, (6, 2) = 8, (6, 3) = 7, (6, 4) = 6, (6, 5) = 5, (6, 6) = 4, (6, 7) = 3, (6, 8) = 2, (6, 9) = 1, (7, 1) = 1, (7, 2) = 2, (7, 3) = 3, (7, 4) = 4, (7, 5) = 5, (7, 6) = 6, (7, 7) = 7, (7, 8) = 8, (7, 9) = 9, (8, 1) = 9, (8, 2) = 8, (8, 3) = 7, (8, 4) = 6, (8, 5) = 5, (8, 6) = 4, (8, 7) = 3, (8, 8) = 2, (8, 9) = 1, (9, 1) = 1, (9, 2) = 2, (9, 3) = 3, (9, 4) = 4, (9, 5) = 5, (9, 6) = 6, (9, 7) = 7, (9, 8) = 8, (9, 9) = 9})

(1)

MatrixFunction(A, sqrt(v), v)

Error, (in LinearAlgebra:-MatrixFunction) could not compute finite interpolating value by evaluation of (1/2)/v^(1/2) at eigenvalue 0 which has multiplicity greater than one in the minimal polynomial

 

``

``

``

``

``


 

Download askkk.mw

I have many linear equations as below(f,g,h,...,p, are linear of S,T,..,W):

y1=f(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

y2=g(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

y3=h(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

.

.

.

yn=p(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

Where (i,j)=(0,0),...,(I,J)

How ask Maple to write them in Matrix form as below:

AX=0

Where X is: X=Transpose{S[0,0],S[0,1],S[0,J],...,S[1,0],S[1,1],...,S[1,J],...,S[I,0],S[I,1],...,S[I,J],

                        T[0,0],T[0,1],T[0,J],...,T[1,0],T[1,1],...,T[1,J],...,T[I,0],T[I,1],...,T[I,J],...,W[I,J]}

    

Dear Maple experts,

I am struggling with a difference between the symbolic and numerical solution of an eigendecomposition of a symmetric positive definite matrix. Numerically the solution seems correct, but the symbolic solution puzzles me. In the symbolic solution the reconstructed matrix is different from the original matrix (although the difference between the original and the reconstructed matrix seems to be related to an unknown scalar multiplier.

restart;
with(LinearAlgebra);
Lambda := Matrix(5, 1, symbol = lambda);
Theta := Matrix(5, 5, shape = diagonal, symbol = theta);
#Ω is the matrix that will be diagonalized.
Omega := MatrixPower(Theta, -1/2) . Lambda . Lambda^%T . MatrixPower(Theta, -1/2);
#Ω is symmetric and in practice always positive definite, but I do not know how to specify the assumption of positivess definiteness in Maple
IsMatrixShape(Omega, symmetric);

# the matrix Omega is very simple and Maple finds a symbolic solution
E, V := Eigenvectors(Omega);

# this will not return the original matrix

simplify(V . DiagonalMatrix(E) . V^%T)

# check this numerically with the following values.

lambda[1, 1] := .9;lambda[2, 1] := .8;lambda[3, 1] := .7;lambda[4, 1] := .85;lambda[5, 1] := .7;
theta[1, 1] := .25;theta[2, 2] := .21;theta[3, 3] := .20;theta[4, 4] := .15;theta[5, 5] := .35;

The dotproduct is not always zero, although I thought that the eigenvectors should be orthogonal.

I know eigenvector solutions may be different because of scalar multiples, but here I am not able to understand the differences between the numerical and symbolic solution.

I probably missed something, but I spend the whole saturday trying to solve this problem, but I can not find it.

I attached both files.

Anyone? Thank in advance,

Harry

eigendecomposition_numeric.mw

eigendecomposition_symbolic.mw

Hi Maple Community,

I just got my Maple licence and currently I'm going thorugh some basic tutorials in which I've encountered a problem I can't seem to fix:

I'm trying to use the 'LinearSolve' solver as it is shown in the examples on the Maplesoft.com support page: