MaplePrimes Questions

So given a list [ [ [1,2], [2,1] ], [ [3,4], [4,3] ], [ [5] ] ],

I would like to produce a list 

[ [1,2,3,4,5], [1,2,4,3,5], [2,1,3,4,5], [2,1,4,3,5] ]


so it makes a combination of sublist of every lists in the given list

is there a way to do it ?



Hi all

Assume that we have a cost functional, namely J, which we want to be minimized but we have to set of constraint CC1 and CC2.

what should we do it?

The code which I have written is attached(Minimize J under CC1[i]=0 and CC2[i]=0)

 any suggestion or guide is praiseworthy.

Thanks in advance


Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Dear all,

I'm having trouble defining a Maple procedure containing for loops. I have one outer for loop which I terminate at the end and two separate for loops of which the first one get's terminated before the second one starts. Nethertheless Maple complains, that my outer loop doesn't get terminated and points to to a point before the second inner for loop starts. I based this procedure on a procedure I defined in another worksheet and the latter one is working just fine, although the structure ist the same in both procedures. As far as I can see, the structure is

for n from 0 to T do
for i from 1 to J do
end do;
for i from J-2 to 1 by -1 do
end do;

end do;

I have several if statements in the procedure, too, but as far as I can see, everything is terminated fine. Perhaps there is something else wrong with my procedure and I'm just getting a strange error? I would really appreciateit, if somebody could take a short look at the problem. Since the procedure takes up several pages I'm uploading my Maple work sheet. The relevant procedure is the one defined just after the red comment "#  actual code" which is about 60% through the work sheet.

Thank you all.


Dear Collagues

I wrote a code to solve a system of ode numerically. When the equations have been solved, I want to find the value of MTE which is in integral form. I check and see that the value of MTE is calculated wrong. I dont know why?

I calculated the values of MTE twice (another variable is masst below res1). Two different answers!!

I would be most grateful if you could help me.

Thank you

Here is my code







eq1:=(a[mu1]*(diff(phi(eta), eta))+2*b[mu1]*phi(eta)*(diff(phi(eta), eta)))*(diff(u(eta), eta))+(1+a[mu1]*phi(eta)+b[mu1]*phi(eta)^2)*(diff(u(eta), eta, eta))+rhost(eta)-Ha^2*u(eta);




res1 := dsolve(subs(NBT=1,gama1=0.3,phiv=0.06,{eq1,eq2,eq3,u(0)=lambda*D(u)(0),D(u)(1)=0,T(0)=0,phi(1)=phiv,T(1)=1}), numeric,method=bvp[midrich],output=listprocedure,continuation=cc):

masst:=evalf(int((1-G0(eta)+G0(eta)*rhop/rhobf)*G1(eta), eta = 0..1));

for iNBT from 1 to 3 do

for iphi from 1 to 3 do

for igamma from 1 to 3 do

res := dsolve(subs(NBT=ANBT(iNBT),gama1=Agama1(igamma),phiv=Aphiv(iphi),{eq1,eq2,eq3,u(0)=lambda*D(u)(0),D(u)(1)=0,T(0)=0,phi(1)=phiv,T(1)=1}), numeric,method=bvp[midrich],output=listprocedure,continuation=cc):
MTE[iNBT,iphi,igamma]:=evalf(Int((1-F0(eta)+F0(eta)*rhop/rhobf)*F1(eta), eta = 0..1)):

end do;

end do;

end do;

for iNBT from 1 to 3 do

for iphi from 1 to 3 do

for igamma from 1 to 3 do

print (convert(HTC[iNBT,iphi,igamma],float,9));

end do;

end do;

end do;
for iNBT from 1 to 3 do

for iphi from 1 to 3 do

for igamma from 1 to 3 do

print (convert(MTE[iNBT,iphi,igamma],float,9));

end do;

end do;

end do;



I want to add text to the left of the vertical axis so I need more background space such that the full text fits to the left

As it is now it will appear truncated. I do not want to change the graph itself but I want to increase the background area around the axes so I can enter a text block using the drawing tools. 



_C1, _C2, _C3 are constant, how to set them constant, to make diff(_C2) = 0 etc

eval(simplify(subs(a=_C1,subs(b=1/(diff(c(t), t)),subs(c=_C2+_C3*exp(-t),eq2)))));

(diff(_C2(t), t)+(diff(_C3(t), t))*(exp(-t))(t)+_C3(t)*(diff((exp(-t))(t), t)))*(-(diff(_C1(t), t))*(diff(diff((c(t))(t), t), t))/(diff((c(t))(t), t))^2+(diff(s(t), t))/(diff((c(t))(t), t)))

Assume the inequality xA,2+xB,2+xC,2 ≤ 110 has to be entered as "symbolic entry only".

How can I check that in Maple T.A.?

It seems that there are type conversions necessary. I attempted to use the MathML package without any luck.

  1. Tried to transform $ANSWER within the answer field using MathML[ExportPresentation]( x[A,2]+x[B,2]+x[C,2] <= 110) and compare it with evalb(($ANSWER)=($RESPONSE)) in the grading code field
  2. Tried to transform $RESPONSE in the grading code: evalb(($ANSWER)=( MathML[ImportContent] ($RESPONSE)))

What’s the format of a symbolic entry? Is it really MathML!?

What is the correct way to do it?

  1. answer: ?
  2. grading code: ?
  3. expression type: Maple syntax?!
  4. Text/Symbolic entry: Symbolic entry only

Dear Collegues

I have a system of odes as follows



Teq := N_bt*T(eta)^2*(exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta)))))^2*(diff(T(eta), eta, eta))*gama1^2*b[k1]+N_bt*T(eta)^2*exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta))))*(diff(T(eta), eta, eta))*gama1^2*a[k1]+2*N_bt*T(eta)*(exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta)))))^2*(diff(T(eta), eta, eta))*gama1*b[k1]+N_bt*T(eta)^2*(diff(T(eta), eta, eta))*gama1^2;

UEQ:=(a[mu1]*(-(diff(T(eta), eta))/(N_bt*(1+gama1)*(1+gama1*T(eta)))+(T(eta)-1)*gama1*(diff(T(eta), eta))/(N_bt*(1+gama1)*(1+gama1*T(eta))^2))*exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta))))+2*b[mu1]*(exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta)))))^2*(-(diff(T(eta), eta))/(N_bt*(1+gama1)*(1+gama1*T(eta)))+(T(eta)-1)*gama1*(diff(T(eta), eta))/(N_bt*(1+gama1)*(1+gama1*T(eta))^2)))*(diff(u(eta), eta))+(1+a[mu1]*exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta))))+b[mu1]*(exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta)))))^2)*(diff(u(eta), eta, eta))+1-exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta))))+exp(-(T(eta)-1)/(N_bt*(1+gama1)*(1+gama1*T(eta))))*rhop/rhobf;

I want to solve them with the following boundary conditions

T(0)=0, T(1)=1

u(0)=L*D(u)(0), D(u)(1)=0

However I tried, I cannot find the solution in a closed form. I want to know that is there a closed form solution for the above odes?

Thank you


Hi I am not very used to Maple since I used mathematica previously.

So is there way to put an if statement within sequecne definition? that is,


id = 1;

seq(if(i>2, idx += 1), idx+i , i=1..10)


something like this where if statement runs and then idx+i is added to the sequence, as if I am running a loop.



source1 := PolynomialRing([a,b,c]);
target1 := PolynomialRing([e1,e2,e3,e4]);
source1list := [eq2a, eq3a,eq4a];
target1list := [eq2b, eq3b, eq4b,eq5b];
cs := PolynomialMapPreimage(target1list, source1list, source1, target1);

Error, (in RegularChains:-ConstructibleSetTools:-PolynomialMapPreimage) number of map functions is different from number of variables in target space


in maple 15 do not have error, however now it has error for the code below

with(RegularChains): with(RegularChains): with(ConstructibleSetTools): 

source1 := PolynomialRing([e1, e2, e3]);
target1 := PolynomialRing([a, b, c]);
source1list := [-1*e1+2*e2+*e3, -1*e1+2*e2+*e3, -1*e1+2*e2+*e3];
target1list := [.....]; cs :=
PolynomialMapPreimage(target1list, source1list, source1, target1);

Error, invalid product/quotient



I'm trying to implement a function that gets list1 and list2 to return a list of permutations that permute list1 to list2. 

Is there any good way to do this?




in above example, it can show a permutation group




a permutation group on .... letters

but in some example such as above, it only show a statement a permutation group on .... letters

how to show what it is?



I had Maple 2015.1 running. I did Tools->check for update. It said that there is an update available! then I did ok, go and update. Maple downloaded about 60 MB of stuff, asked me to close Maple to finish the update. I close Maple, and it finished the update with no problem.

When I open Maple, I still see it saying 2015.1, so what was the update for?  

It will be nice if Maple tells the users what the update is going to be for. Like saying something to the effect that version XX.XX is available or something. It just said update available.

How can one find what was updated, and why did the version number not get changed? Is there a log file or some command one can use that shows the updates made to current version one is using?

Help->About still says 2015.1, is it possible Maple update just forgot to change the version number? What is the current and latest version number of Maple?  

When I do check for update now, it says no update is available. So I must be running the latest version. But this what what I had before I updated?

    Maple 2015.1, X86 64 WINDOWS, Jun 3 2015, Build ID 1049007

I am on windows 7, 64 bits.



Assume you want to check that the following inequality was correctly derived:

xA2+xB2+xC2 ≤ 110

How can I check that in Maple T.A.?

If I use a Maple-Graded questions, what must be in the answer field? x[A,2]+x[B,2]+x[C,2] <= 110 !?

What is the grading code?

First 1020 1021 1022 1023 1024 1025 1026 Last Page 1022 of 2234