MaplePrimes Questions

This happened on Windows 10 clicking on *.mws documents while Maple 2023 was not running.

My observations with one document (I do not have others at hand at the moment):

No freeze when Maple is already running.

No freeze when the startup page (Start.mw) is disabled.

Older versions opened in Windows file explorer with “right click and open with” did not show this behavior.

Since there are ways to open such old documents, my intention is to document my observations and to find out if others can reproduce it. If not, my setup might differ from default or the file has an issue.

Here is a demonstration involving two decision problems (where evalf is applied to the output for better readability): 
 

interface(version);

restart;

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

(1)

RealDomain:-solve({x*y = 3*z^5+4, x^2*y^2-3*x^2*z^2 = 1., x^3+y^3+z^3 = 12})

{x = 2.948903259, y = -2.257458014, z = -1.288554964}, {x = -.7294615910, y = 2.402430460, z = -1.139060479}, {x = .6177631401, y = 2.331476708, z = -.9687540923}, {x = 2.113678892, y = 1.450731881, z = -.7917893433}

(2)

SMTLIB:-Satisfy({x*y = 3*z^5+4, x^2*y^2-3*x^2*z^2 = 1, x^3+y^3+z^3 = 12}, showsmtlib)

(declare-fun x () Real)
(declare-fun y () Real)
(declare-fun z () Real)
(assert (and (= (* x y) (+ (* (* z z z z z) 3) 4)) (= (+ (* (* x x) (* y y)) (* (* (* x x) (* z z)) (- 3))) 1) (= (+ (* x x x) (* y y y) (* z z z)) 12)))
(check-sat)
(exit)

 

Error, (in SMTLIB:-smtlib_execute) external linking: error loading external library mplsmtlib.dll: Ҳ���ָ����ģ�顣

 

RealDomain:-solve({(x^2-2*y*z)*(x^3-y+z) = 0, x^4-y*z^3 = 2., z^4+x^3-2*x*y+3*y*z = 0})

{x = -1.130532018, y = -.1818551573, z = 1.263080805}, {x = 1.123233144, y = .4467032548, z = -.9704268675}, {x = 1.250562423, y = 2.517328867, z = .5615663246}, {x = 2.489770959, y = 16.73009962, z = 1.296110460}, {x = -1.336432744, y = -.7736167557, z = -1.154352246}, {x = 1.209937072, y = 1.655230257, z = .4422187526}

(3)

SMTLIB:-Satisfy({(x^2-2*y*z)*(x^3-y+z) = 0, x^4-y*z^3 = 2, z^4+x^3-2*x*y+3*y*z = 0}, showsmtlib)

(declare-fun x () Real)
(declare-fun y () Real)
(declare-fun z () Real)
(assert (and (= (* (+ (* x x) (* (* y z) (- 2))) (+ (* x x x) (* y (- 1)) z)) 0) (= (- (* x x x x) (* y (* z z z))) 2) (= (+ (* z z z z) (* x x x) (* (* x y) (- 2)) (* (* y z) 3)) 0)))
(check-sat)
(exit)

 

Error, (in SMTLIB:-smtlib_execute) external linking: error loading external library mplsmtlib.dll: Ҳ���ָ����ģ�顣

 

?SMTLIB:-Satisfy


 

Download SMTLIB[Satisfy].mw

As you can see, the SMTLIB:-Satisfy command fails to work in Maple 2023, and I have to install the Visual Studio 2013 (VC++ 12.0) manually. But unfortunately, even if I have installed the vcredist_x64.exe beforehand, the computation still cannot be done in 1000 seconds! (Please note that I just require one real instance rather than all solutions.) Does anyone know why? 
By the way, since the default SMT solver (in Maple 2023) is Z3, will another SMT solver (like cvc5) be supported in future Maple releases?

Hi,

I am trying to plot my G3 plan using the 'implicit3d' command so that I can insert it as an option in the background of my animation, but it's not working. Any suggestions? Thank you.

G2Ex4Blocage.mw

Inscribed square problem


I decided to check on this curve 
 

 4*(x1-0.25)^4-x1^2*x2^2+(x2-0.25)^4-1.21=0;


I get a very rough solution, because the difference between the sides of the "square" begins already at 1-2 decimal places. More precisely, it doesn’t work, that is, we can say that I personally could not find confirmation of the hypothesis.
The coordinates of the vertices of the square:

                    -0.4823584672, -0.2770841741

                    0.9883885535, -0.3959790155

                    1.108267478, 1.086941264

                   -0.3459185869, 1.219514527

Side lengths:
                          1.475544911

                          1.487757882

                          1.460216690

                          1.502805215


 


Perhaps someone would like to try.

yeah sorry it didnt want 2 send so i spamed the botten i didnt meen 2 send more than 1 

it could be amazing if u could help 

ty for the quick respons 

alle-maple_3.mw

Dear power users, I have a probably trivial question. How can I import the attached file in Maple? The file consists of a header part with below the header two columns with data. The file coming from a measuring device has no extension and I could not upload it to the forum as it was considered a null file. In order to solve this I gave it a .txt extension but keep in mind that this normally is not present.

Additional question: if the file would have several headers each time followed by 2 data columns, is there an easy way to separate them in a sort of automatic manner?

Spiking2011622.txt

Hello

In a previous question I asked "How to save all user varibles except for the procedures", now I wonder how to extend that to a procedure that saves all user variables except the user procedures and a list of unwanted variables.     The following procedure

SaveAllVariablesExcept := proc(notsave::set, fileName :: string )
   subs(_NAMES = (remove(type, {anames}(user) minus {anames}(procedure), suffixed(notsave)))[],
        proc() save _NAMES, fileName end proc)()
end proc:

does what I need in a small scale.   For instance 

SaveAllVariablesExcept({'exceptvars','jerkmodel','jerksmon','modelaux','modelname','aaa','allsys','aux','j','s','sys'},s):

does not save the variables listed in the first argument. All other variables, except procedures, are saved.  

Suppose that instead of { 'exceptvars',...} I saved a list of variables using the command exceptvars:={anames}(user) minus {anames}(procedure) in a certain part of the worksheet and issued SaveAllVariablesExcept(exceptvars,s).  SaveAllVariablesExcept no longer works (a suffixed problem) meaning that I don't know how to build a set from {anames}(user) that has the right syntax to be accepted in SaveAllVariablesExcept.  

Of course, alternative solutions are welcome but I wonder if someone out there could explain me how to build the proper exceptvars including exceptvars as well. 

Many thanks.

i want  your solution  procedure in Maple and get the best fit for the coefficients, r anda k.  i want
plot the data and the y curve together on the same graph to visualize the fitting. For the
data  use blue circles while for the y curve, use red solid line style. Use the leastsquare. thank you verymuch

estimasi_par_logistik.mw

How to isolate t2 from equation A. Such that t2 can be written in form of i like -> t2 = i * something
Attaching sheetq6m.mw

Converting index expressions to atomic worked.
I then tried to uncheck atomic in the context menu which did not work.

I opened a new worksheet to try it again but now conversion to atomic disappeared from the menu

no_conv_to_atomic.mw

 

A restart of Maple did not bring convert to atomic back. Any idea why this happened and how to restore Maple?

Hi Maplers, 

I'm struggling to write the correct code for this structural problem below. 

The goal is to find the piecewise code for the horizontal deflection of a vertical beam (representing a offshore wind turbine) consisting of 5 segments. Below the EoM for the 5 segments, where segment 1 is in the soil hence the ksoil*u1(z) part. 

sysODE := {
EI2*diff(u2(z), z, z, z, z) + m2*g*diff(u2(z), z, z) = 0,
EI3*diff(u3(z), z, z, z, z) + m3*g*diff(u3(z), z, z) = 0,
EI4*diff(u4(z), z, z, z, z) + m4*g*diff(u4(z), z, z) = 0,
EI5*diff(u5(z), z, z, z, z) + m5*g*diff(u5(z), z, z) = 0,
EI1*diff(u1(z), z, z, z, z) + m1*g*diff(u1(z), z, z) + ksoil*u1(z) = 0} 

To find the general solution the dsolve function is used. This gives 5 eqs describing u1(z).. u5(z), with in total 20 unknown constants depicted as: _C1.._C20. 

Now I have 20 BCs, shown below: 

bcs := {
eval(subs(z = z2, EI2*diff(u2, z, z, z)) + Fwave = subs(z = z2, EI3*diff(u3, z, z, z))),
eval(subs(z = z5, EI5*diff(u5, z, z, z)) + Fwind = 0),
eval(subs(z = 0, EI1*diff(u1, z, z)) = 0),
eval(subs(z = 0, EI1*diff(u1, z, z, z)) = 0),
eval(subs(z = z1, u1) = subs(z = z1, u2)),
eval(subs(z = z1, diff(u1, z)) = subs(z = z2, diff(u2, z))),
eval(subs(z = z1, diff(u1, z, z)) = subs(z = z2, diff(u2, z, z))),
eval(subs(z = z1, diff(u1, z, z, z)) = subs(z = z1, diff(u1, z, z, z))),
eval(subs(z = z2, u2) = subs(z = z3, u3)),
eval(subs(z = z2, diff(u2, z)) = subs(z = z2, diff(u3, z))),
eval(subs(z = z3, u3) = subs(z = z3, u4)),
eval(subs(z = z3, diff(u3, z)) = subs(z = z3, diff(u4, z))),
eval(subs(z = z3, diff(u3, z, z)) = subs(z = z3, diff(u4, z, z))),
eval(subs(z = z3, diff(u3, z, z, z)) = subs(z = z3, diff(u4, z, z, z))),
eval(subs(z = z4, u4) = subs(z = z5, u5)),
eval(subs(z = z4, diff(u4, z)) = subs(z = z4, diff(u5, z))),
eval(subs(z = z4, diff(u4, z, z)) = subs(z = z4, diff(u5, z, z))),
eval(subs(z = z4, diff(u4, z, z, z)) = subs(z = z4, diff(u5, z, z, z))),
eval(subs(z = z5, EI5*diff(u5, z, z)) = 0)};

How do I write the correct Maple-code to find C1..C20. 

Thanks in advance! 

krgs, 

Floris

Hi,

i use an OpenMaple environment for my academic activity. Especially for plotting of results outside of Maple GUI. Until version 2023 everything was nice and working. But in 2023 calling of Maplets kills Maple 2023 and of course my jobs. Example to try:

#include <stdio.h>
#include <stdlib.h>

#include "maplec.h"

 /* callback used for directing result output */
static void M_DECL textCallBack(void *data, int tag, const char *output)
{
   printf("%s\n", output);
}

int main(int argc, char *argv[])
{
   char err[2048];  /* command input and error string buffers */
   MKernelVector kv;  /* Maple kernel handle */
   MCallBackVectorDesc cb ={textCallBack,
      0,   /* errorCallBack not used */
      0,   /* statusCallBack not used */
      0,   /* readLineCallBack not used */
      0,   /* redirectCallBack not used */
      0,   /* streamCallBack not used */
      0,   /* queryInterrupt not used */
      0    /* callBackCallBack not used */
   };
   ALGEB r, l;  /* Maple data-structures */

   /* initialize Maple */
   if((kv=StartMaple(argc, argv, &cb, NULL, NULL, err))==NULL) {
      printf("Fatal error, %s\n", err);
      return(1);
   }
   r=EvalMapleStatement(kv, "with(Maplets[Elements]): SimpleMaplet:=Maplet([Button('Close', Shutdown())]): Maplets[Display](SimpleMaplet):");
   StopMaple(kv);

   return(0);
}

Working in Maple 2020-2022, crashes in 2023

After a long investigation i found that the problem focuses in maple.dll.

It is only for me, or it is a general bug?

Update:

The newest Maple Update 2023.1 still have this problem ...

The newest Maple Update 2023.2 still have this problem ...

Will be this error sometime fixed?

The QuantifierElimination package has been added in Maple 2023.
However, in the following example, the old (yet not obsolete) RegularChains:-SemiAlgebraicSetTools:-QuantifierElimination command can solve the problem, but strangely, the new QuantifierElimination:-QuantifierEliminate command simply returns an error. 
 

restart;

RegularChains:-SemiAlgebraicSetTools:-QuantifierElimination(:-`&A`([x, y, t]), :-`&implies`(:-`&and`(x^3+y^2-x = t, t^2 = 4/27, t < 0), x^2+y^2 >= rho), output = rootof)

rho <= 1/3

(1)

QuantifierElimination:-QuantifierEliminate(:-forall([x, y, t], :-Implies(:-And(x^3+y^2-x = t, t^2 = 4/27, t < 0), x^2+y^2 >= rho)))

Error, (in CADCell:-CCHILD) intervals the same at this precision

 

Digits += 5:

RegularChains:-SemiAlgebraicSetTools:-QuantifierElimination(:-`&A`([x, y, t]), :-`&implies`(:-`&and`(x^3+y^2-x = t, t^2 = 4/27, t < 0), x^2+y^2 >= rho), output = rootof)

rho <= 1/3

(2)

QuantifierElimination:-QuantifierEliminate(:-forall([x, y, t], :-Implies(:-And(x^3+y^2-x = t, t^2 = 4/27, t < 0), x^2+y^2 >= rho)))

Error, (in convert/RootOf) there is no root of 3*_Z^2-1 in -348986823692397556565591/604462909807314587353088 .. -174493411846198778282755/302231454903657293676544

 

NULL


 

Download QEbug.mw

Code: 

QuantifierElimination[QuantifierEliminate](forall([x, y, t], Implies(And(x^3 + y^2 - x = t, And(t^2 = 4/27, t < 0)), x^2 + y^2 >= rho)));

So, is there any bug in Maple's QuantifierElimination package?

First 95 96 97 98 99 100 101 Last Page 97 of 2308