Question: Finding the root corresponding to maximum absolute value

Hi,

I have to find the root of an equation corresponding to the maximum absolute value. I am using root finding package to get all the roots. But after getting all the roots i am not able to apply abs function. Maple sheet is attached.

restart

with(plots):

with(LinearAlgebra):

with(DEtools):

with(ColorTools):

Digits := 30

30

(1)

x := proc (t) options operator, arrow; x0*exp(lambda*t) end proc:

phi := proc (t) options operator, arrow; phi0*exp(lambda*t) end proc:

eqm1 := collect(simplify(coeff(expand(diff(x(t), `$`(t, 2))+(2*0)*beta*(diff(x(t), t))+0*x(t)+n*psi*(-v*(phi(t)-phi(t-2*Pi/(n*omega0)))+x(t)-x(t-2*Pi/(n*omega0)))), exp(lambda*t))), {phi0, x0})

(-n*psi*v+n*psi*v*exp(-2*lambda*Pi/(n*omega0)))*phi0+(lambda^2+n*psi-n*psi*exp(-2*lambda*Pi/(n*omega0)))*x0

(2)

eqm2 := collect(simplify(coeff(expand(diff(phi(t), `$`(t, 2))+(2*0)*(diff(phi(t), t))+phi(t)+n*(-v*(phi(t)-phi(t-2*Pi/(n*omega0)))+x(t)-x(t-2*Pi/(n*omega0)))), exp(lambda*t))), {phi0, x0})

(-n*v+n*v*exp(-2*lambda*Pi/(n*omega0))+lambda^2+1)*phi0+(n-n*exp(-2*lambda*Pi/(n*omega0)))*x0

(3)

mode := simplify(evalc(Re(evalc(subs(lambda = I*Omega, solve(subs(x0 = m*phi0, eqm1), m)))))^2+evalc(Im(evalc(subs(lambda = I*Omega, solve(subs(x0 = m*phi0, eqm1), m)))))^2)

-2*n^2*psi^2*v^2*(-1+cos(2*Omega*Pi/(n*omega0)))/(Omega^4-2*Omega^2*n*psi+2*Omega^2*n*psi*cos(2*Omega*Pi/(n*omega0))+2*n^2*psi^2-2*n^2*psi^2*cos(2*Omega*Pi/(n*omega0)))

(4)

A, b := GenerateMatrix([eqm1, eqm2], [x0, phi0])

A, b := Matrix(2, 2, {(1, 1) = lambda^2+n*psi-n*psi*exp(-2*lambda*Pi/(n*omega0)), (1, 2) = -n*psi*v+n*psi*v*exp(-2*lambda*Pi/(n*omega0)), (2, 1) = n-n*exp(-2*lambda*Pi/(n*omega0)), (2, 2) = -n*v+n*v*exp(-2*lambda*Pi/(n*omega0))+lambda^2+1}), Vector(2, {(1) = 0, (2) = 0})

(5)

with(RootFinding):

eq := subs(n = 6, psi = 1000, omega0 = 1.15, v = 0.1e-1, Determinant(A))

6000.94*lambda^2-5999.94*exp(-.289855072463768115942028985507*lambda*Pi)*lambda^2+lambda^4+6000-6000*exp(-.289855072463768115942028985507*lambda*Pi)

(6)

zeros := RootFinding:-Analytic(eq, lambda, re = 0 .. 400, im = -200 .. 200)

0.899769545162895563524511282265e-56, 0.813609592584011756247655681635e-1-20.6993361029378520006643410260*I, .242743338419727199544214811606-34.4961764258358768825593120288*I, .440964962950043888796944083291-100.074138054178692973033664525*I, .107710271188082726666762251538-106.954651646879437684160623413*I, 1.12290283496379505456476079030-62.0290638297730162295171014475*I, .879463466045683309032252293625-93.2168861049771086211729407830*I, 2.54860869821265794971735119535-80.1919866273564551209847942490*I, 1.52678990439144770439544731898-86.4450560720567958301493690195*I, 2.62945288424037545703549470125-75.0161229879790946191171617450*I, 1.68779005203728587549371003511-68.8012471850312399391042105550*I, .776570081405504740452992339900-55.1681878011205261920670466495*I, 0.851171007270465178285429398270e-9+1.00000500045406723708450960132*I, 0.851171007270465178285445699470e-9-1.00000500045406723708450960133*I, 0.874874719902730972066854301075e-2-6.89997772561385443312823760560*I, 0.354201863215292148351069041542e-1-13.7998152076043523748759861636*I, .369195444156713173497807954493-41.3921704506707022569621870947*I, .540047057129385026999638567235-48.2843908783769449582520027744*I, .149078330738225743331408017894-27.5982749361891156626731068484*I, .369195444156713173497807954500+41.3921704506707022569621870948*I, .440964962950043888796944083291+100.074138054178692973033664525*I, .107710271188082726666762251538+106.954651646879437684160623413*I, 1.12290283496379505456476079030+62.0290638297730162295171014475*I, .879463466045683309032252293625+93.2168861049771086211729407830*I, 2.54860869821265794971735119535+80.1919866273564551209847942490*I, 1.52678990439144770439544731898+86.4450560720567958301493690195*I, 2.62945288424037545703549470125+75.0161229879790946191171617450*I, 1.68779005203728587549371003511+68.8012471850312399391042105550*I, .776570081405504740452992339900+55.1681878011205261920670466495*I, 0.813609592584011756247655681660e-1+20.6993361029378520006643410260*I, 0.354201863215292148351069041261e-1+13.7998152076043523748759861634*I, 0.874874719902730972066854301075e-2+6.89997772561385443312823760560*I, .540047057129385026999638567235+48.2843908783769449582520027744*I, .242743338419727199544214811602+34.4961764258358768825593120288*I, .149078330738225743331408017894+27.5982749361891156626731068484*I

(7)

"zeros.select(int 1)"

Error, missing operation

"zeros.select(int 1)"

 

``


Download question.mw

I will be really thankful for the help.

Regards

Sunit

Please Wait...