I start with a simple Maxima question, the answer to which can give an answer to the actual problem that I am facing.
A related simple question: How can I get the maximum values for the calculation: bfloat ((1 +% i) ^ 0.3); Could there be an option option that can be set so that it evaluates to a complex number?
Actual question: When estimating the approximations for the numerical integration of time for finite element methods, I use spectral analysis for this purpose, which requires the calculation of the eigenvalues of the 4 × 4 matrix. This “cav” matrix is also calculated within the maximums using some of the possibilities of the maximum algebra, but supporting numerical values, so that the matrix is completely numerical, i.e. Contains no variables. I calculated the eigenvalues with Mathematica and returns 4 real eigenvalues. However, Maxima computes terribly complex expressions for this case, which apparently do not “know” how to simplify, even numerically, like “bigfloat”. Perhaps this problem arises because Maxima first approximates the “cac” matrix by rational numbers (ie, Fractions),and then tries to completely solve the problem, instead of just using bigfloat numerical calculations. Can i change this?
Note that if you only change the input gzv value to say 0.5, it works fine and returns the numerical values of complex eigenvalues.
I include the code below. Please note that all the code before "cav: subst (vs, ca) $" is only for defining the cav matrix and seems to work fine. It is in several statements after this that he cannot calculate the numerical values for the eigenvalues.
v1:v0+ (1-gg)*a0+gg*a1$
d1:d0+v0+(1/2-gb)*a0+gb*a1$
obf:a1+(1+ga)*(w^2*d1 + 2*gz*w*(d1-d0)) -
ga *(w^2*d0 + 2*gz*w*(d0-g0))$
obf:expand(obf)$
cd:subst([a1=1,d0=0,v0=0,a0=0,g0=0],obf)$
fd:subst([a1=0,d0=1,v0=0,a0=0,g0=0],obf)$
fv:subst([a1=0,d0=0,v0=1,a0=0,g0=0],obf)$
fa:subst([a1=0,d0=0,v0=0,a0=1,g0=0],obf)$
fg:subst([a1=0,d0=0,v0=0,a0=0,g0=1],obf)$
f:[fd,fv,fa,fg]$
cad1:expand(cd*[1,1,1/2-gb,0] - gb*f)$
cad2:expand(cd*[0,1,1-gg,0] - gg*f)$
cad3:expand(-f)$
cad4:[cd,0,0,0]$
cad:matrix(cad1,cad2,cad3,cad4)$
gav:-0.05$
ggv:1/2-gav$
gbv:(ggv+1/2)^2/4$
gzv:1.1$
dt:0.01$
wv:bfloat(dt*2*%pi)$
vs:[ga=gav,gg=ggv,gb=gbv,gz=gzv,w=wv]$
cav:subst(vs,ca)$
cav:bfloat(cav)$
evam:eigenvalues(cav)$
evam:bfloat(evam)$
eva:evam[1]$