Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Here are all non-isomorphic 3-regular vertex-transitive graphs with 62 vertices. I wanted to draw them all at once, but I found that tables cannot use the map function.

with(GraphTheory):
CubicVT[1] := Graph({{23,60}, {37,6}, {36,27}, {61,19}, {60,29}, {2,52},
{40,43}, {23,25}, {45,50}, {1,30}, {11,17}, {13,41}, {34,4}, {11,54}, {26,49}, 
{56,2}, {49,51}, {3,21}, {47,28}, {24,52}, {13,7}, {48,27}, {51,42}, {4,60}, 
{55,45}, {46,21}, {46,38}, {57,14}, {4,31}, {24,8}, {47,20}, {44,5}, {55,43}, 
{30,31}, {18,41}, {17,42}, {46,37}, {36,16}, {8,43}, {58,30}, {17,53}, {25,5}, 
{5,31}, {24,9}, {9,53}, {22,26}, {35,50}, {48,20}, {12,36}, {33,13}, {12,58}, 
{33,29}, {35,14}, {3,19}, {41,42}, {14,10}, {25,21}, {37,32}, {2,48}, {52,10}, 
{61,10}, {57,58}, {38,7}, {3,62}, {29,51}, {35,8}, {39,32}, {49,6}, {1,27}, 
{39,40}, {12,50}, {56,53}, {59,62}, {34,15}, {18,9}, {1,28}, {22,55}, {33,15}, 
{39,7}, {44,57}, {59,38}, {11,26}, {45,54}, {15,59}, {44,19}, {47,62}, {16,54}, {61,20}, {23,6}, {56,16}, {22,32}, {18,40}, {34,28}});

CubicVT[2] := Graph({{39,7}, {18,41}, {11,17}, {22,32}, {46,29}, {24,8},
{18,40}, {44,19}, {55,43}, {23,25}, {45,9}, {46,38}, {59,38}, {13,6}, {39,51}, 
{48,27}, {56,16}, {57,58}, {25,21}, {52,10}, {17,43}, {22,41}, {61,20}, {15,59},
{14,27}, {39,32}, {24,54}, {42,32}, {17,53}, {56,35}, {41,42}, {34,15}, {2,52}, 
{40,43}, {33,13}, {36,10}, {44,28}, {49,6}, {56,2}, {45,54}, {25,15}, {2,50}, 
{58,20}, {61,30}, {57,48}, {48,20}, {47,62}, {35,8}, {37,6}, {13,7}, {4,31}, 
{47,28}, {35,50}, {1,19}, {49,7}, {60,29}, {61,19}, {51,42}, {11,26}, {55,45}, 
{3,4}, {36,27}, {16,54}, {9,53}, {11,40}, {47,5}, {14,10}, {23,59}, {16,8}, 
{5,31}, {24,9}, {12,36}, {3,21}, {62,31}, {22,26}, {33,37}, {57,14}, {46,37}, 
{34,21}, {1,28}, {12,52}, {34,4}, {44,5}, {12,50}, {38,60}, {55,53}, {23,60}, 
{1,30}, {58,30}, {33,29}, {3,62}, {26,18}, {49,51}});

CubicVT[3] := Graph({{23,60}, {37,6}, {38,51}, {36,27}, {61,19}, 
{60,29}, {2,52}, {40,43}, {23,25}, {1,30}, {17,39}, {11,17}, {34,4}, {33,21}, 
{23,7}, {56,2}, {1,10}, {11,8}, {49,51}, {3,21}, {47,28}, {13,7}, {48,27}, 
{25,28}, {51,42}, {55,45}, {13,26}, {46,38}, {57,14}, {4,31}, {24,8}, {44,5}, 
{55,43}, {44,27}, {2,58}, {15,6}, {18,41}, {46,37}, {58,30}, {17,53}, {5,31}, 
{24,9}, {9,53}, {22,26}, {35,50}, {48,20}, {12,36}, {33,13}, {18,54}, {50,53}, 
{24,36}, {33,29}, {3,30}, {41,42}, {14,10}, {25,21}, {20,31}, {12,61}, {52,10}, 
{57,58}, {3,62}, {35,8}, {39,32}, {49,6}, {29,32}, {12,50}, {56,43}, {55,42}, 
{22,9}, {34,15}, {1,28}, {39,7}, {45,52}, {59,5}, {59,38}, {57,47}, {60,62}, 
{11,26}, {37,41}, {35,48}, {45,54}, {15,59}, {44,19}, {47,62}, {16,54}, {46,4}, 
{61,20}, {14,16}, {56,16}, {34,19}, {22,32}, {18,40}, {49,40}});

CubicVT[4] := Graph({{13,9}, {39,7}, {18,41}, {33,28}, {11,17}, {39,8}, 
{22,32}, {24,8}, {18,40}, {44,35}, {44,19}, {55,43}, {23,25}, {46,38}, {59,38}, 
{34,27}, {2,47}, {12,31}, {48,27}, {7,62}, {56,16}, {57,58}, {25,21}, {52,10}, 
{3,10}, {61,20}, {15,59}, {45,58}, {5,6}, {39,32}, {17,53}, {41,42}, {34,15}, 
{2,52}, {59,20}, {48,53}, {40,43}, {38,40}, {33,13}, {49,6}, {56,2}, {45,54}, 
{1,16}, {48,20}, {55,37}, {47,62}, {35,8}, {14,43}, {37,6}, {13,7}, {4,31}, 
{47,28}, {35,50}, {60,29}, {61,19}, {51,42}, {24,61}, {22,50}, {11,26}, {55,45},
{11,36}, {4,51}, {49,54}, {36,27}, {16,54}, {9,53}, {14,10}, {5,31}, {24,9}, 
{12,36}, {21,32}, {3,21}, {18,52}, {22,26}, {15,41}, {56,42}, {17,29}, {57,14}, 
{46,37}, {1,28}, {34,4}, {44,5}, {23,26}, {12,50}, {60,30}, {23,60}, {1,30}, 
{58,30}, {33,29}, {3,62}, {57,25}, {46,19}, {49,51}});

CubicVT[5] := Graph({{39,7}, {18,41}, {11,17}, {22,32}, {24,8}, {18,40},
{44,19}, {56,49}, {55,43}, {23,25}, {52,42}, {2,3}, {14,18}, {59,38}, {46,38}, 
{62,32}, {48,27}, {56,16}, {26,21}, {15,40}, {57,58}, {25,21}, {58,43}, {33,30},
{52,10}, {22,36}, {61,20}, {15,59}, {13,8}, {39,32}, {28,7}, {17,53}, {41,42}, 
{23,17}, {34,15}, {2,52}, {40,43}, {33,13}, {49,6}, {56,2}, {45,54}, {47,16}, 
{25,10}, {12,34}, {61,53}, {5,51}, {48,20}, {39,50}, {47,62}, {35,31}, {35,8}, 
{37,6}, {13,7}, {4,31}, {47,28}, {35,50}, {60,29}, {61,19}, {51,42}, {11,26}, 
{57,60}, {55,45}, {6,19}, {44,24}, {36,27}, {16,54}, {9,53}, {14,10}, {5,31}, 
{24,9}, {12,36}, {11,48}, {3,21}, {22,26}, {29,9}, {57,14}, {46,37}, {1,28}, 
{55,38}, {46,20}, {34,4}, {59,27}, {4,41}, {44,5}, {1,45}, {12,50}, {23,60}, 
{1,30}, {58,30}, {33,29}, {3,62}, {49,51}, {37,54}});

CubicVT[6] := Graph({{39,7}, {57,54}, {18,41}, {11,17}, {22,32}, {24,8},
{18,40}, {44,19}, {55,43}, {11,33}, {23,25}, {4,48}, {46,38}, {59,38}, {12,17}, 
{47,29}, {48,27}, {56,16}, {57,58}, {25,21}, {52,10}, {16,41}, {61,20}, {15,59},
{35,26}, {56,30}, {39,32}, {6,43}, {17,53}, {41,42}, {34,15}, {2,52}, {27,9}, 
{40,43}, {33,13}, {14,62}, {49,6}, {56,2}, {34,49}, {45,54}, {13,3}, {28,52}, 
{48,20}, {47,62}, {35,8}, {7,53}, {37,6}, {13,7}, {4,31}, {47,28}, {35,50}, 
{60,29}, {2,40}, {61,19}, {51,42}, {58,21}, {11,26}, {55,45}, {22,60}, {1,23}, 
{25,39}, {36,27}, {16,54}, {46,18}, {9,53}, {14,10}, {36,5}, {5,31}, {37,31}, 
{24,9}, {12,36}, {24,32}, {55,10}, {8,20}, {15,61}, {3,21}, {44,38}, {22,26}, 
{57,14}, {45,51}, {46,37}, {1,28}, {34,4}, {44,5}, {12,50}, {50,19}, {23,60}, 
{1,30}, {59,42}, {58,30}, {33,29}, {3,62}, {49,51}});

CubicVT[7] := Graph({{27,20}, {57,30}, {24,53}, {19,20}, {37,49}, 
{13,29}, {11,17}, {56,52}, {24,8}, {18,40}, {44,19}, {57,10}, {55,43}, {28,62}, 
{6,51}, {46,38}, {33,7}, {18,42}, {48,27}, {56,16}, {4,5}, {57,58}, {25,21}, 
{11,22}, {12,27}, {25,60}, {61,20}, {44,31}, {62,21}, {15,59}, {17,9}, {39,32}, 
{41,42}, {2,10}, {2,52}, {37,38}, {11,53}, {36,50}, {45,54}, {46,6}, {2,16}, 
{44,61}, {14,58}, {26,32}, {5,19}, {48,61}, {37,6}, {13,7}, {47,28}, {49,42}, 
{35,50}, {3,47}, {12,35}, {4,15}, {23,29}, {55,54}, {34,59}, {55,40}, {1,58}, 
{46,59}, {45,16}, {9,53}, {8,9}, {40,41}, {22,39}, {14,10}, {45,43}, {5,31}, 
{12,36}, {56,54}, {23,21}, {24,35}, {50,8}, {28,30}, {18,43}, {34,31}, {22,26}, 
{7,32}, {3,25}, {14,52}, {15,38}, {26,17}, {34,4}, {1,47}, {33,60}, {23,60}, 
{1,30}, {33,29}, {3,62}, {51,41}, {36,48}, {49,51}, {13,39}});

 

DrawGraph~(CubicVT)

Error, invalid input: GraphTheory:-DrawGraph expects its 1st argument, H, to be of type {GRAPHLN, list(GRAPHLN), set(GRAPHLN)}, but received Graph({{1, 30}, {1, 47}, {1, 58}, {2, 10}, {2, 16}, {2, 52}, {3, 25}, {3, 47}, {3, 62}, {4, 5}, {4, 15}, {4, 34}, {5, 19}, {5, 31}, {6, 37}, {6, 46}, {6, 51}, {7, 13}, {7, 32}, {7, 33}, {8, 9}, {8, 24}, {8, 50}, {9, 17}, {9, 53}, {10, 14}, {10, 57}, {11, 17}, {11, 22}, {11, 53}, {12, 27}, {12, 35}, {12, 36}, {13, 29}, {13, 39}, {14, 52}, {14, 58}, {15, 38}, {15, 59}, {16, 45}, {16, 56}, {17, 26}, {18, 40}, {18, 42}, {18, 43}, {19, 20}, {19, 44}, {20, 27}, {20, 61}, {21, 23}, {21, 25}, {21, 62}, {22, 26}...
Why can lists use the map function, but tables cannot?

DrawGraph~([seq(CubicVT[i],i=1..7)])

tablemap.mw

restart;

with(Physics):with(plots):with(DETools):

sys := {diff(r(t),t)=p(t)/m,
diff(p(t),t)=l^2/(m*r(t)^3)-n*k*r(t)^(n-1),
diff(phi(t),t)=l/(m*r(t)^2)};

{diff(p(t), t) = l^2/(m*r(t)^3)-n*k*r(t)^(n-1), diff(phi(t), t) = l/(m*r(t)^2), diff(r(t), t) = p(t)/m}

(1)

sys1:=subs({n=1,k=1},sys);

{diff(p(t), t) = l^2/(m*r(t)^3)-1, diff(phi(t), t) = l/(m*r(t)^2), diff(r(t), t) = p(t)/m}

(2)

conv:=plottools:-transform((a,b)->[a*cos(b),a*sin(b)]):

p1:=DEplot(sys1,[r(t),phi(t)],t=0..30,r=0..10,phi=0..2*Pi,stepsize=0.01);

Error, (in DEtools/DEplot) system must have same number of dependent variables as DE's.

 

plots:-display([conv(p1)],axiscoordinates=polar);

Error, (in conv) invalid argument

 

 


Could you help how to fix the code?

Download DEplot_v1.mw

Hello everyone

I create a curved space ( with Physics) and create a metric tensor of 

a sphere . I see some Christoffel correcly . Is it possible to visualize all non zero Christoffel in one shot ?

Thank's a lot

Best Regards

restart; with(Physics)

Physics:-Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

Physics:-Setup(spacetimeindices, dimension = 2, signature = "++")

[dimension = 2, signature = `+ +`, spacetimeindices = greek]

(2)

Physics:-Coordinates(X)

{X}

(3)

ds2 := Physics:-`^`(dx1, 2)+Physics:-`*`(Physics:-`^`(sin(x1), 2), Physics:-`^`(dx2, 2))

dx1^2+sin(x1)^2*dx2^2

(4)

NULL

Physics:-Setup(metric = ds2)

[metric = {(1, 1) = 1, (2, 2) = sin(x1)^2}]

(5)

NULL

NULL

g_[]

g[mu, nu] = (Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 2) = sin(x1)^2}, storage = triangular[upper], shape = [symmetric]))

(6)

Physics:-Christoffel[`~k`, i, j]

Physics:-Christoffel[`~k`, i, j]

(7)

Physics:-Christoffel[`~1`, 2, 2]

-sin(x1)*cos(x1)

(8)

Physics:-Christoffel[`~2`, 1, 2]

cos(x1)/sin(x1)

(9)

Physics:-Christoffel[`~1`, 1, 1]

0

(10)

Download Approfondimento_1_-_Calcolo_Sfera_2D.mw

I have JPG images and plots from a CAD code and from Matlab. I want to insert them into a Maple worksheet and do the following:

      1. Resize the images or plots while preserving aspect ratio

      2. Add a figure number and caption to the image or plot.

          I would prefer automatic numbering if that is available in Maple.

          I would also prefer to have the caption "linked" to the image or plot so that they can be moved together

I assumed that these kinds of tools were available in Maple, but I sure cannot find them. Any help will be greatly appreciated.

Thanks, Neill Smith

I just downloaded maple 2021 (I get i free from my school). I used maple for the last 4 years but, now when i opdatede to maple 2021 from version 2020, its just keep freezing i have try to uninstall 3 times by now and it still keep freezing.

Hi.

plot([cos(t), sin(t), t = 0 .. 2*Pi]) give a nice circle.

but

plot([cos(t), sin(t), t = 0 .. 2*Pi*10000])

have the whole circle filled.

Is this a bug or expected behavior?

Thanks.

Huajun

That is to say, a generalized map
E.g., here is a nested list: 

nl := [[[[s, t]], [u, [v, w]]], [[x, [y, z]]]]:

We can use map to apply the mapped function F to "each operand" (i.e., the first‐level parts) of : 

:-map(F, nl);
 = 
         [F([[[s, t]], [u, [v, w]]]), F([[x, [y, z]]])]

But in Mathematica, we can make further explorations: 

In[1]:= nl = {{{{s, t}}, {u, {v, w}}}, {{x, {y, z}}}}; 

In[2]:= Map[F, nl, {1}] (*Maple's result*)

Out[2]= {F[{{{s, t}}, {u, {v, w}}}], F[{{x, {y, z}}}]}

In[3]:= Map[F, nl, {2, -2}]

Out[3]= {{F[{F[{s, t}]}], F[{u, F[{v, w}]}]}, {F[{x, F[{y, z}]}]}}

In[4]:= Map[F, nl, {-3, 3}]

Out[4]= {{F[{F[{s, t}]}], F[{F[u], F[{v, w}]}]}, {F[{F[x], F[{y, z}]}]}}

In[5]:= Map[F, nl, {0, \[Infinity]}, Heads -> \[Not] True]

Out[5]= F[{F[{F[{F[{F[s], F[t]}]}], F[{F[u], F[{F[v], F[w]}]}]}], F[{F[{F[x], F[{F[y], F[z]}]}]}]}]

Note that the last case has been implemented in Maple as MmaTranslator[Mma][MapAll]:  

MmaTranslator:-Mma:-MapAll(F,nl);
 = 
   F([F([F([F([F(s), F(t)])]), F([F(u), F([F(v), F(w)])])]), 

     F([F([F(x), F([F(y), F(z)])])])])

Naturally, how to reproduce the other two results in Maple programmatically? (The output may not be easy to read or understand; I have added an addendum below.)

Addendum. It is also possible to display in "tree" structure (like dismantle) manually: 

`[]`
(
    `[]`
    (
        `[]`
        (
            `[]`
            (
                s
            ,
                t
            )
        )
    ,
        `[]`
        (
            u
        ,
            `[]`
            (
                v
            ,
                w
            )
        )
    )
,
    `[]`
    (
        `[]`
        (
            x
        ,
            `[]`
            (
                y
            ,
                z
            )
        )
    )
)

As you can see, the "depth" of  is five (0, 1, 2, 3, and 4), while the classical map just maps at the first "level". (Moreover, such descriptions may lead to a confusion.)

Supplement. Unfortunately, there remains a bug in the MmaTranslator[Mma][Level]. Compare: 

MmaTranslator:-Mma:-Level(nl, [4]); (*Maple*)
                             [v, w]

MmaTranslator:-Mma:-Level(nl, [-1]); (*Maple*)
          [s, t, u, v, w, x, y, z, -1, x, c, r, y, 2]

In[6]:= Level[nl, {4}] (*Mathematica*)

Out[6]= {s, t, v, w, y, z}

In[7]:= Level[nl, {-1}] (*Mathematica*)

Out[7]= {s, t, u, v, w, x, y, z}

Hey guys.

I want to replace _Z1, _Z2 and _B2 with n but it doesn't work. Can anyone help?

An example is attached.

Regards,

Oliveira

Example3.mw

I have noticed this before few times. I wonder if others have seen it.

When I have Maple open, (with may be few worksheets open) and not being used at all for anything and it is not running anything, after sometime (say 2-4 hrs or more), when I go back to using Maple, I find the GUI unresponsive. Nothing happens. Clicking on anything does nothing, It is frozen. Resizing the window, it become black and does not repaint.  

But If I wait about 5-10 minutes after doing this window resizing, it suddenly becomes responsive again and it become alive again.  This happened twice this week, where I was about to just kill Maple. Good thing I did not.

It feels like the Maple process/frontend went to sleep when not being used, and it takes few minutes to wake it up by shaking the window. I do not know what else could explain this.

This is windows 10. Latest updates and lots of RAM and nothing else is running on the PC at this time.

I go take a nap, come back and notice this. It does not happen all the time, but noticed it twice this week.

Any others seen this problem? Does Maple process go to sleep or hibernate when it detects it is not being used for sometime? Looking at task manager when this happens, I see no CPU activity at all and no memory changes at all in any of the servers.exe. So I think this might be a GUI issue, where Java go to sleep or something.   

Or it could be a windows 10 issue and not Maple. But I only noticed this with Maple where it seems to go to sleep when not used.

Maple can be set to calculate approximately/numerically for instance by adding af . e.g. calculate f(4.) instead of f(4), but it is possible to set Maple to default calculate, as if alle numbers were entered as "4." (even though I enter "4")?

How to slove this equation in Maple (get the optimal w), where y is a vector R(n*1), X is a matrix R(n*m), and w is a vector R(m*1),lambda is a scalar.

From a list of strings say

L:=[k$1,y$23,f$25,........]

A particular type of delimiter will their which is  common to all elements in the list the right side is always a number 

The function takes the list, and the delimiter as input

Then it outputs a list of 

Numbers which is on the right side of the delimiter 

Output will be like 

[1,23,25,...]

The delimiters could be a space 

Or 

Space on both sides of dollars

That is in understanding space should also be considered in delimiter that is anything significant 

Hello there, 

Is there any chance to ask this one question?

The attached (following) worksheet shows the result of LieDerivative operation, which is not correct. 

The correct answer is given in the image in the middle of the worksheet. Is there any particular reason regarding Maple's way of conducting the operation in that way?

restart;

with(LinearAlgebra):

with(DifferentialGeometry):

with(LieAlgebras):

DGsetup([x1, x2], M, verbose);

`The following coordinates have been protected:`

 

[x1, x2]

 

`The following vector fields have been defined and protected:`

 

[_DG([["vector", M, []], [[[1], 1]]]), _DG([["vector", M, []], [[[2], 1]]])]

 

`The following differential 1-forms have been defined and protected:`

 

[_DG([["form", M, 1], [[[1], 1]]]), _DG([["form", M, 1], [[[2], 1]]])]

 

`frame name: M`

(1)

 

M > 

f := evalDG((x2)*D_x1 + (c1 * (1 - x1^2) * x2 - c2 * x1)*D_x2);

_DG([["vector", M, []], [[[1], x2], [[2], -c1*x1^2*x2+c1*x2-c2*x1]]])

(2)
M > 

h := evalDG((x1)*D_x1 + (0)*D_x2);

_DG([["vector", M, []], [[[1], x1]]])

(3)
M > 

###### answer

M > 

M > 

LieDerivative(f, h);

_DG([["vector", M, []], [[[1], x2], [[2], x1*(2*c1*x1*x2+c2)]]])

(4)
M > 

 

Download Q20230307.mw

As2_v2.mw 

What should I fix my code in order to work?

Thanks in advance,

I am a newbie in the use of the Physics package.
As I'm interested in modeling dynamic articulated systems, I began reading the example about Mechanics (Statics).

My question is quite simple: let F some vector force of components a * _i and b * _j , what does abs(F) represent? 

I naively thought that abs(F)  was the modulus of F and expected it to be non negative. But I get some negative values (as in the tutorial example for some values of angle alpha.

Thanks in advance

First 103 104 105 106 107 108 109 Last Page 105 of 2097