MaplePrimes Questions

Hi

I have a problem with calculating complex numbers in Maple.

I type forexample 8(cos(Pi/2)+I*sin(Pi/2)) and I get 8, I should get 8I

Should I re-install Maple or edit my settings?

best regards

Hi everybody,how can I solve these equations in Maple and plot the answers? tnx...

eq1 := diff(x(t), t) = 35*(y-x)

eq2 := diff(y(t), t) = -x*z-7*x+28*y

eq3 := diff(z(t), t) = x*y-3*z

Hi Dear All,

 

I need to extract the coordinates from spacecurve commend. For example;

 

h3:=spacecurve([-x,-y,z],omega=ws..0,color=green,thickness=5):
h4:=spacecurve([-x,y,z],omega=ws..0,color=blue,thickness=5):

Where, omega is a parameter difinening x, y, z.

Hello Everyone;

Hope you are fine. I have set of following ODE's;

Every variable has two ODE's. I need to take one ODE for each variable. Is that any way?
I am waiting for your kind response.

Thanks

Question2.mw

The solution from LPSolve shown in the worksheet below is displayed very weirdly:

  1. The first element is rounded to 3 significant digits.
  2. The variable indices have decimal points.
  3. Zeros are displayed as just decimal points with no digit 0.

Closer inspection (with, say, lprint) will reveal that the weirdness is only with the prettyprinting; the actual entries are as expected.
 

restart:

<(kernelopts,interface)(version), interface~([prettyprint, typesetting])[]>;

Vector(4, {(1) = `Maple 2022.1, X86 64 WINDOWS, May 26 2022, Build ID 1619613`, (2) = `Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`, (3) = 2, (4) = extended})

(a,b,c):= (2,4,5):

X:= Matrix((a,b), symbol= x):
Y:= Matrix((b,c), symbol= y):
Z:= Matrix((a,c), symbol= z):

RegionC:= <5, 15, 8, 10, 15>:

RegionA:= <90, 75>:

RegionB:= <35, 20, 30, 15>:

Cost1:= <
    2, 1, 3/2,   3;
  5/2, 2, 7/2, 3/2
>:

Cost2:= <
    3/2, 4/5, 1/2, 3/2,   3;
      1, 1/2, 1/2,   1, 1/2;
      1, 3/2,   2,   2, 1/2;
    5/2, 3/2, 3/5, 3/2, 1/2
>:

Cost3:= <
    11/4, 7/2, 5/2, 3,   5/2;
       3, 7/2, 7/2, 5/2, 2
>:

Cost__Total:= (add@(add@`*`~)~)([Cost||(1..3)], [X,Y,Z]):

CapB:= add(X[i], i= 1..a) <=~ RegionB:

CapA:= add(<X|Z>[..,j], j= 1..b+c) <=~ RegionA:

ReqC:= add(<Y,Z>[i], i= 1..a+b) >=~ RegionC:

InEqOutB:= add(<X, -Y^%T>[i], i= 1..a+c) =~ 0:

Cons:= seq~({CapA, CapB, ReqC, InEqOutB}):

Sol:= Optimization:-LPSolve(Cost__Total, Cons, assume= nonnegative);

[103.800000000310, [x[1, 1] = HFloat(0.0), x[1, 2] = HFloat(20.000000000344205), x[1, 3] = HFloat(7.999999999311598), x[1, 4] = HFloat(0.0), x[2, 1] = HFloat(0.0), x[2, 2] = HFloat(0.0), x[2, 3] = HFloat(0.0), x[2, 4] = HFloat(15.000000000688408), y[1, 1] = HFloat(0.0), y[1, 2] = HFloat(0.0), y[1, 3] = HFloat(-1.7763568394002505e-15), y[1, 4] = HFloat(0.0), y[1, 5] = HFloat(0.0), y[2, 1] = HFloat(0.0), y[2, 2] = HFloat(15.0), y[2, 3] = HFloat(5.000000000344206), y[2, 4] = HFloat(0.0), y[2, 5] = HFloat(0.0), y[3, 1] = HFloat(5.000000000000002), y[3, 2] = HFloat(0.0), y[3, 3] = HFloat(0.0), y[3, 4] = HFloat(0.0), y[3, 5] = HFloat(2.9999999993115956), y[4, 1] = HFloat(0.0), y[4, 2] = HFloat(0.0), y[4, 3] = HFloat(2.9999999996557944), y[4, 4] = HFloat(0.0), y[4, 5] = HFloat(12.000000000688413), z[1, 1] = HFloat(0.0), z[1, 2] = HFloat(0.0), z[1, 3] = HFloat(0.0), z[1, 4] = HFloat(0.0), z[1, 5] = HFloat(0.0), z[2, 1] = HFloat(0.0), z[2, 2] = HFloat(0.0), z[2, 3] = HFloat(0.0), z[2, 4] = HFloat(10.0), z[2, 5] = HFloat(0.0)]]

 

 

Download BadLPSolveDisp.mw

I am reading some expressions from file.

In the file, it is written as GAMMA(-1,x). When read into Maple using the read file command, it shows as  1/x*Ei(2,x)

I know these are the same mathematically. But I am translating these expressions to sagemath. in sagemath, Ei only accepts one argument.

Now the translator sees Ei in the input, then it keeps it as Ei as it does not know it was the GAMMA with two arguments,  which gives an error when used by sagemath since sagemath only has the one argument version of Ei.

If Maple would keep GAMMA(-1,x) as is, then the translator will just translate it to gamma(-1,x) which works in sage.

To keep things simple, I was wondering if there an option to tell Maple to keep the input as GAMMA(-1,x) and not rewrite to Ei?

Otherwise I would have to now parse each Ei to see if it is the two argument version or the one argument version, and use gamma  for the 2 argument version to keep sage happy which will complicate things for me. 

expr:=GAMMA(-1,x)

               Ei(2, x)/x

Maple 2022.1

restart;
with(plots);
with(plottools);
Vdot := proc (U, V)local i: add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:
ngon := n -> local i; [seq([cos(2*Pi*i/n), sin(2*Pi*i/n)], i = 1 .. n)]:
theta := (2*Pi)/5;
poly := [seq([cos(k*theta), sin(k*theta)], k = 1 .. 5), datatype = float];
Ii := [0, 1/2]:
H := [-1/4, 0]:
r := dist(Ii, H):
theta := (2*Pi)/5:
p1 := pointplot([seq([cos(k*theta), sin(k*theta)], k = 0 .. 5)], symbol = solidcircle, color = red, symbolsize = 10):
p2 := textplot([seq([cos(k*theta), sin(k*theta), cat("M", k)], k = 0 .. 4)], align = ["above", "right"]):
cir1 := circle([0, 0], 1/2, color = green,dashdot:):
cir2 := circle([-1/4, 0], r, color = black):
cir3:=circle([0,0],1,color=red):
display([p1, p2, cir1, cir2, cir3,polygonplot(poly, thickness = 5, color = blue, transparency = 0.95)], axes = normal);
Why this error , Thank you.

I am trying to rotate a region about the y-axis. However, entering axis=vertical rotates it about the z-axis. I have also tried interchanging the x and y values. However, it produces the same output. The left image is what I'd like to rotate about the y-axis. The code below is for the right image. How would I revolve this region about the y-axis? Please help.

VolumeOfRevolution(2*x^2 + 1, x = 0 .. 1, labels = [x, y, z], output = plot, axis = vertical, orientation = [270, 0, 90])

 

I am transitioning from Mathcad to Maple, and I am currently working on some code to do a Gage R&R study using ANOVA. The attached math is from the 4th edition of the MSA manual. I got it to work in Mathcad, although I had to adjust things since Mathcad does not support 3D matrices.

My input matrix is a 2D matrix in which each cell contains a vector of measurements. In Maple, I seem to be able to make a 3D array with my data (if it is easier).

I have searched for a couple days for the right syntax. I am able to get the "right" number for SSA using my 2D Mathcad matrix--at least it is really close--but the other varibles are woefully off.

I would appreciate it if someone could at least point me in the right direction. Thanks.

Jno.

Hello Everyone;Hope you are fine. I am trying to convert the nonlinear system of ODE's into matric form using the following comand but not working it.

 

Kindly help me to do this. The cose is pasted and also attached. I am waiting for your kind response.

Thanks.

Question1_NEW.mw


 

restart; with(PDEtools, Solve); with(LinearAlgebra); with(plots); with(plottools); printlevel := 2

NULL

ZETA[0] := proc (t) options operator, arrow; 0 end proc:

sys222 := [(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, 800*ZETA[0](t)*C[1, 1](t)*Pi+(3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+4320*ZETA[0](t)*C[1, 2](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

[(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, (3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

(1)

var1 := {C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)};

{C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)}

(2)

f, diffs := eval(GenerateMatrix(`~`[`-`](`~`[rhs](sys222), `~`[lhs](sys222)), var1))

f, diffs := Matrix(6, 6, {(1, 1) = -(3/4)*Pi, (1, 2) = 0, (1, 3) = -(3/16)*Pi, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = -20*Pi, (2, 3) = 0, (2, 4) = -5*Pi, (2, 5) = 0, (2, 6) = 0, (3, 1) = -(3/4)*Pi, (3, 2) = 0, (3, 3) = -(3/4)*Pi, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = -20*Pi, (4, 3) = 0, (4, 4) = -20*Pi, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = -1/3, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -1/3, (6, 5) = 0, (6, 6) = 0}), Vector(6, {(1) = diff(C[1, 1](t), t), (2) = diff(C[1, 2](t), t), (3) = diff(C[2, 1](t), t), (4) = 4320*ZETA[1](t)*C[1, 1](t)*Pi+diff(C[2, 2](t), t), (5) = diff(ZETA[1](t), t), (6) = diff(ZETA[2](t), t)})

(3)

NULL


 

Download Question1_NEW.mw

Hhow can i solve R it says here root of

Calculate.mws

1 - Is there a specefic place to make suggestions for the next revision of Maple Flow 2022?

(As opposed to just blasting them out on the forum)

2 - When entering text in a container...

I hit Ctl+R to switch to Math mode ... but how do I switch back to text mode in the same container?

For instance I hit the space bar for a text container and enter some text...

Then I hit Ctl+R to enter some math like maybe to enter a variable with a subscript...

Then I want to return to text mode in the same container...

How do I do this?

Thanks for any help.

 

Good day.

I am working on a network flow problem that uses a linear programming (simplex) technique.The flow is directed across 3 regions (a, b, and c) and there are 2 nodes within region a, 4 nodes in region b, and 5 nodes in region c.

I wish to determine the minimum cost from regions a to c and from regions b to c that satisfies the requirement of each of the 5 nodes in region c. The objective and constraints are constructed and Maple produces the minimum solution (see attached). While the output is useful when the number of nodes is small, I would like to extend this to a larger-scale case and so the output would need to be more user-friendly / graphic.

I have 2 questions - 

1. Does anyone know a way to attach labels for each region and each node to these solution matrices?
    For instance -  the first matrix, x, specifies a quantity of 2,000 that flows from node #1 in region a to node #2 in region b
2. Is it possible to produce a network graph showing the directed flow from each region and from node to node?

Thanks to all for reading this!

MaplePrimes_Network.mw

I'm displaying several lines of equations that are all pretty similar and sometimes maple changes the order making it look unpleasent. e.g., the equations are essentially of the form a - b and sometimes maple will output -b + a

If I do sort(E) then it prints them all as -b+a and I cannot get this reverse no matter what options I try

I can do op(E) and it breaks up the expression in to terms but add(op(E)) just ends up doing the same out of order expression.

%+`(seq(Reverse([op(E))])));

essentially gives me what I want, surely there is an easier and more robust way?

How do you apply colors to an entire solid of revolution? I can't seem to color the bases of a disk. Please help.

Here is what I have. I would like the entire solid to be the same color,transparency,etc.

v := VolumeOfRevolution(4, x = 1 .. 2, volumeoptions = [color = blue, transparency = 0.6], orientation = [270, 0, 15], view = [0 .. 3, -5 .. 5, -5 .. 5], labels = [x, y, z], output = plot, axis = horizontal, scaling = constrained)

1 2 3 4 5 6 7 Last Page 2 of 2132