Items tagged with maxima

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

Hello :-),

 

How can I differentiate the follwing function:

Cq = Cao*k1*t / [(1+k1*t)*(1+k2*t)]

If want to find the maximum:

dCq/dt = 0

I can solve if of course by hand. The solution is t=1/sqrt(k1*k2)

I tried it with maple, but I got a strange result (see picture). How can I use maple to get the right result?

 

Thank you very much!

 

I need to find the local maxima and minima of f(x,y)=x(x+y)*e^(y-x). I have tried to look for an appropriate method that I could use to achieve this, but got stuck. I also don't quite understand the math behind tying to obtain the local maxima and  minima for a function of this type.

Find the derivative of f(x)=|(x^3)-8*(x^2)+5*x+4|-0.5*x;x in [-1,7]

Find critical points of f(x) and dertimine the local maxima and local minima.

Output: Two lists of points (x,y), a list of local minima and a list of local maxima.

Hint: you may use Maple package Student[Calculus1]]

     use first derivative test to avoid 'kink' point i.e. undifferentiable point

     set delta=0.0001, test derivative around critical point x+delta and x-delta...

Hello,

The Maxima package has a function RATWEIGHT that can be used to assign weights to variables:

Function: RATWEIGHT (v1, w1, ..., vn, wn)assigns a weight of wi to the variable vi. This causes a term to be replaced by 0 if its weight exceeds the value of the variable RATWTLVL [default is FALSE which means no truncation]. The weight of a term...

Mazimize only gives me the first maximum it finds. I want to find all maximums in an interval, or just the largest NUMERICALLY. is there a workaround?

While doing some Maple plotting I found myself asking why a high-end scientific computation application like Maple, which is capable of essentially very high ("arbitrary") precision floating-point computation, sometimes makes only crude use of hardware precision plot drivers. I looked around a bit, and found that and related issues are not restricted to Maple.

Let's look first at Maxima. Here's my first example, in Maxima (not Maple) syntax,

Page 1 of 1