Axel Vogt

5821 Reputation

20 Badges

20 years, 222 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

[37.6324, -0.356503], [-39.4716, 0.365055], to be refined with Digits=50 ...

@rlopez you might consider to show the worksheet as an extra post here at MaplePrimes

@sursumCorda You might ask that as a question ... it could be a license issue. I do not expect to have full access to the NAG libraries through Maple

It is about https://en.wikipedia.org/wiki/Integer_programming and the original question might have adressed just that with a somewhat more clear statement instead of obfuscating the function in Maple code and indicating that the dimension might be higher.

In general that is a NP complete problem, https://en.wikipedia.org/wiki/List_of_NP-complete_problems

But why a general purpose system like Maple should solve it ...

@vv Yes (where I find 1/(sin(x) -1 ) more interesting.

Anyway the most simple way to avoid the bug is to convert a floating point matrix to rationals

Still not clear. And no answer to "why?". This is my last post to this thread, hope it helps:

# https://www.mapleprimes.com/questions/236774-How-Can-Yeild--Two-Polynomial-Ideals

restart; randomize(): with(PolynomialIdeals): #kernelopts(version);

M:=proc(m::posint)
local P,X,B, p1,p2, L1, L2, i;
P:=Matrix(m);
X:=Vector(m, symbol=x);
B:=LinearAlgebra:-RandomVector(m);
L1,L2:=LinearAlgebra:-RandomVector(m),LinearAlgebra:-RandomVector(m);
[seq(1 .. m)];
p1,p2:=combinat:-randperm(%),combinat:-randperm(%);
for i from 1 to m do
  P[i,p1[i]]:=1*L1[i];
  P[i,p2[i]]:=1*L2[i];
end do;
convert(P.X - B, list); # return a list
end proc:

m:=3: # dimension
J:=PolynomialIdeal( op(M(m)) );
'IsZeroDimensional(J)': '%'=%; #IsMaximal(J);

POLYNOMIALIDEAL(-90*x[1]+11*x[2]-21, -9*x[1]+63*x[3]+77, -91*x[2]-20*x[3]+40, characteristic = 0, variables = {x[1], x[2], x[3]}, known_groebner_bases = (table( [ ] )))

 

PolynomialIdeals:-IsZeroDimensional(J) = true

(1)

Groebner:-Basis(J,'tord'): sort(%);

[517950*x[1]+75733, 5755*x[2]-4102, 57550*x[3]+71541]

(2)

 

Download MP_236774.mw

@MDD 

Please state in clear words what you want (at least input and output), at least for me it is still not clear.

PS: and *why* you are looking at that problem?

@MDD 

For me it is not clear what you really want to do, if you do not accept epostma's answer. You also might say *why* you want that.

Also note that <x^2,y^2> is zero dimensional but perhaps not what you want.

Just copy from MS Word to a text editor like MS Notepad. There it will loose all additional formattings. And then from there copy to a worksheet.

@acer thumbs up !

@madhav123 find a suggestion attached


 

# https://www.mapleprimes.com/questions/236672-Plot-The-Value-Of-Determinant-Vs-Omega#comment295966
# https://www.mapleprimes.com/view.aspx?sf=295966_Answer/Shear_coefficient_-_Papers_ac_-_transfer_matrix.mw

 

 restart

Digits := 15

kernelopts(version); Digits := 25; kernelopts(floatPi = true)

`Maple 2023.0, X86 64 WINDOWS, Mar 06 2023, Build ID 1689885`

 

25

(1)

Inputs

   

 

more inputs

   

``

``

FINAL := Matrix([[Z11, Z12], [Z21, Z22]]):

#map(indets,FINAL, symbol);
#map(length, FINAL); # the 2 x 2 matrix is very large, about 60 Mio length for each entry

MF:=evalf(FINAL):

 

detF:=proc(r)
local M;
if r::numeric then
  M:=subs(omega=evalf(r), MF);
  M:=evalf(M);
  LinearAlgebra:-Determinant(M);
else return 'procname'(r)
end if;
end proc:

# some test values
detF(1);

137274848186216319761.602

(2)

plot(detF, 0 .. 200, numpoints=3);

 

r0:=fsolve(detF, 110 .. 120);
detF(r0);

112.2574846861608078683748

 

-0.1e-2

(3)

# do some visual check
#plot(detF, r0 * 0.99 .. r0 * 1.01, numpoints=3);

 

 

 


 

Download MP_236672.mw

@madhav123 you already defined omega=115 at the beginning. Hence the final 2*2 Matrix has constant entries

That works for me, Maple 2023 on Win 7 and Maple 2021 on Win 11.

In such a case I would de-install and re-install again, taking care for the selected directory.

Likewise one can do it as follows: use an operator form

Plot_determinant_value_vs_omega_ac_AVt.mw
 

restart

NULL

kernelopts(version); Digits:=10; # or 15 ... will use hardware floats
kernelopts(floatPi=true): # default, but just in case ...

`Maple 2021.2, X86 64 WINDOWS, Nov 23 2021, Build ID 1576349`

 

10

(1)

input

   

``

NULL

NULL

M:=map(collect, FINAL, omega): #map(length, M);
G:=Determinant(M)/10.0^77:
#G:=sort(G):
g:=unapply(G, omega):

plot(evalf[16]@g, 0 .. 200);

 

 

NULL


 

Download Plot_determinant_value_vs_omega_ac_AVt.mw

@mmcdara Try to not mind - that is quite common in almost all forums, a kind of twitter-and-whatsup-communication style ... meanwhile I ignore any question with too many typos or slang

2 3 4 5 6 7 8 Last Page 4 of 207