MaplePrimes Questions

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

As you can see, if I want to simplify the following expression, I shall have to run the simplify command three times, and if I add some assumptions, the global simplify command will no longer work! 

:-simplify(2*(x^2+1)^(1/2)*(x+y+(x+y)/(x*y-1))^2/(((1/2)*(x+y+(x+y)/(x*y-1))*(2*x+(x+y)/(x*y-1)+y)/(x^2+1)^(1/2)-(1/2)*(2*x+(x+y)/(x*y-1)+y)*(y+(x+y)/(x*y-1))/(x^2+1)^(1/2)+(x+y+(x+y)/(x*y-1))/x)^2*x));


Download collect_and_recurse)_invalid_arguments_to_coeffs_.mws

But here either Physics[Simplify] or evala@Simplify works (with a slightly different result, though). Does anyone know why?

In Flow the display command only works with one plot. with two I get an error message.

  "( in Flow:-EvaluateMath) too many levels of recursion"

Vertex disjoint paths are paths that only share their first and last vertices.  In Maple, we can compute the maximum number of pairwise vertex disjoint paths from x to y by the function MaxFlow.  

For example:

with(GraphTheory):
with(SpecialGraphs):
g:=IcosahedronGraph():
HighlightVertex(g, {1,7},"DodgerBlue"):
DrawGraph(g);
g1:=MakeWeighted(g);
mxf:=MaxFlow(g1,1,7)

5

Matrix(12, 12, [[0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0]])

So  we know that the maximum number  of vertex-disjoint paths between vertices "1" and "7" is 5. 

But can we obtain more information from MaxFlow, such as finding  five (i.e., the maximum number) vertex-disjoint paths between vertices "1" and "7" ? (These five paths may not be unique.)

Here is a set of five vertex-disjoint paths connecting vertices "1" and "7" that I observed manually, each marked with a different color.

Hi every one

Let F= [x^2-z^2, x*y+y*z, x*z-y*z, y^2+y*z,w^2] be a special list of monomials and binomials. How to convert F into the following list:

FF=[x^2=z^2, x*y=-y*z, x*z=y*z, y^2=-y*z,w^2=0]. Please note that the left side of each equation of FF is greater than the right side w.r.t. lex ordering plex(x,y,z,w). 

Thank you in advance.

I would like to simplify the following (very simple) expression:

e1:= -(b*(b^2 - 4*a*c)^(1/2) - 4*a*c + b^2)/(2*a*(b^2 - 4*a*c)^(1/2))

whis is exactly equal to

e2: = -(b + (b^2 - 4*a*c)^(1/2))/(2*a)
simplify(e1-e2)
0


But the "simplify" command is not able to produce expression "e2". Is there any general way how to enforce simplifying to get expected result?

Take the following expression:

Why does Maple simplify it to:

instead of the following, like the other math software does it:

While Maple uses , the other software does , which I find easier to read.

It's not a big difference, but I find positive expressions easier to read. Is there a way to change this behaviour or to work around it?

My world of trigonometric functions has a very simple structure: sin, cos and tan are what I need.

That's why I very much welcomed the simplification of sin/cos to tan recently introduced with Maple 2023.

What I neither need nor want is the simplification of 1/sin and 1/cos to sec and csc. I'm not used to that (and probably won't get used to it).

Can this simplification to sec and ccs be turned off (and preferably the simplification to tan be kept)?

Another very strange behavior.

res:= x^2 + x + 1 + 1/3*x^3 + 1/12*x^4 + 1/60*x^5 + 1/360*x^6 + 1/2520*x^7;
sort(res);

#and now
res

Without trying it, what do you expect the output of the last line above to be?  The same as the first one, right?  But that is not what Maple gives. Maple now changes res to always be sorted, even though I have not reassigned it.

Does this mean if one calls sort(), then all the variables that contains polynomials will also be sorted automatically?

Unable to upload worksheet. So here is screen shot

 


Download sort_problem.mw

First 212 213 214 215 216 217 218 Last Page 214 of 2424