Maple 2022 Questions and Posts

These are Posts and Questions associated with the product, Maple 2022

Recently, I tried to write a function to get the lexicographic product of two graphs.

In  graph theory the lexicographic product G ∙ H of graphs G and H is a graph such that
  • the vertex set of G ∙ H is the cartesian product V(G) × V(H); and
  • any two vertices (u,v) and (x,y) are adjacent in G ∙ H if and only if either u is adjacent with x in G or u = x and v is adjacent with y in H.

I'm trying to write this function as defined after making sure it doesn't exist in maple. I saw a similar post by mathematica stack.

There are many answers in the post, the most interesting to me is the following code, which follows the definition of lexicographic product. 

lexicographicProduct[g1_?UndirectedGraphQ, g2_?UndirectedGraphQ, opt : OptionsPattern[]] := 
 RelationGraph[
   (* two nodes are connected if their corresponding nodes in the first graph are connected *)
   EdgeQ[g1, First[#1] \[UndirectedEdge] First[#2]] || 
   (* or their corresponding nodes in the first graph are the same and their corresponding nodes in the second graph are connected *)
   (First[#1] === First[#2] && EdgeQ[g2, Last[#1] \[UndirectedEdge] Last[#2]]) &,

   (* the vertices are the cartesian product of the two vertex sets *)
   Tuples[{VertexList[g1], VertexList[g2]}],

   (* also allow setting graph options *)
   opt
 ]

lexicographicProduct[CycleGraph[5], CycleGraph[3]]

It utilizes the  function RelationGraph in Mathematica. I feel that this function is generic in nature. So here I would ask maple if they had a similar function.

Function RelationGraph is to generate a graph based on data and a binary relation.

For example, using RelationGraph  I  can get easily  the kth power Gk of an graph G which is another graph that has the same set of vertices, but in which two vertices are adjacent when their distance in G is at most k.

Dis[g1_?UndirectedGraphQ, k_] := 
 RelationGraph[
  GraphDistance[g1, #1, #2] <= k && GraphDistance[g1, #1, #2] != 0 &, 
  VertexList[g1]]
Dis[PathGraph[Range[10]], 2]

If I use maple and do not use the built-in function GraphPower, I might deal with the following.

with(GraphTheory):
with(SpecialGraphs):
graphpower:=proc(G,k):
local choo,edge,vex,g;
 vex:=convert(Vertices(G),list);
 choo:= choose(vex, 2):
 g:= Graph(Vertices(G)):
 for edge in choo do 
     if Distance(G, edge[1], edge[2])<=k  then 
        AddEdge(g, convert(edge,set))
     fi;
  end do:
 return g;
end proc:
s:=graphpower(PathGraph(10),2);DrawGraph(s)

 

 

I believe if the RelationGraph function can be  implemented in maple, the function lexicographicProduct would be easier to obtain.

Declaring types of arguments of a procedure or checking type of something when working with lists or Arrays is easy. For example one can easily use A :: list( posint ) or type( B :: 'Array'( polynom ) ), but with MutableSet, the same approach ends with an error;

Error, module does not have a ModuleType member to accept structured type arguments.

I guess it is the same for other objects defined as a module with option object. Is there a recommended way to have type declaration for such objects or MutableSet in specific?

I was surprised to learn that implicitplot doesn't recognize the constant Pi.  I attach a simple example to illustrate.

restart

with(plots)

f := x-y-Pi

x-y-Pi

(1)

implicitplot(f)

Error, (in plots/implicitplot) found 3 variables that the expression depends on ({Pi, x, y}), but expected only 2

 

evalf(Pi)

3.141592654

(2)

g := x-y-3.14

x-y-3.14

(3)

implicitplot(g)

 

NULL

Download implicitplot_error.mw

I do not remember now if this was asked before. Doing search here is hard. 

But I am trying this now on 2022.1 and this gives FAIL.

What is the correct syntax to use odetest to verify solution to ode using series method with expansion around infinity? Why do I get FAIL here?
 

interface(version)

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1257 and is the same as the version installed in this computer, created 2022, June 22, 16:27 hours Pacific Time.`

restart;

ode:=x^3*diff(y(x),x$2)+x^2*diff(y(x),x)+y(x)=0;
sol:=dsolve(ode,y(x),'series',x=infinity);
odetest(sol,ode,'series','point'=infinity)

x^3*(diff(diff(y(x), x), x))+x^2*(diff(y(x), x))+y(x) = 0

y(x) = _C1*(1-1/x+(1/4)/x^2-(1/36)/x^3+(1/576)/x^4-(1/14400)/x^5+O(1/x^6))+_C2*(ln(1/x)*(1-1/x+(1/4)/x^2-(1/36)/x^3+(1/576)/x^4-(1/14400)/x^5+O(1/x^6))+2/x-(3/4)/x^2+(11/108)/x^3-(25/3456)/x^4+(137/432000)/x^5+O(1/x^6))

Warning, unable to compute series necessary to test the given solution

FAIL

 


 

Download odetest_series.mw

Update

I've testsed methods given below on 6 random ode's using Maple odetest, VV method and Axel method. THis is the result obtained using Maple 2022.1 

odetest was able to verify the solution zero out of 6 times.
VV method was able to verify the solution 3 out of 6 times.
Axel method was able to verify the solution 5 out of 6 times.

So based on this small test, Axel method seems to do the best. Attached worksheet. I will use this method to verify my series solution to ode's instead of Maple's odetest but will use Maple's odetest for non-series method solutions.


 

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1257 and is the same as the version installed in this computer, created 2022, June 22, 16:27 hours Pacific Time.`

restart;

Example 1  Regular singular point. Complex roots

 

Order:=6;
ode:=sin(x)*diff(y(x),x$2)+cos(x)*diff(y(x),x)+1/x*y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0)

6

sin(x)*(diff(diff(y(x), x), x))+cos(x)*(diff(y(x), x))+y(x)/x = 0

y(x) = _C1*x^(-I)*(series(1+(1/48-(1/16)*I)*x^2+(1/57600-(217/57600)*I)*x^4+O(x^6),x,6))+_C2*x^I*(series(1+(1/48+(1/16)*I)*x^2+(1/57600+(217/57600)*I)*x^4+O(x^6),x,6))

VV method

 

odetest(sol,ode):
asympt(%,x);

Error, (in asympt) unable to compute series

odetest method

 

odetest(sol,ode,'series','point'=0);

y(x) = _C1*x^(-I)*(series(1+(1/48-(1/16)*I)*x^2+(1/57600-(217/57600)*I)*x^4+O(x^6),x,6))+_C2*x^I*(series(1+(1/48+(1/16)*I)*x^2+(1/57600+(217/57600)*I)*x^4+O(x^6),x,6))

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

 

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
convert(%,polynom);

0

Example 2 Regular singular point. Dierence is integer

 

Order:=6;
ode:=sin(x)*diff(y(x),x$2)+cos(x)*y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0):

6

sin(x)*(diff(diff(y(x), x), x))+cos(x)*y(x) = 0

VV method

 

odetest(sol,ode):
asympt(%,x);
convert(%,polynom);

O(x^7)

0

odetest method

 

odetest(sol,ode,'series','point'=0);

Warning, unable to compute series necessary to test the given solution

FAIL

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

   

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
convert(%,polynom);

0

Example 3 Regular singular point. Repeated root

 

Order:=6;
ode:=(exp(x)-1)*diff(y(x),x$2)+exp(x)*diff(y(x),x)+y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0):

6

(exp(x)-1)*(diff(diff(y(x), x), x))+exp(x)*(diff(y(x), x))+y(x) = 0

VV method

 

odetest(sol,ode):
asympt(%,x):
convert(%,polynom);

0

odetest method

 

odetest(sol,ode,'series','point'=0);

Warning, unable to compute series necessary to test the given solution

FAIL

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

   

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
convert(%,polynom);

0

Example 4 Regular singular point. Repeated root

 

Order:=6;  
ode:=(exp(x)-1)*diff(y(x),x$2)+exp(x)*diff(y(x),x)+y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0):

6

(exp(x)-1)*(diff(diff(y(x), x), x))+exp(x)*(diff(y(x), x))+y(x) = 0

VV method

 

odetest(sol,ode):
asympt(%,x):
convert(%,polynom);

0

odetest method

 

odetest(sol,ode,'series','point'=0);

Warning, unable to compute series necessary to test the given solution

FAIL

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

   

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
convert(%,polynom);

0

Example 5 . Regular singular point. Complex roots

 

Order:=6;  
ode:=x^3*diff(y(x),x$2)+sin(x^3)*diff(y(x),x)+x*y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0):

6

x^3*(diff(diff(y(x), x), x))+sin(x^3)*(diff(y(x), x))+x*y(x) = 0

VV method

 

odetest(sol,ode):
asympt(%,x);
#convert(%,polynom);

Error, (in asympt) unable to compute series

odetest method

 

odetest(sol,ode,'series','point'=0);

Error, (in odetest/series) need to determine the sign of I*3^(1/2)

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

   

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
#convert(%,polynom);

Error, (in MultiSeries:-multiseries) need to determine the sign of -I*3^(1/2)

Example 6 . Regular singular point. Complex roots

 

Order:=6;  
ode:=x^2*diff(y(x),x$2)+x*diff(y(x),x)+(x+1)*y(x)=0;
sol:=dsolve(ode,y(x),type='series',x=0):

6

x^2*(diff(diff(y(x), x), x))+x*(diff(y(x), x))+(x+1)*y(x) = 0

VV method

 

odetest(sol,ode):
asympt(%,x);
#convert(%,polynom);

Error, (in asympt) unable to compute series

odetest method

 

odetest(sol,ode,'series','point'=0);

y(x) = _C1*x^(-I)*(series(1+(-1/5-(2/5)*I)*x+(-1/40+(3/40)*I)*x^2+(3/520-(7/1560)*I)*x^3+(-1/2496+(1/12480)*I)*x^4+(9/603200+(1/361920)*I)*x^5+O(x^6),x,6))+_C2*x^I*(series(1+(-1/5+(2/5)*I)*x+(-1/40-(3/40)*I)*x^2+(3/520+(7/1560)*I)*x^3+(-1/2496-(1/12480)*I)*x^4+(9/603200-(1/361920)*I)*x^5+O(x^6),x,6))

y(t) = _C1*t^(-I)*(series(1+(1/48-(1/16)*I)*t^2+(1/57600-(217/57600)*I)*t^4+O(t^6),t,6))+_C2*t^I*(series(1+(1/48+(1/16)*I)*t^2+(1/57600+(217/57600)*I)*t^4+O(t^6),t,6))

Axel method

   

rhs(sol):
Y:= unapply(%, x):
eval(lhs(ode), y=Y):
MultiSeries:-asympt(%, x):
convert(%,polynom);

0

 

 


 

Download test_new_odetest.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

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.

recurssion.mw

NULL

"f(x,t) :=(|Psi|)^(2)"

proc (x, t) options operator, arrow, function_assign; abs(Psi)^2 end proc

(1)

" a(t):=piecewise(0<= t<=1,1.5*t,1<= t<=2,1.5*(2-t))"

proc (t) options operator, arrow, function_assign; piecewise(0 <= t and t <= 1, 1.5*t, 1 <= t and t <= 2, 1.5*(2-t)) end proc

(2)

" y[a](t):=piecewise(0<= t<=0.1,a(t),0.1<= t<=0.2,-a(t))"

proc (t) options operator, arrow, function_assign; piecewise(0 <= t and t <= .1, a(t), .1 <= t and t <= .2, -a(t)) end proc

(3)

"y(t):=y[a](t)+mu(t)"

proc (t) options operator, arrow, function_assign; y[a](t)+mu(t) end proc

(4)

"w(t):=&int;x(t)*f(x,t) &DifferentialD;x"

proc (t) options operator, arrow, function_assign; int(x(t)*f(x, t), x) end proc

(5)

" v(t):=y(t)-w(t)*w(t)"

proc (t) options operator, arrow, function_assign; y(t)-w(t)^2 end proc

(6)

NULL

diff(K(x, t), t) = beta*v(t)*f(x, t)

Error, (in y[a]) too many levels of recursion

 

"map(int, , t)"

Error, invalid function arguments

"map(int,,t)"

 

NULL

Here psi is a general wave function from schrodinger wave equation.

Download recurssion.mw

The problem comes from the link https://www.mapleprimes.com/questions/234398-Convert-Maple-Code-To-Python-#comment287424.

We know that when we compile a C or C ++ function, it generates an executable file.  Then we are free from source code.  For example. the function below returns a square matrix A where    "A[i, j]" is the distance from vertex i to vertex j in the graph G. My computer system is Windows.

// C Program for Floyd Warshall Algorithm
#include <stdio.h>

// Number of vertices in the graph
#define V 4

/* Define Infinite as a large enough
  value. This value will be used
  for vertices not connected to each other */
#define INF 99999

// A function to print the solution matrix
void printSolution(int dist[][V]);

// Solves the all-pairs shortest path
// problem using Floyd Warshall algorithm
void floydWarshall (int graph[][V]) {
    /* dist[][] will be the output matrix
      that will finally have the shortest
      distances between every pair of vertices */
    int dist[V][V], i, j, k;

    /* Initialize the solution matrix
      same as input graph matrix. Or
       we can say the initial values of
       shortest distances are based
       on shortest paths considering no
       intermediate vertex. */
    for (i = 0; i < V; i++)
        for (j = 0; j < V; j++)
            dist[i][j] = graph[i][j];

    /* Add all vertices one by one to
      the set of intermediate vertices.
      ---> Before start of an iteration, we
      have shortest distances between all
      pairs of vertices such that the shortest
      distances consider only the
      vertices in set {0, 1, 2, .. k-1} as
      intermediate vertices.
      ----> After the end of an iteration,
      vertex no. k is added to the set of
      intermediate vertices and the set
      becomes {0, 1, 2, .. k} */
    for (k = 0; k < V; k++) {
        // Pick all vertices as source one by one
        for (i = 0; i < V; i++) {
            // Pick all vertices as destination for the
            // above picked source
            for (j = 0; j < V; j++) {
                // If vertex k is on the shortest path from
                // i to j, then update the value of dist[i][j]
                if (dist[i][k] + dist[k][j] < dist[i][j])
                    dist[i][j] = dist[i][k] + dist[k][j];
            }
        }
    }

    // Print the shortest distance matrix
    printSolution(dist);
}

/* A utility function to print solution */
void printSolution(int dist[][V]) {
    printf ("The following matrix shows the shortest distances"
            " between every pair of vertices \n");
    for (int i = 0; i < V; i++) {
        for (int j = 0; j < V; j++) {
            if (dist[i][j] == INF)
                printf("%7s", "INF");
            else
                printf ("%7d", dist[i][j]);
        }
        printf("\n");
    }
}

// driver program to test above function
int main() {
    /* Let us create the following weighted graph
            10
       (0)------->(3)
        |         /|\
      5 |          |
        |          | 1
       \|/         |
       (1)------->(2)
            3           */
    int graph[V][V] = { {0,   5,  INF, 10},
        {INF, 0,   3, INF},
        {INF, INF, 0,   1},
        {INF, INF, INF, 0}
    };

    // Print the solution
    floydWarshall(graph);
    return 0;
}

 

The above functions will be packaged as the disall.exe , and then we will move them anywhere in my computer and run it in Powershell.  We don't have to deal with the source code unless we want to change it.

I mean can Maple do something like that?

with(GraphTheory);
G := Graph([1, 2, 3, 4, 5], {{1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 5}, {3, 4}, {4, 5}});
AllPairsDistance(G);

For exmaple, can I package the above code snippet into an exe file?

Dear All,
I want to extract the coefficients of Chebyshev of an arbitrary function, for example, exp(x). I know that we can use the following command to make a Chebyshev series expansion of exp(x):
chebyshev(exp(x),x);
the above returns the sum of nth Chebyshev polynomials multiplied by Chebyshev coefficients as the following:
1.26606587775201*T(0, x) + 1.13031820798497*T(1, x) + 0.271495339534077*T(2, x) + 0.0443368498486638*T(3, x) + 0.00547424044209371*T(4, x) + 0.000542926311913993*T(5, x) + 0.0000449773229542760*T(6, x) + 3.19843646244580*10^(-6)*T(7, x) + 1.99212480641582*10^(-7)*T(8, x) + 1.10367717095000*10^(-8)*T(9, x) + 5.50589697979079*10^(-10)*T(10, x)

I like to take the coefficients 1.266,1.1303, 0.2714, 0.04433, and so on. How can I do it?
Thanks

Hi,

I am just starting with Maple after using Mathcad for nearly 30 years. I want to recreate something I have used a lot in Mathcad: select certain rows in array based on a specified criterion. For example, I want to save just the rows that have a certain value in a certain column and save the new array for use later. I am slowly learning how to do it Maple--for instance, I learned that I need to change the variable printlevel if I want to get the output from nested loops. 

I currently have the following code:

k := 1;

rows := RowDimension(M);


for i to rows do

   if M[i, 3] = "A" then

      row(out, k) := row(M, i);

       k := k + 1;

   end if;

end do;
out;

 

This doesn't seem to work, though. When I try to display out, I just get the name out instead a matrix of values.

I would appreciate it if someone could give me some idea of what I am doing wrong (with Maple, that is).

Thanks,

John
 

Dear all, 

I'm trying to enter an equation (Navier-Stokes) in Maple using the Physics[Vectors] package. I am having trouble with the term 

$(u\cdot \nabla) u$

but Maple returns an error when entering the commands :

( u_(t,x,y,z) . %Nabla) u_(t,x,y,z)

I tried other combinations of this without success, like :

( u_(t,x,y,z) . %Nabla)(u_(t,x,y,z))

( u_(t,x,y,z) %. %Nabla) u_(t,x,y,z)

( u_(t,x,y,z) %. %Nabla) (u_(t,x,y,z))

Could you please give me some help with this? 

Hello,
I have a small problem with the display of fraction and x_dot at the same time. 

 

This the exemple :

with(Typesetting);
compactdisplay = flase;
Settings(typesetprime = false);
Settings(typesetdot = true);

diff(1/2*LongExpression*x(t), t);

The Results 

when I choose the typesetting level : Extended. I got this result :

And when I choose the typesetting level : Maple Standrad. I got this result 
        

What I  want to have is mix of both, it mean like this 

I have downloaded Maple and install the trial version , i entered the Purchase code  and every thing was done, I did not get any errors , however, while i am trying to open Maple, when I open the software , I see this window which i have uploaded below , and when i click on Active i eneter my purchase code again , and it says it has acitivated and then when i click ok , it exit , what is the issue ?

can you help me ?

First 36 37 38 39 40 41 42 Page 38 of 43