Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hi ,

I have recently got to know this software and its capabilities and was wondering if I can use it to start an initial systems design for an E-scooter as a first step (virtual validation). then feed this data to a designer which will design and cooperate with an engineer to realise the design again on this platform.

SO i have the range of my scooter , the weight it carries , the enviroment's average topography which i will be simplifying it at the first step to a 15% hill climb , and finally some dynamic/static restrictions... which i hope ican build upon . like adding chasis loads and analysis to data.

I want it to give me the cell number of the batteries , verify the loads and give me a electric-motor description . 


this was the road map.


Thank you for your kind replies .

Is there a way to change the numeric formatting of 'Scientific' to use a cdot instead of a cross to represent multiplication?

A bit of an annoyance. 

typing 'numerator' / 'denominator' generates an error.  The first quote never gets automatically grouped as it should.

Two workarounds.  The first is to move to, and delete the first quote and re-enter it again in front of numerator.
The second is to use brackets, although one shouldn't have to.

Is there a problem with MaplePrime web site?   All my questions for the last 4 years, and answers are no longer available. All gone. I posted a question early today about sin(x) calling. one hr after that, I noticed all my questions and answers gone.

When I go to my user profile, it says I have zero questions, zero answer and zero post for the last 4 years. All the answers to my questions also got deleted, which is a shame if this happened. They have many useful information.

Any one else affected by this?

I have a need to calculate base 2 math as would be done in an integrated circuit. Math will be done using 15 bit 2's complement mantissa and 8 bit exponent. (the exponent is always assumed to be negative) We need to perform multiplication and addition, where each internal operation is represented by such a number.

The goal is to best represent the errors associated with such calculations and export the resulting code to a hardware description language for implementation on an integrated circuit.

Is there a package in Maple that can do that? Any advice on how te proceed?

I found 4 ways so far to call a Maple sin function (to return numerical value).

Can you find more ways?







for the simple ODE:

dsolve(26*(diff(y(x), x$4))-50*(diff(y(x),x$2))-2*y(x) = 0)

dsolve produces strange solution as below:

in this solution the forth function is wrong and it would be as below:


can you explain this problem???

please help me :((((

Hi all,

I am using Maple 2016.

I have defined 5 polynomials: f1, f2, f3, f4 and f5 with 5 unknowns q1,q2 ,q3, q4 and lamda.

After this, I generated the Gröbner basis. But when I try to find the normal set I got an error.



f1 := lamda*q1-(3380075947548081*q1*(1/140737488355328)-259050600068343*q2*(1/140737488355328)-1826834460600733*q3*(1/1125899906842624)+4414049272733425*q4*(1/9007199254740992))*(q2*(8289619202186977*q1*(1/9007199254740992)+3380075947548081*q2*(1/281474976710656)-4414049272733425*q3*(1/18014398509481984)-1826834460600733*q4*(1/2251799813685248))+q3*(1826834460600733*q1*(1/2251799813685248)-4414049272733425*q2*(1/18014398509481984)+843667886835955*q3*(1/70368744177664)-215663898201129*q4*(1/9007199254740992))-q4*(4414049272733425*q1*(1/18014398509481984)+1826834460600733*q2*(1/2251799813685248)+431327796402257*q3*(1/18014398509481984)+843667886835955*q4*(1/70368744177664))-q1*(3380075947548081*q1*(1/281474976710656)-259050600068343*q2*(1/281474976710656)-1826834460600733*q3*(1/2251799813685248)+4414049272733425*q4*(1/18014398509481984)));
f2 := lamda*q2+(259050600068343*q1*(1/140737488355328)+3380075947548081*q2*(1/140737488355328)-4414049272733425*q3*(1/9007199254740992)-1826834460600733*q4*(1/1125899906842624))*(q2*(8289619202186977*q1*(1/9007199254740992)+3380075947548081*q2*(1/281474976710656)-4414049272733425*q3*(1/18014398509481984)-1826834460600733*q4*(1/2251799813685248))+q3*(1826834460600733*q1*(1/2251799813685248)-4414049272733425*q2*(1/18014398509481984)+843667886835955*q3*(1/70368744177664)-215663898201129*q4*(1/9007199254740992))-q4*(4414049272733425*q1*(1/18014398509481984)+1826834460600733*q2*(1/2251799813685248)+431327796402257*q3*(1/18014398509481984)+843667886835955*q4*(1/70368744177664))-q1*(3380075947548081*q1*(1/281474976710656)-259050600068343*q2*(1/281474976710656)-1826834460600733*q3*(1/2251799813685248)+4414049272733425*q4*(1/18014398509481984)));
f3 := (1826834460600733*q1*(1/1125899906842624)-4414049272733425*q2*(1/9007199254740992)+843667886835955*q3*(1/35184372088832)-862655592804515*q4*(1/18014398509481984))*(q2*(8289619202186977*q1*(1/9007199254740992)+3380075947548081*q2*(1/281474976710656)-4414049272733425*q3*(1/18014398509481984)-1826834460600733*q4*(1/2251799813685248))+q3*(1826834460600733*q1*(1/2251799813685248)-4414049272733425*q2*(1/18014398509481984)+843667886835955*q3*(1/70368744177664)-215663898201129*q4*(1/9007199254740992))-q4*(4414049272733425*q1*(1/18014398509481984)+1826834460600733*q2*(1/2251799813685248)+431327796402257*q3*(1/18014398509481984)+843667886835955*q4*(1/70368744177664))-q1*(3380075947548081*q1*(1/281474976710656)-259050600068343*q2*(1/281474976710656)-1826834460600733*q3*(1/2251799813685248)+4414049272733425*q4*(1/18014398509481984)))+lamda*q3;
f4 := lamda*q4-(4414049272733425*q1*(1/9007199254740992)+1826834460600733*q2*(1/1125899906842624)+862655592804515*q3*(1/18014398509481984)+843667886835955*q4*(1/35184372088832))*(q2*(8289619202186977*q1*(1/9007199254740992)+3380075947548081*q2*(1/281474976710656)-4414049272733425*q3*(1/18014398509481984)-1826834460600733*q4*(1/2251799813685248))+q3*(1826834460600733*q1*(1/2251799813685248)-4414049272733425*q2*(1/18014398509481984)+843667886835955*q3*(1/70368744177664)-215663898201129*q4*(1/9007199254740992))-q4*(4414049272733425*q1*(1/18014398509481984)+1826834460600733*q2*(1/2251799813685248)+431327796402257*q3*(1/18014398509481984)+843667886835955*q4*(1/70368744177664))-q1*(3380075947548081*q1*(1/281474976710656)-259050600068343*q2*(1/281474976710656)-1826834460600733*q3*(1/2251799813685248)+4414049272733425*q4*(1/18014398509481984)));
f5 := q1^2+q2^2+q3^2+q4^2-1;
ord := tdeg(q1, q2, q3, q4, lamda);
                  tdeg(q1, q2, q3, q4, lamda)
G := Basis([f1, f2, f3, f4, f5], ord);

ns, rv := NormalSet(G, ord);
Error, (in Groebner:-NormalSet) The case of non-zero-dimensional varieties is not handled.


Any help please ?

Thank you.


I was wondering if it is possible to use units in Maple so I can always check if the result I have at the end of calculation is the meter.  For example:


The answer is of course 3.10^8 m^3*kg/s^3

I try to do something with the units but I am unable to crreate something that will simplify the m/s ffactor to 1.

Any idea?

Thank you in advance for your help.


how to convert a nested for loop to iterative version with stack

#my testing for wildcard to one
#after testing, it loop a very long time and not stop
ppp := [[0,0,0,x],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
mmmeaght1 := [seq(0,ii=1..nops(ppp[1]))]:
bbb1 := [seq(0,ii=1..nops(ppp[1]))]:
emap := [(xx) -> if [xx < 0 assuming x > 0] then 0 else 1 end if, (xx) -> evalf(1/(1+exp(xx)))]:
MM(ppp, ttt1, mmmeaght1, bbb1, check1, emap);

when test wildcard variable for input, would like to assume x > 0 then

i try assuming x > 0 , got error


I have expression h1 as below:




Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman



Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman





`&phi;__n` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-(diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)))/(2*a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t))

`&varepsilon;0__1` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__2` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__4` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__2`(`&xi;__1`, `&xi;__2`, t)-a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*v__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__5` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__1`(`&xi;__1`, `&xi;__2`, t)-a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*u__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;0__1` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`

`&omega;0__2` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)-v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`

`&varepsilon;1__1` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;1__2` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;1__1` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`/R

`&omega;1__2` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`/R

`&varepsilon;__1` := (Zeta*`&varepsilon;1__1`+`&varepsilon;0__1`)/(1+Zeta/R__1)

`&varepsilon;__2` := (Zeta*`&varepsilon;1__2`+`&varepsilon;0__2`)/(1+Zeta/R__2)

`&varepsilon;__4` := `&varepsilon;0__4`/(1+Zeta/R__2)

`&varepsilon;__5` := `&varepsilon;0__5`/(1+Zeta/R__1)

`&varepsilon;__6` := (Zeta*`&omega;1__1`+`&omega;0__1`)/(1+Zeta/R__1)+(Zeta*`&omega;1__2`+`&omega;0__2`)/(1+Zeta/R__2)

epsilon := Matrix([[`&varepsilon;__1`], [`&varepsilon;__2`], [`&varepsilon;__4`], [`&varepsilon;__5`], [`&varepsilon;__6`]])


e__1 := Matrix([[0, 0, 0, e1__15, 0], [0, 0, e1__24, 0, 0], [e1__31, e1__31, 0, 0, 0]])

e__5 := Matrix([[0, 0, 0, e5__15, 0], [0, 0, e5__24, 0, 0], [e5__31, e5__31, 0, 0, 0]])

E__1 := -Matrix([[diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

E__5 := -Matrix([[diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

`&epsilon;__1` := Matrix([[`&epsilon;1__11`, 0, 0], [0, `&epsilon;1__22`, 0], [0, 0, `&epsilon;1__33`]])

`&epsilon;` := Matrix([[`&epsilon;5__11`, 0, 0], [0, `&epsilon;5__22`, 0], [0, 0, `&epsilon;5__33`]])

f := Matrix([[f1, f2, f3]])

D__1 := Multiply(e__1, epsilon)+Multiply(`&epsilon;__1`, E__1)

D__5 := Multiply(e__5, epsilon)+Multiply(`&epsilon;__5`, E__5)

h1 := simplify((Multiply(Transpose(E__1), D__1))(1))

(-R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(phi__2(xi__1, xi__2, t)*Zeta+v__0(xi__1, xi__2, Zeta, t))*(diff(a__1(xi__1, xi__2, Zeta, t), xi__2))-(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(phi__1(xi__1, xi__2, t)*Zeta+u__0(xi__1, xi__2, Zeta, t))*(diff(a__2(xi__1, xi__2, Zeta, t), xi__1))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(diff(u__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(diff(v__0(xi__1, xi__2, Zeta, t), xi__2))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))*e1__15*(R__2+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*R__2*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))*e1__24*(R__1+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__2))+`&epsilon;1__33`*a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))^2-e1__31*(a__2(xi__1, xi__2, Zeta, t)*R__1*Zeta*(R__2+Zeta)*(diff(phi__1(xi__1, xi__2, t), xi__1))+a__1(xi__1, xi__2, Zeta, t)*(R__2*Zeta*(R__1+Zeta)*(diff(phi__2(xi__1, xi__2, t), xi__2))+a__2(xi__1, xi__2, Zeta, t)*w__0(xi__1, xi__2, Zeta, t)*(R__1+R__2+2*Zeta)))*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))+a__2(xi__1, xi__2, Zeta, t)*(`&epsilon;1__11`*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))^2-e1__15*(R__2+Zeta)*(phi__1(xi__1, xi__2, t)*R__1-u__0(xi__1, xi__2, Zeta, t))*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))+(R__1+Zeta)*(`&epsilon;1__22`*(R__2+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))-e1__24*(phi__2(xi__1, xi__2, t)*R__2-v__0(xi__1, xi__2, Zeta, t)))*(diff(varphi1(xi__1, xi__2, Zeta), xi__2)))*a__1(xi__1, xi__2, Zeta, t))/(a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__1+Zeta)*(R__2+Zeta))






Download simplifymore.mw



How can i simplify h1 more in Maple?

Dear All, 

I am trying to use define_external to use a C dll from inside MAPLE. The C dll exports a function that has a argument of type function pointer which has a return type of pointer. The function itself returns pointers.  

Pointers are needed as return types as the C function needs to return arrays. 

When I try to pass the C function, as maple procedure as the argument, it errs saying "Error, (in rk4_vec) number expected for float[8] parameter, got proc () option remember; table( [( 1 ) = HFloat(1.0), ( 2 ) = HFloat(-0.0) ] ) 'procname(args)' end proc"

rk4_vec is as follows: 

rk4_vec := define_external("rk4vec", 't0' :: float[8], 'm' :: integer[4], 'u0' :: ARRAY(1..2,datatype=float[8]), 'dt' :: float[8], 'f' :: PROC('t' :: float[8], 'm' :: integer[4], 'u' :: ARRAY(1..2,datatype=float[8]), 'RETURN' :: REF(float[8])), 'RETURN' ::REF(float[8]), "WRAPPER", LIB="rk4.dll");

rk4vec in C looks like this: 

double *rk4vec ( double t0, int m, double u0[], double dt, 
  double *f ( double t, int m, double u[] ) )

I am passing as :

rk4vec_test_f := proc(t, n, u)
local uprime :: REF(float[8]);
#uprime := Array(n);
uprime(1) := u(2);
uprime(2) := -u(1);
return uprime;
end proc;

I have tried the RETURN type on the define_external call as : float[8], ARRAY(1..2, datatype=float[8]) , but that didnt work either. I got the idea of using REF from times2 example on this link.

Any guidance in this matter is highly appreciated. 

Attached are the C file, the dll, maple worksheet. Tested on Windows, with 64-bit, Maple 2016 standard. rk4.zip


Funny, I can't seem to find a list of all available units in the help file.

Is there not a listed table of units somewhere?

**edit add**  conversion of units I mean.  ie.  meters, miles, gallons, litres, Pa, etc...

I wish to solve for k interms of x, e is a constant in the equation k=x+e*sin(k). Using the solve function, i got 

RootOf(_Z-x-e*sin(_Z)) and using the function allvalues(RootOf(_Z-x-e*sin(_Z))) still gave the same expression in _Z. Please is there a way out because I need the value of  as a substitute to another equation. Any help will be highly appreciated.

4 5 6 7 8 9 10 Last Page 6 of 198