Items tagged with roots roots Tagged Items Feed

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

I am having 26th degree polynomial univariate equation , I used Isolate to get the roots. but I am getting some extra roots which are not true they I even tried to substitute those roots in original equation then I got non zero answer instead of getting nearly zero answer.How is it possible??

 

equation looks like:

-12116320194738194778134937600000000*t^26+167589596741213731838990745600000000*t^24+1058345691529498270472972795904000000*t^22-4276605572538658673086219419648000000*t^20-23240154739806540070988490473472000000*t^18-5442849111209103187871341215744000000*t^16+49009931453396028716875310432256000000*t^14+74247033158233643322704589225984000000*t^12-2762178990802317464801412907008000000*t^10-25947900993773120244883450232832000000*t^8-7468990043547273070742668836864000000*t^6-567730116675454293925108383744000000*t^4+3703566799705707258760396800000000*t^2-4742330812072533924249600000000

Solutions i got:

[t = -4.162501845, t = -2.295186769, t = -1.300314688, t = -.8048430445, t = -0.6596008501e-1, t = -0.4212510777e-1, t = 0.4212510777e-1, t = 0.6596008501e-1, t = .8048430445, t = 1.300314688, t = 2.295186769, t = 4.162501845]

t=4.162501845 give me non zero answer when I substitute it in the equation given above:

I got this answer: 4.750212083*10^39

 

Hi there,

            Recently, I encountered a problem. I have a function( omega as its variable)  (18)

 gamma*sqrt(4)*sqrt(omega^2*C2^2*R4^2/(C2^4*R4^4*beta^2*gamma^2*omega^4+C2^2*(1+gamma^2*(beta+1)^2-2*gamma)*R4^2*omega^2+1))

I tried to find a point where its first derivative equals 0. In this case, Maple returned four solutions. In my

question, both beta, gamma, R4 and C2 >0, I want it to return a real positive solution, the first term

in (19) (i.e. 1/(sqrt(beta *gamma) *1/R4 C2).

 

I know it is easy to find out the positive real roots in this case. This question seems to make no sense.

However, sometime I came across an expression complicated enough that I cannot tell whether it is real

positive.

Is there a approach to find a real positive solution of an symbolic eqution?

Thanks in advance!

 

                                                                     A University student in BeiHang University, Beijing

how i can calculate roots of the characteristic polynomial equations {dsys and dsys2}
and dsolve them with arbitrary initial condition for differennt amont of m and n?
thanks
Kr.mw

restart; a := 1; b := 2; Number := 10; q := 1; omega := 0.2e-1
``

Q1 := besselj(0, xi*b)*(eval(diff(bessely(0, xi*r), r), r = a))-(eval(diff(besselj(0, xi*r), r), r = a))*bessely(0, xi*b):

J := 0:

m := 0:

U1 := (int(r*K1[m]*(diff(K_01[m], r)+K_01[m]/r), r = a .. b))/(int(r*K1[m]^2, r = a .. b)); -1; U2 := -(int(r*K_01[m]*(diff(K1[m], r)), r = a .. b))/(int(r*K_01[m]^2, r = a .. b)); -1; U3 := (int(r^2*omega^2*K_01[m], r = a .. b))/(int(r*K_01[m]^2, r = a .. b))

0.6222222222e-3/K_01[12]

(1)

Q2 := besselj(1, eta*b)*(eval(diff(bessely(1, eta*r), r), r = a))-(eval(diff(besselj(1, eta*r), r), r = a))*bessely(1, eta*b):

E2 := unapply(Q2, eta):

m := 0:

 
dsys := {diff(S_mn(t), t, t, t)+xi[m]^2*(diff(S_mn(t), t, t))+(-U1*U2+eta__n^2)*(diff(S_mn(t), t))+xi[m]^2*eta__n^2*S_mn(t) = -(2*U2*b_m/(Pi*xi[m])*(-besselj(0, xi[m]*b)/besselj(1, xi[m]*a)))*q+xi[m]^2*U3}; 1; dsolve(dsys)

{S_mn(t) = (3111111111/5000000000000)/(K_01[12]*eta__n^2)+_C1*cos(eta__n*t)+_C2*sin(eta__n*t)+_C3*exp(-xi[12]^2*t)}

(2)

dsys2 := {diff(Q_mn(t), t, t, t)+xi[m]^2*(diff(Q_mn(t), t, t))+(-U1*U2+eta__n^2)*(diff(Q_mn(t), t))+xi[m]^2*eta__n^2*Q_mn(t) = -2*besselj(0, xi[m]*b)*U1*U2*b_m*(1-exp(-xi[m]^2*t))/(besselj(1, xi[m]*a)*Pi*xi[m]^3)}; 1; dsolve(dsys2)

{Q_mn(t) = _C1*exp(-xi[12]^2*t)+_C2*sin(eta__n*t)+_C3*cos(eta__n*t)}

(3)

``

 

``



Download Kr.mw

 

Dear all,

I have a question: how to compute the roots of exp(z) = -1 with z in C? 

I tried: 

fsolve( exp(z) = -1, z, complex );

But it only gives one root (0.1671148658e-3+4.934802220*10^9*I) which does not even seem to be correct. I would prefere smth like z_n = I*(2*n-1)*pi or at least multiple roots...

By using

solve(exp(x) = -1, x);

it returns I*Pi.

 

MATLAB MuPAD gives the desired result:


solve(exp(x) = -1, x)

(PI*I + 2*PI*k*I, k in Z)

 

 

Thanks!

when the kummerM function equal to 0?????

or

-(((beta*eta^2-(1/2)*beta+1)*p^2-(1/2)*beta^3)*KummerM((1/4)*((-beta+2)*p^2-beta^3)/p^2, 1, beta*eta^2)+(1/2)*KummerM((1/4)*((-beta+6)*p^2-beta^3)/p^2, 1, beta*eta^2)*((beta-2)*p^2+beta^3))*exp(-(1/2)*beta*eta^2)/(p^2*beta)=0

how solve this equation unitage beta?

What is the easiest way to ask roots of a polynomial on a finite field. For example asking roots of x^2+xy+y on GF(8)? I was thinking to run a two for on members of GF(8) and ask to check it but I couldn't do it using Galois package or maybe I couldn't use that package. Thanks for any help.

Hello,

I would like to plot a vertical line each time my function is null and is increasing.

Here an extract of my code:

v:=unapply(H*sin(w*t),t);
L:=0.080;
H:=0.020;
Vf:=0.3;
w:=10;
fsolve(v(t)=0,t=0.5..2);
zeros:=Roots(v(t),t=0.5..2);

vdot:=unapply(diff(v(t),t),t);
map(vdot,zeros);
LignesVerticales=implicitplot(x=To complete, colour=yellow,linestyle=3, thickness=2):

With Roots function, I could obtain the zero-crossings.

With the derative of the functions, I could obtain a vector which gives me when the derivative is positive or not.

I would like now to obtain the list of the zero-crossing values which are increasing but I have difficulties to obtain it. 

By list manipulation, it should be easy to do. 

May you help to plot obtain this list so that I can plot the desired vertical lines?

Thank you for your help

I'm trying to create a routine to perform the test of rational roots , but I'm having some problems. Below is the routine I created :

But the program is only printing " aux = -24 " . I don't know what it can be .

I need to modify my code , but I don't know where. Can someone help me? Thank you!

hw2_unfinished.mw

There is something wroung with the t0.

How to correct it?

can anyone please help me to find roots of (2*cos(0.5*x)*sin(0.5*x)*cos(3.775*x)+2.2075*((cos(0.5*x))^2)*sin(3.775*x)-0.453*((sin(0.5*x))^2)*sin(3.775*x)=0 ?

i type on maple like this:

solve(2*cos(0.5*x)*sin(0.5*x)*cos(3.775*x)+2.2075*((cos(0.5*x))^2)*sin(3.775*x)-0.453*((sin(0.5*x))^2)*sin(3.775*x)=0);

but it said the solutions may have been lost

thanks before

Hi,

 

I am trying to find the roots of Hankel function H1(2, z)?

 

j := 1;
for i from 0 to 10 do z0 := i*step+z_min; x[j] := fsolve(f = 0, z = z0, complex) end do;


for p to 10 do for j from p+1 to 9 do if `and`(Re(x[j])-Re(x[p]) < 0.1e-4, Im(x[j])-Im(x[p]) < 0.1e-4) then for i from j to 10 do x[i] := x[i+1] end do; p := p-1; break end if end do end do;

 

the first of these two processes works fine however the second does not. The second on is to get rid of same value solutions! I am not sure if I have missed anything and also is there a way to determine a max value in the complex domain and use it in a for loop?

 

 

any help would be great 

Hi,

I'm relatively new to using Maple.

I'm looking for information on how the "factor" function works. I printed its definition, and it refers to "factor/factor" and I can't find any more information on this. I'd like to know so that I could have more trust that it works correctly. Specifically, I'd like to be able to believe that if it does not factor a cubic, then the cubic is irreducible.

I'm specifically looking for rational roots of cubic polynomials. The "solve" function seems to work, and gives me the roots in terms of square roots, cubic roots and rationals. I have no idea why I should believe that "type(x,rational)" would work when the description of "x" is quite complicated.

Does anyone know anything about how "factor" works, or how "type" works when testing whether an expression evaluates to a rational number? Any information would be much appreciated.

 

Thanks,
Matt

I'm have used a program to find the roots of a function 

 

f:=x*cos(x)-sin(x)*sin(x/1000);
/ 1 \
x cos(x) - sin(x) sin|---- x|
\1000 /

x_max:=50; x_min:=-50; step:=2; i_max:=(x_max-x_min)/step;
50
-50
2
50

j:=1:
for i from 0 to i_max by 1 do
x0:=x_min+i*step;
x[j]:=fsolve(f=0,x=x0);
j:=j+1;
end:

 

and my output was of the form of multiple "potential" roots and a bunch of which are the same. So I tried to get rid of the ones which were the same before actually finding the ones which ARE roots. To do that I done....

 

 

j := 1; for j to 50 do if x[j]-x[j+1] = 0 then ignore(x[j]) else print(x[j]) end if end do:

 

and it got rid of the ones which are of the above form but some roots are the same and seperated by more than 1 ... i.e x[ j ]= x[j + 2] or some other number. 

 

Basically I am trying to generalise the above for loop for all "numbers" instead of 1 but when I try some things the for loop doesnt like it. 

Any help would be good!

 

 

1 2 3 4 Page 1 of 4