Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

 

 

a) Given real values 𝑟1,𝑟2,𝑟3>0, consider the curve of the positive part of the circle with radius 𝑟1+ 𝑟2+𝑟3 and center at the origin and three semi-circles below with radii 𝑟1,𝑟2,𝑟3 so that they are arranged from left to right like the following graph. Define proper functions and plot this graph in Maple for 𝑟1=10,𝑟2=2,𝑟3=8. 

Hey everyone,

Got another Symbolic question here that I have no idea how to begin. Please help again.

Question: 

Note that if i is an integer then convert(i,base, 2) will convert i to a binary list (the binary representation of i in reverse order). Then you may use list_to_set to convert  this list to a set. Note that if i runs from 0 to 2^n-1 then list_to_set(convert(i,base,2) )  will run through all subsets of {1, 2, . . ., n}. 

(a) Use this idea to make your own procedure PowerSet which will given n,  produce the powerset of {1, 2, . . . , n}. Show by several examples that your procedure works. For your examples you should get nops(PowerSet(n)) = 2^(n). Check that this is the case.
 
(b) Use this idea to make a procedure RandSet which given n produces a random subset of {1, 2, . . . , n}. [Use rand to produce a random integer in the range 0..2^n-1 and then convert it to a subset of {1, 2, . . . , n}.]  Do NOT use PowerSet or powerset. Show by examples that it works for small n such as 5, 10, and 20 as well as for large n such as 100. It will even work for n = 1000, but the output will be rather large. On average a random subset of {1,2,...,n} will contain n/2 elements.

Again, please help me with this and thank you in advance. Your assistance is appreciated.

Hi all,

First-time poster here. Got a question for Symbolic Computations and don't know how to do it. Please help me out.

Here is the question: 

There is a one-to-one correspondence between subsets of {1, 2, . . . , n} and binary lists of length n, that is, lists L = [x1, x2 , . . . , xn] where x1, x2, . . . , xn are elements of the set {0,1}.  The correspondence is given by associating to the set S the list L where xi = 1 if i is in S and 0 if not. For example, the set {1,3,5} corresponds to the list [1,0,1,0,1,0,0] if n = 7.

(a) Write a procedure list_to_set whose input is a binary list and whose output is the corresponding set. E. g., list_to_set([1,0,1,0,1]) will return the set {1,3,5}. Note that nops(L) is the length of a list.

(b) Write a procedure set_to_list whose input is a pair S,n where S is a subset of {1, 2, . . . , n} and n is a positive integer and whose output is the binary list of length n corresponding to the set S. E. g., if n = 5 then set_to_list({1,3,5},5) will return [1,0,1,0,1].

(c) Show by a few tests that each procedure works. Then apply set_to_list to each set in the powerset of {1, 2, 3, 4} to form all binary lists of length 4. Make a program to print out a table of the following form. (But the order need not be the same as that started below.)

   [0,0,0,0] <-->  {  }
   [1,0,0 0] <--> { 1 }
   [0,1,0,0] <--> { 2 } 
    ........
    etc

Some extra commas in the output is okay. You may obtain the power set of the set {1,2,...,n} by the command powerset(n); but you must first load the package combinat.

Please let me know if there are any questions. Thank you in advance.

I want to do min max algebra in maple but dont know how to start. What package is required . Can anyone help me. 

Non-Linear overdetermined equations - which is best method? with less number of iterations

When I use Jacobi it takes 25 iterations.

Any other method which takes less iterations?

I search saveplot and sleep function here

i had kept close filename function and move plot setup default to first line

but thread no sleep in maple 12

then I remove sleep and can save image file

but after I call it in a function and run a for loop for this function

the file is not updated after sleep 3 seconds 

how to run a for loop call it and it can refresh 

I'm very new to Maple (and coding in general). I'd like to know a very large coefficient of a certain 𝑞-series involving the Dedekind 𝜂-function. For example

s:=series(subs(q=q^6, eta^4), q, N);

where eta := series(q^(1/24)*product(1 - q^n, n = 1 .. 100), q, N). I know the command coeftayl(s, q=0, N) but for certain 𝑞-series it doesn't recognize the numerical value of this coefficient when 𝑁 is too large (even after subtracting the principal part of 𝑠, if there is any) - instead it realizes the coefficient as a HUGE limit of something. Cheers.

what is the wrong in this operations for isentropic process ( isentropic-process) 

 

Restart: with(RealDomain) : interface(dispalyprecision=4) : ; Isentropical := proc(N,v) local K,PTR,KM1,KP1,GO, M,MS,C,PPT,TTT,RRT,AAS,eq,o ; K : = G() : KM1 : = k - 1 : KP1 : = K + 1 : GO := 1 : If N=1 then M := v Elif N=2 then PPT := v : M := sqrt ( 2 * (PPT^(-KM/K) -1 ) : Elif N=3 then MS := v : M := sqrt ( 1 / (KP1/ (2*MS^2) –KM1/2 ) : Elif N=4 then C := v : M := sqrt ( 2 / (KM1* (1 /(C^2) -1 )) ) : Elif N=5 then TTT := v : M := sqrt ( 2 * (1/TTT-1 ) / KM1 : Elif N=6 then RRT := v : M := sqrt ( 2 * (1/RRT^KM1 -1 ) / KM1 : Elif N=7 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,0..1) : GO :=2 : Elif N=8 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,1..infinity) : GO :=2 : Fi:fi GO<>2 then ASS := (2 *(1+ KM1*M^2/2/KP1) ^ (KP1/ (2*KM1)) /M fi: PTR := (1+ KM1*M^2/2/KP1) : PPT := PTR^(-K/KM1) : TTT:=PTR^ (-1) : RRT:+PTR^(-1/KM1) : If N <> 3 then MS := sqrt ( KP1 / ( 2 / ( M^2)+KM1) ) If N <> 3 then C := sqrt( 1 / (2 / (KM1*M^2) + 1 ) ) O := evalf([m,1./PPT,MS,C,1./TTT,1./RRT,AAS]) end : irp := proc (N, v) local f; f:=Isentropic1(N,v) : printf(cat(`% 9.4f `$7, ` \ n`) , f[ii$ii=1..7]) end : G := ( ) -> 1.4 : For mi form .1 to .5 do irp(1.mi) od : > > > Eq := table( [ (M2) = M2 , (MS2) = (K+1) /2 (2 / ( M2)+ (K-1) ) (C2) = 1 / (2 / (K-1)*M2+1 ) (PP0) = (1+(K-1)*M2/2)^(-K/(K-1) ) (RR0) = (1+(K-1)*M2/2)^(-1/(K-1) ) (TT0) = (1+(K-1)*M2/2)^(-1) (AAS) = (2 *(1 +(K-1)*M2/2 ) / (K+1) )^( (k-1) /(2*(k-1)))/ squt(M2) ]) : if vL=M then M2v := solve ( M2 -Eq[M2 ] , M2 ) : M2v := eval(M2v ,M2 = VR^2 ) : elif vL=MS then M2v := solve( M2 -Eq[MS2 ] , M2 ) : M2v := eval(M2v ,MS2 = VR^2 ) : elif vL=C then M2v := solve( M2 -Eq[C2 ] , M2 ) : M2v := eval(M2v ,C2 = VR^2 ) : elif vL=PP0 then M2v := solve( M2 -Eq[PP0] , M2 ) : M2v := eval(M2v ,PP0 = VR ) : elif vL=RR0 then M2v := solve( M2 -Eq[RR0] , M2 ) : M2v := eval(M2v ,RR0 = VR ) : elif vL=TT0 then M2v := solve( M2 -Eq[TT0] , M2 ) : M2v := eval(M2v ,TT0 = VR ) : elif vL=AASsub then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=0..1 : elif vL=AASup then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=1..infinity : fi: Eqsva1 := eva1(Eq, M2 = M2v) : Eqava1 [M] := sqrt(EqsVa1[M2] ) : Eqsva1[MS] := sqrt(EqsVa1[MS2] ) : Eqava1 [C] := sqrt(EqsVa1[C2] ) : 1var := [M, MS, C, PP0, RR0, TT0, AAS] : [seq(1var[i]=EqsVA1[1var[i] ] , I=1…nope(1var))] end: Egs :=[M=0.5, MS=0.53452, C=0.2182, P0P=0.84302, RR0=0.88517, TT0=0.95238, AASsub=1.33985, AASsup=0.95238] : For i from 1 to nops(Egs) do print(I,Isentropic2(Egs[i])) od : (process)

What is the problem with the initialconsiditions that caused this error?

"Error, (in dsolve/numeric/DAE/initial) missing initial conditions for the following: {Integer}"

Thanks.

 Dear all

Is there a nice idea to determine the Lyapunov function of the following system

Lyapunov_function.mw

Some parameters used in the code:

b fixed parameter

a any parameter in R

Many thanks for your help

 

 

I was trying to learn more about the commands in this package and found it to be someone non satisfying:


 

Download sockets_strangeness.mw

 

У меня есть код для активации Maple, но я не знаю какой имя сервера которое у меня требует для активации.

 I'd like to get all at most 15 vertices Non-isomorphic  connected  bipartite graphs. One way is to use the function NonIsomorphicGraphs(k, output = graphs, outputform = graph, restrictto = connected).

with(GraphTheory):

k:=8;
s1:=[NonIsomorphicGraphs(k,restrictto = connected,output=graphs,outputform=graph)]:
bipartitegraph:=select[flatten](x->IsBipartite(x)=true, s1):
nops(bipartitegraph);

But when k=9, it is slow, I doubted that the code 

By Checking out the encyclopedia,http://oeis.org/A033995 , we knew the following number of bipartite graphs datas of , at most 14, they are not many(the datas contain  no-connected conditions)

 

so I read the help document about  

awesome.

Ps: I know  in SageMath  we can get all bipartite graphs quikly even though n>=10  by  using the 

for g in graphs.nauty_geng('-c -b 10 -g'):
 
But I hope it can be realized in Maple. 

Thanks!

 

I am thinking of running maple in google cloud. Does Maplesoft available in google cloud

First 74 75 76 77 78 79 80 Last Page 76 of 2097