numerical approximation of complex number
I am attempting to evaluate a matrix multiplication, then extract 4 specific cells from the resultant matrix and create a new 2x2 matrix with these 4 specific cells. I then need to calculate the points at which the determinant of the 2x2 matrix equals zero. This is to solve the resonant frequency of transverse vibration of a beam. My attempt at doing this:
e,f,g,h,i,j,k,l,m,n,o,p,g,r,s,t=var('e,f,g,h,i,j,k,l,m,n,o,p,g,r,s,t'); var("w", domain="complex"); a=4; b=8; c=32/3; d=4; m1=1; m2=m1/2; x=m1*(w); y=m2*(w); F=matrix([[1,a,b,c],[0,1,d,b],[0,0,1,a],[0,0,0,1]]); M1=matrix([[1,0,0,0],[0,1,0,0],[0,0,1,0],[x,0,0,1]]); M2=matrix([[1,0,0,0],[0,1,0,0],[0,0,1,0],[y,0,0,1]]); ([[e,f,g,h],[i,j,k,l],[m,n,o,p],[q,r,s,t]])=F*M1*F*M1*F*M1*F*M2; A=matrix([[o,p],[s,t]]); B=A.determinant(); C=solve(B==0,w); numerical_approx(C)
Sagemath returns an error since there are complex numbers.
I require numerical solutions.
apologies if the question is unclear, I have zero programming background, this is for my engineering dissertation.
Any help is appreciated.