Steve
Steve

Reputation: 859

Eigenvalues calculation in Maxima

Let's say I have matrix A in following form

enter image description here

then I have matrix C in following form

enter image description here

and finally matrix L in following form

enter image description here

My goal is to find the formulas for the elements of the matrix L so that the eigenvalues of the matrix A-LC will be "K" times greater than the eigenvalues of the matrix A. The "K" is a parameter.

I have started with the definitions of the matrices:

A: matrix(
 [-a,0,b,c], 
 [0,a,-c,b], 
 [d,0,-e,-1], 
 [0,d,1,-e]
);

C: matrix(
 [1,0,0,0], 
 [0,1,0,0]
);

L: matrix(
 [l1,-l2], 
 [l2,l1], 
 [l3,-l4], 
 [l4,l3]
);

Then I have found the formula for the characteristic polynomial of the matrix A (its roots are the eigenvalues of the matrix A)

char_pol_system : ratsimp(expand(charpoly(A, x)));
x^4+2*e*x^3+(e^2-2*b*d-a^2+1)*x^2+((-2*b*d-2*a^2)*e-2*c*d)*x-a^2*e^2+(c^2+b^2)*d^2-a^2

and I have also found the formula for the characteristic polynomial of the matrix (A-LC) (its roots are the eigenvalues of the matrix A-LC). The requirement that the eigenvalues of the matrix (A-LC) has to be "K" times greater than the eigenvalues of the matrix A is reflected by following substitution y = Kx

char_pol_observer : subst((K*x), y, ratsimp(expand(charpoly(A-L.C,y))));
K^4*x^4+K^3*(2*l1+2*e)*x^3+K^2*(2*c*l4+2*b*l3+l2^2+l1^2+4*e*l1+e^2-2*b*d-a^2+1)*x^2+K*((2*b*l2+2*c*l1+2*c*e-2*b)*l4+(-2*c*l2+2*b*l1+2*b*e+2*c)*l3+2*e*l2^2+2*c*d*l2+2*e*l1^2+(2*e^2-2*b*d+2)*l1+(-2*b*d-2*a^2)*e-2*c*d)*x+(c^2+b^2)*l4^2+((2*b*e+2*c)*l2+(2*c*e-2*b)*l1)*l4+(c^2+b^2)*l3^2+((2*b-2*c*e)*l2+(2*b*e+2*c)*l1+(-2*c^2-2*b^2)*d)*l3+(e^2+1)*l2^2+(2*c*d*e-2*b*d)*l2+(e^2+1)*l1^2+(-2*b*d*e-2*c*d)*l1-a^2*e^2+(c^2+b^2)*d^2-a^2

So I have two polynomials in x. My idea how to find the formulas for the unknowns l1 - l4 was to write down the equations based on comparison of the coefficients at the same powers of x.

My question is:

  1. how can I eliminate the K^4 coefficient at the highest power of x in the second polynomial?
  2. how can I write the equations based on comparison of the coefficients at the same powers of x in both polynomials?

Upvotes: 2

Views: 329

Answers (1)

Cem
Cem

Reputation: 1296

To eliminate K^4, divide by K^4:

normalized: expand(char_pol_observer / K^4);

To equate the coefficients, first find the the difference of two polynomials:

difference: char_pol_system - normalized;

Then equate the coefficient of each power of x to 0. You can get the coefficients of x^n using ratcoef.

system_of_eqns: makelist(ratcoef(difference, x, n) = 0, n, 3, 0, -1);

You can find l1 from the first equation (coefficient of x^3), but other equations are not linear in l2, l3, l4. algsys fails to find a solution. Solving them one by one for each variable and substituting could maybe give a closed formula for the other variables.

Upvotes: 1

Related Questions