Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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.

How to Create Graph Equation of Water Drop Wave in Cartesian Space using single Implicit Function only run by Maple Software

The Equation is:   z = - cos( (x2+y2)0.5 - a)  with paramater a is moving form 0 to 2pi 

Enjoy...

Plese Click link below to see full equation in Maple software

Water_Drop_Wave.mw

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?

int((4*h1*lambda*k*BesselK(0, k*Zeta)/Zeta^3)*Zeta*BesselK(1, alpha*Zeta), Zeta = 1 .. infinity)

Can any one help me to find the values of this integral?

Hi, 
I met a an unexpected behaviour of a procedure when the parameter sequence contains the type ':-RandomVariable':  

restart:
with(Statistics):
f1 := proc(A::':-RandomVariable')
  Mean(A)
end proc:

Z := RandomVariable(Normal(mu, sigma)):
hastype(Z, ':-RandomVariable');
f1(Z)
                              true
Error, invalid input: f1 expects its 1st argument, A, to be of type 'RandomVariable', but received _R
# Another attempt
f2 := proc(A)
  if hastype(A, ':-RandomVariable') then Mean(A) end if;
end proc:

f2(Z)
                               mu

Why does f1 generate this error?

Type_RandomVariable.mw

First 94 95 96 97 98 99 100 Last Page 96 of 2097