Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,I am looking to construct a histogram in an aesthetic manner with bins. The Histogram command does not provide an optimal output. Any suggestions? Thanks QHistogram.mw


Assuming u and v are both real, I want to prove this equality.

int(Dirac(u-v), [u, v])  = min(u, v)

To be clear, I don't want to verify is this equality is true, but I want (I would like) to do is to get its rhs by using ad hoc transformations of its lhs.

Under the same assumptions, how can I do the same thing for this equality?

int(Dirac(u+v-1), [u, v]) = max(u+v-1, 0)


Thanks in advance

many times I have an expression with constant of integrations in it and need to integrate., So need to make sure to add a new constant of integration which is not already used.

Currently I do this

restart;
sol:=x-_C1*x+_C3*x^2;
myconstants:=indets(sol,And(symbol, suffixed(_C, nonnegint)));
map(X->String(X),myconstants);
map(X->X[3..],%);
map(X->:-parse(X),%);
n:=max(%);
new_constant:=_C||(n+1);

This make _C4 as the new constant. 

This assumes all constants have form _Cn which is what I use. It finds all _Cn's then converts each to string, then remove _C part from the string leaving the number, then find the maximum one and adds 1 to it to generate new constant to use,

Is there a better way to do this? Even though the above works, I have feeling there might be better way.

Hi,

I am using Maple 2023 on a Mac. When I issue the following commands

with(plots);
for j to 10 do
    pl || j := plot(sin(j*x)^j, x = 0 .. 5);
end do;
display([pl || (1 .. 10)], insequence = true);

I used to get an animation but also some controls: I could easily repeat, reverse, change FPS, etc. Now I seem to have to go Format_>Plot->Animate->Play. Has there been a change in Maple or have set some preference to this awkward form? I admit I have not been using Maple a lot these last couple of years.

3*alpha*a^2*B*cos(3*Phi)/(4*omega[0])-f*cos(Phi)/(2*omega[0]) = sigma*a-3*alpha*a*B^2/omega[0]-3*alpha*a^3/(8*omega[0])

I would like to get a (necessary and sufficient) condition on real parameters a, b, and c for which there exists (at least) one non-negative solution to 9*x**4 + c < 9*a*(x - 1) + 3*b*(x**2 - 1) + c*x**3
A convenient way to formulate this is using quantifiers. Unfortunately, if I run 

QuantifierElimination:-QuantifierEliminate(:-exists([x],:-And(x>=0,9*x^4+c<9*a*(x-1)+3*b*(x^2-1)+c*x^3)));

Maple will simply output 

Error, (in RootFinding:-RSGateway:-refine_uni_tri) invalid input: RootFinding:-RSGateway:-try_refine_iso_tri expects its 1st argument, box, to be of type nonemptylist([rational, rational]), but received [8019*x^2+(-9*v__2^2-96552*v__2-279834912)*x+49*v__2^3+78318*v__2^2-387436932*v__2+121801800168, v__2^4+2052*v__2^3-5536296*v__2^2+3575222064*v__2-710903793888]

As an alternative method, one can execute 

RealDomain:-solve([x >= 0, 9*x**4 + c < 9*a*(x - 1) + 3*b*(x**2 - 1) + c*x**3], 'parameters' = {a, b, c});
Warning,  computation interrupted

Regretfully, this time the computation is not done in several minutes (so one may have to abort it manually). 

So, what is the proper approach to the above problem in Maple (without any a priori knowledge, if possible)?

For instance, considering the expression  ≔ exp(1+LambertW(0,x))*(exp(1)*x+log[exp(1)](sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(0,x))))

restart;
expr := exp(1+LambertW(x))*(exp(1)*x+ln(sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(x)))) assuming x >= -1/exp(1):

The following limit can be calculated directly: 

1/:-limit(expr, x = +infinity, 'left');
                               24

We can also evaluate , 

:-limit(1/expr, x = +infinity, 'left'); # MultiSeries:-limit also returns wrong result. 
                               0

However, according to plot([1/(exp(1+LambertW(x))*(exp(1)*x+ln(sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(x))))), 24], x = -1/exp(1) .. +exp(Pi), 'legend' = [1/expr, 24]), the limit value 0 cannot be correct. 
So is this a bug? (And has this been fixed in the forthcoming version?)

Do you think this is a bug? I do not understand solve output. Will send to Maplesoft just in case.

It happens also on Maple 2022. Does it give same result on earlier versions?

2312

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1672 and is the same as the version installed in this computer, created 2024, February 7, 18:34 hours Pacific Time.`

eq:=1 = exp(-4-c1)/(-exp(-2*c1-8)/LambertW(-exp(-2*c1-8)))^(1/2);
solve(eq,c1)

1 = exp(-4-c1)/(-exp(-2*c1-8)/LambertW(-exp(-2*c1-8)))^(1/2)

-4-(1/2)*ln(_S000003)

PDEtools:-Solve(eq,c1)

c1 = -7/2

Download strange_output_from_solve_feb_17_2024.mw

SolnforOS_dsolve.mw 
I would like to solve eq6 in terms of sigma and n. I would appreciate for your help.

I always trobled in coupled nonlinear equations.Could you please help to plot this.

PGVTN.mw

I what compute integral numerically with Precision 14 Digits. I try with:

evalf[2](Int(abs(sin(x^4))/(sqrt(x) + x^2), x = 0 .. infinity, method = _d01amc, methodoptions = [maxintervals = 50000]));# Works with 2 digits only.

I tried all the options and I failed to calculate with more precision.

with change variable: x = -ln(t) I got:

evalf[2](Int((ln(t)^2 - sqrt(-ln(t)))*abs(sin(ln(t)^4))/(ln(t)*(ln(t)^3 + 1)*t), t = 0 .. 1, method = _d01akc, methodoptions = [maxintervals = 500]));#Gives an error!!!

Thanks.

I have doubts as to whether this is possible, but I would like to ask anyway.

For example, can

`*`(`+`(a, b), c);
                           c (a + b)

be written with composed procedures (`*`@`+`) and somehow grouped arguments (a,b) for `+` and (a+b,c) for `*`.

So far I have only come across composed procedures in parethesis applied to one expression in parenthesis.

Since the second pair of parenthesis does a function application to everything what is inside the parenthesis it seems impossible that the right most procedure is only applied to a sub-term of the expression first.

If the answer to my question is no, I want to aks a related question:

Is it possible to separate procedures calls from arguments? So, in a first part of a statement I have a sequence (or a list or a composed function) of procedures/operators and in the second part a sequence of arguments instead of a nested construct of procedure calls?

How to convert this set of PDEs into ODEs? PDEs.mw

How do I draw this plot in Maple?

I have a list as follows:
lst := [`A=70`, `B=17`, `C=27`, `D=37`, `E=74`, `F=57`, `G=67`, `H=08`, `I=81`, `J=28`, `K=38`, `L=48`, `M=58`, `N=68`, `O=90`, `P=19`, `Q=29`, `R=39`, `S=49`, `T=59`, `U=96`, `V=010`, `W=110`, `X=210`, `Y=310`, `Z=410`, "SPACE=105", "DOT=106"]

however using tt:=convert(lst, table) gives

tt:=table([1 = `A=70`, 2 = `B=17`, 3 = `C=27`, 4 = `D=37`, 5 = `E=74`, 6 = `F=57`, 7 = `G=67`, 9 = `I=81`, 8 = `H=08`, 11 = `K=38`, 10 = `J=28`, 13 = `M=58`, 12 = `L=48`, 15 = `O=90`, 14 = `N=68`, 18 = `R=39`, 19 = `S=49`, 16 = `P=19`, 17 = `Q=29`, 22 = `V=010`, 23 = `W=110`, 20 = `T=59`, 21 = `U=96`, 27 = "SPACE=105", 26 = `Z=410`, 25 = `Y=310`, 24 = `X=210`, 28 = "DOT=106"])

I want this to be such that I can retrieve the numerical value assigned to each alphabet e.g.
tt[A] should produce 70.

First 10 11 12 13 14 15 16 Last Page 12 of 2097