MaplePrimes Questions

I was about to review a piece of code which is the "main procedure" of a worksheet (as one would say in other languages).

What I mean by that are the top level code statements of a Maple worksheet which are not part of procedures. For the code example I can easily put everything into a procedure and invoke the Maple debugger. For larger worksheets this becomes complicated.

For this reason I was wondering whether the debugger can also be started for a complete document.

I have a quite complex expression (where and are real numbers): 

expr := Or(And(-p^2 + 3*q < 0, p < 0, p^2 - 4*q < 0, Or(And(p < 0, -q < 0), p < 0, q < 0), Or(And(-2*p^2 + 3*q < 0, -q^2 < 0), And(p <= 0, Or(-2*p^2 + 3*q < 0, q^2 < 0))), Or(And(Or(And(p < 0, -q < 0), p < 0, q < 0), Or(And(-2*p^2 + 3*q < 0, -q^2 < 0), And(p <= 0, Or(-2*p^2 + 3*q < 0, q^2 < 0)))), And(p < 0, -q < 0), p < 0, q < 0, And(2*p^2 - 3*q < 0, -q^2 < 0), And(-p <= 0, Or(2*p^2 - 3*q < 0, q^2 < 0))), -2*p^5 + 15*p^3*q - 27*p*q^2 <= 0, p^2*q^2 - 4*q^3 = 0), And(p^2 - 3*q = 0, p < 0, -2*p^2 + 3*q < 0, Or(And(p < 0, -2*p^2 + 3*q < 0), p < 0, 2*p^2 - 3*q < 0), 2*p^3 - 9*p*q = 0), And(-p^2 + 3*q < 0, Or(And(p < 0, p^2 - 4*q < 0), p < 0, -p^2 + 4*q < 0), p < 0, -q < 0, Or(And(-2*p^2 + 3*q < 0, -q^2 < 0), And(-p <= 0, Or(-2*p^2 + 3*q < 0, q^2 < 0))), Or(And(p < 0, -q < 0, Or(And(-2*p^2 + 3*q < 0, -q^2 < 0), And(-p <= 0, Or(-2*p^2 + 3*q < 0, q^2 < 0)))), And(p < 0, -q < 0), And(2*p^2 - 3*q < 0, -q^2 < 0), And(p <= 0, Or(2*p^2 - 3*q < 0, q^2 < 0))), 2*p^5 - 15*p^3*q + 27*p*q^2 <= 0, p^2*q^2 - 4*q^3 = 0)):

According to coulditbe, is satisfiable: 

_EnvTry := 'hard':
coulditbe(expr) assuming real;
 = 
                              true

But according to SMTLIB:-Satisfiable, is not satisfiable: 

SMTLIB:-Satisfiable(expr) assuming real;
 = 
                             false

Why are the two results opposite

For reference, below is the output from RealDomain:-solve

RealDomain:-solve(expr);
 = 
               /           1  2\                 
              { p = p, q = - p  }, {p = p, q = 0}
               \           4   /                 

I also tried using RealDomain:-simplify, yet the output remains almost unchanged (Why?). 

How to find the dispersion relation (9). Although I calculated the dispersion relation (see Eq. (3) in DR_1.mw), it is not consistent as in the image. 

 

Is there a way to force maple not to reuse integration constant names or constant names arising from solving a differential equation.

In other words, once maple  provided e.g. an integration constant, then it may not reuse it when I solve another differential equation or integral equation in the same worksheet.

It causes problems with certain problems containing several differential equations that need to be solved sequentially.

Good evening, how do I get Maple to graph and shade the intersection area of ​​the curves? Can someone please tell me how to do this? I have used implicitplot but I don't know how to shade the area.

I'm sure this has been asked and answered, but I can't find the correct MaplePrimes page on it. How does one generate an array plot where the plots are centered within each box and not left justified? I need to make a PDF out of the document with an array plot of 1 column and 2 rows. (The following is just an example.) 

Bernoulli first order ode has form as show in wikipedia  and also on Maple own site as

Notice that it is P(x)*y above and not P(x)* y^(-1) so the y(x) must be linear in that term.   But when I give Maple this ode

ode:=diff(y(x),x) + x*y(x)^(-1)= y(x)^(-1);

Which is clearly not of the form above, it solves it as Bernoulli.  In the above ode, P(x) is x and Q(x) is 1 and n is -1.

The ode advisor correctly said it is separable. But trace shows it used Bernoulli. Also when asking it to solve it as Bernoulli, it does.

What Am I missing here?  Is it not wrong for Maple to use Bernoulli method on this ode which is not Bernoulli?

Worksheet below

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1805 and is the same as the version installed in this computer, created 2024, September 3, 11:35 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=diff(y(x),x) + x*y(x)^(-1)= y(x)^(-1);
IC:=y(1) = 0;
DEtools:-odeadvisor(ode);

diff(y(x), x)+x/y(x) = 1/y(x)

y(1) = 0

[_separable]

infolevel[dsolve]:=5;

5

dsolve(ode,y(x));  #why this says it solved it as Bernoulli ?

Methods for first order ODEs:

--- Trying classification methods ---

trying a quadrature

trying 1st order linear

trying Bernoulli

<- Bernoulli successful

y(x) = (-x^2+c__1+2*x)^(1/2), y(x) = -(-x^2+c__1+2*x)^(1/2)

dsolve(ode,y(x),[Bernoulli])

Classification methods on request

Methods to be used are: [Bernoulli]

----------------------------

* Tackling ODE using method: Bernoulli

--- Trying classification methods ---

trying Bernoulli

<- Bernoulli successful

y(x) = (-x^2+c__1+2*x)^(1/2), y(x) = -(-x^2+c__1+2*x)^(1/2)

 

 

Download why_this_ode_bernullli_sept_15_2024.mw

Dear Maple community,

I was going to export my math assignment about vector functions as an PDF, when I noticed that it butchered every column vector printed out in blue in the document as math-output. I only have this issue when exporting my work.

How do I make Maple display both coordinates of vector in the blue output field?

I produced the below image as an illustration of my problem:

Thank you in advance.

Why can't the variables in my procedure be called? Omega1, Omega2, Q1, Q2 are all expressed in the form of local variables in the loop, why can't we solve the equation because there are too many variables? At the same time, I would like to ask how to output the results of Q1 and Q2?

equation915.mw

Why can the coeff operator return the coefficient of 1/b, namely -1/x in the example below correctly,

but cannot return the coefficient of 1/x , which should be -1/b?

dummy := asympt(x*1/(1 - a*x - b*x^2), x);
coeff(dummy, 1/x);
coeff(dummy, 1/b);

What one generally wants is to be able to return the coefficients of the orders of an asymptotic expansion, but coeff seems unable to do that as soon as you want the coefficients of 1/x^n

Maple help pages is silent about this.

This is my file
 

restart;
F := proc(ee, LL) Typesetting:-mrow(InertForm:-Typeset(InertForm:-Display(eval(eval(InertForm:-MakeInert(factor(ee)), [`%*` = `*`]) = InertForm:-MakeInert(map(sort, algsubs(a*x = InertForm:-MakeInert(a*x), ee), order = plex(b))), `=`~([a, b], LL)), inert = false)), Typesetting:-mo("="), InertForm:-Typeset(eval(ee, `=`~([a, b], LL)))); end proc;
p := a^3*x^3 + 3*a^2*b*x^2*y + 3*a*b^2*x*y^2 + b^3*y^3;
L := [[2, 3], [1, 2], [1/3, -sqrt(2)]];
ans := F~(p, L);
print~(ans);

I get 

I want to the order of terms of the polynomial, e.g, (2 x + 3y)^3 like this

(2 x + 3 y)^3 = (2 x)^3 + 3 (2 x)^2 (3 y) + 3 (2 x) (3 y)^2 + (3 y )^ 3 = 8*x^3 + 36*x^2*y + 54*x*y^2 + 27*y^3. 

How can I get that

Solving differential equations, Maple sometimes unfortunately returns the solution in an utterly  unusable form I never encountered a use for.

As an example a solution was found assuming separation of variables. Maple returns the following solution,

X(ts) = DESol({diff(_Y(ts), ts, ts) + (a^4*m^2*cos(ts)^4 etc. etc. etc.}, {_Y(ts)})

Is there a command where I can just get the argument of the solution, namely the differential equation diff(_Y(ts),ts,ts) + etc  ?  or even better as diff(X(ts),ts,ts) + etc   as I intended and expected it to be without the silly and unnecessary proxy variable _Y(ts) ?

It is such a pity that Maple return these results not as a differential equation in F2(ts), but gives the result in a proxy variable which isutterly unnecessary.

Anyway, if anyone knows a command just to get the argument of the solution above to get rid of all the unnecessary and proxy structure, I will appreciate it as I currently copy the solution and redefine it, which can introduce errors and destroys the generality of the document.

A classic result states that the equation x3px2qxr=0 with real coefficients p, q, r has positive roots iff p<0, q>0, r<0 and -27r2 - 2p(2p2 - 9q)r + q2(p2 - 4q) ⩾ 0 (see for example this question). 
However, Maple appears unable to find the condition: 

a, b, c := allvalues(RootOf(x^3 + p*x^2 + q*x + r, x), 'implicit'):
RealDomain:-solve({a, b, c} >~ 0, [p, q, r]);
 = 
Warning, solutions may have been lost
                               []

Is there a way to get the above conditions in Maple with as little human intervention as possible (I mean, without a priori knowledge of the theory of polynomials)? 

Edit. An interesting problem is when these three positive roots can further be the lengths of sides of a triangle. For reference, here are some (unenlightening) results from some other software: 

I don't know how make my graph be beter for real part and imaginary part and abs part which part how work with parameter can any one explain on this example?

G.mw

First 18 19 20 21 22 23 24 Last Page 20 of 2374