Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How can we eliminate nonlinear terms involving two functions in a differential equation?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(G(xi)); declare(Q(x, t)); declare(Q1(x, t))

G(xi)*`will now be displayed as`*G

 

Q(x, t)*`will now be displayed as`*Q

 

Q1(x, t)*`will now be displayed as`*Q1

(2)

NULL

q := (sqrt(P)+Q(x, t))*exp(I*gamma*P*t); B := (sqrt(P)+Q(x, t))*exp(-I*gamma*P*t); B1 := sqrt(P)+Q(x, t); P+sqrt(P)*(Q1(x, t)+Q(x, t))

GeF := I*(diff(q, t))+alpha[1]*(diff(q, x, x))+alpha[2]*(P+sqrt(P)*(Q1(x, t)+Q(x, t)))*q+alpha[3]*(P+sqrt(P)*(Q1(x, t)+Q(x, t)))^2*q+alpha[4]*(P+sqrt(P)*(Q1(x, t)+Q(x, t)))^3*q+alpha[5]*(diff(P+sqrt(P)*(Q1(x, t)+Q(x, t)), x, x))*q = 0

K := simplify(GeF*exp(-I*gamma*P*t))

(Q(x, t)^4*alpha[4]+3*Q(x, t)^3*Q1(x, t)*alpha[4]+3*(Q1(x, t)^2*alpha[4]+alpha[3])*Q(x, t)^2+Q1(x, t)*(Q1(x, t)^2*alpha[4]+4*alpha[3])*Q(x, t)+Q1(x, t)^2*alpha[3]+alpha[2]-gamma)*P^(3/2)+(6*Q(x, t)^2*alpha[4]+9*Q(x, t)*Q1(x, t)*alpha[4]+3*Q1(x, t)^2*alpha[4]+alpha[3])*P^(5/2)+(P^(1/2)*Q(x, t)*alpha[5]+P*alpha[5]+alpha[1])*(diff(diff(Q(x, t), x), x))+alpha[5]*(P^(1/2)*Q(x, t)+P)*(diff(diff(Q1(x, t), x), x))+P^(7/2)*alpha[4]+I*(diff(Q(x, t), t))+alpha[2]*(Q1(x, t)*Q(x, t)+Q(x, t)^2)*P^(1/2)+(4*P^2*alpha[4]+P*alpha[3])*Q(x, t)^3+(9*P^2*alpha[4]+2*P*alpha[3])*Q1(x, t)*Q(x, t)^2+((6*P^2*alpha[4]+P*alpha[3])*Q1(x, t)^2+4*alpha[4]*P^3+3*alpha[3]*P^2+(2*alpha[2]-gamma)*P)*Q(x, t)+P^2*Q1(x, t)^3*alpha[4]+(3*P^3*alpha[4]+2*P^2*alpha[3]+P*alpha[2])*Q1(x, t) = 0

(3)

remove(has, K, {Q(x, t)^2, Q(x, t)^3, Q(x, t)^4, Q1(x, t)^2, Q1(x, t)^3, Q1(x, t)^4})

() = 0

(4)

NULL

NULL

AA := (alpha[2]-gamma)*P^(3/2)+alpha[3]*P^(5/2)+(P*alpha[5]+alpha[1])*(diff(Q(x, t), x, x))+alpha[5]*P*(diff(Q1(x, t), x, x))+P^(7/2)*alpha[4]+I*(diff(Q(x, t), t))+(4*alpha[4]*P^3+3*alpha[3]*P^2+(2*alpha[2]-gamma)*P)*Q(x, t)+(3*P^3*alpha[4]+2*P^2*alpha[3]+P*alpha[2])*Q1(x, t) = 0

(alpha[2]-gamma)*P^(3/2)+P^(5/2)*alpha[3]+(P*alpha[5]+alpha[1])*(diff(diff(Q(x, t), x), x))+P*(diff(diff(Q1(x, t), x), x))*alpha[5]+P^(7/2)*alpha[4]+I*(diff(Q(x, t), t))+(4*alpha[4]*P^3+3*alpha[3]*P^2+(2*alpha[2]-gamma)*P)*Q(x, t)+(3*P^3*alpha[4]+2*P^2*alpha[3]+P*alpha[2])*Q1(x, t) = 0

(5)
 

test := (alpha[2]-gamma)*P^(3/2)+alpha[3]*P^(5/2)+(P*alpha[5]+alpha[1])*0+P*alpha[5]*0+P^(7/2)*alpha[4]+I*0 = 0

(alpha[2]-gamma)*P^(3/2)+P^(5/2)*alpha[3]+P^(7/2)*alpha[4] = 0

(6)
 

NULL

Download remove.mw

Hi!

Sorry if I am missing something or not following any implicit rules, I am really new to Maple and this forum.

For the sake of completeness, here the code that is given:

Ve := Vector([VeX, VeY, VeZ]);
with(LinearAlgebra);
Vh := Normalize(Vector([alphaX*Ve(1), alphaY*Ve(2), Ve(3)]), Euclidean, conjugate = false);
lensq := Vh(1)*Vh(1) + Vh(2)*Vh(2);
T1 := Vector([-Vh(2), Vh(1), 0])/sqrt(lensq);
T2 := CrossProduct(Vh, T1);
r := sqrt(x);
phi := 2*Pi*y;
t1 := r*cos(phi);
t2 := r*sin(phi);
s := 1/2*(1 + Vh(3));
t22 := (1 - s)*sqrt(1 - t1*t1) + s*t2;
Nh := t1*T1 + t22*T2 + sqrt(1 - t1*t1 - t22*t22)*Vh;
NULL;
Ne := Normalize(Vector([alphaX*Nh(1), alphaY*Nh(2), Nh(3)]), Euclidean, conjugate = false);
AV := (-1 + sqrt(1 + (alphaX^2*Ve(1)^2 + alphaY^2*Ve(2)^2)/Ve(3)^2))/2;
G1 := 1/(1 + AV);
DN := 1/(Pi*alphaX*alphaY*(Ne(1)^2/alphaX^2 + Ne(2)^2/alphaY^2 + Ne(3)^2)^2);

DVN := G1*DotProduct(Ve, Ne, conjugate = false)*DN/DotProduct(Ve, Vector([0, 0, 1]), conjugate = false);
PDF := DVN/(4*DotProduct(Ve, Ne, conjugate = false));

 

So far, so good. Now what I want to do is:

PDFint := int(PDF, [x = xInf .. xSup, y = yInf .. ySup]);

to calculate the symbolic integral of PDF over x and y. The issue is that I keep running out of memory after a few hours and my operating system (Linux Fedora) automatically shuts Maple down.

I am convinced that there must be a way to either preprocess PDF so that the int(...) command doesn't eat up all the RAM, or some different way to calculate an integral that maybe has a different structure?

I have tried codegen[optimize](PDF) and liked what it did, but I don't know how to progress with the result of it, if at all possible.

I know that there is also a way to calculate the integral numerically, but I need the analytic integral, so numerical solutions are of no use to me.

If there is really no way for me to obtain this integral, I would really appreciate an explanation of why, so that I can rest at night finally lol.

Thank you in advance,

Jane

I’ve successfully plotted this exercise, but I’m exploring ways to improve the visualization. Specifically, I’d like to know if it's possible to combine a 2D plot as a smaller inset within a 3D plot, positioned in a corner of the 3D graph.

Additionally, I’ve noticed that although the same data is plotted in different examples, the design and style of the plots can vary significantly, some look much more polished or professional. Are there recommended techniques, functions, or toolboxes in Maple that can help improve the visual design or aesthetic of the plots

Download plot.mw

Yes , i can ..a procedure for thiis?

restart; with(plots); printf("Step 1: Declare l and b as free variables for the 3D plot.\n"); l := 'l'; b := 'b'; printf("Step 2: Set fixed values for remaining parameters.\n"); a := 1; c := 1; d := .2; f := 1; epsilon := 1; printf("Step 3: Define the 3D gain function G(l,b) with fixed a,c,d and variable l,b.\n"); G := proc (l, b) options operator, arrow; 2*Im(sqrt(-a^2*f*d-a*b+(1/2)*l^2-3*a+(1/2)*sqrt(-48*a^3*f*d+4*epsilon*l^3*c-24*a*epsilon*l*c+l^4+4*l^2*c^2-48*a^2*b-12*a*l^2+36*a^2))) end proc; printf("Step 4: Create a 3D surface plot of G(l,b).\n"); gainPlot := plot3d(G(l, b), l = -6 .. 4, b = .1 .. 1.2, labels = ["Wave number l", "Parameter b", "Gain G(l,b)"], title = "3D MI Gain Spectrum over (l, b)", shading = zhue, axes = boxed, grid = [60, 60]); printf("Step 5: Display the 3D surface plot.\n"); gainPlot

Step 1: Declare l and b as free variables for the 3D plot.
Step 2: Set fixed values for remaining parameters.
Step 3: Define the 3D gain function G(l,b) with fixed a,c,d and variable l,b.
Step 4: Create a 3D surface plot of G(l,b).
Step 5: Display the 3D surface plot.

 

 
 

 

Download can_we_plotthisin_3Dshapemprimes5-5-2025.mw

in here How we can seperate the coefficent of conjugate this conjugate sign how remove from my equation ?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, t)); declare(U(xi)); declare(V(xi)); declare(P(x, t)); declare(q(x, t))

u(x, t)*`will now be displayed as`*u

 

U(xi)*`will now be displayed as`*U

 

V(xi)*`will now be displayed as`*V

 

P(x, t)*`will now be displayed as`*P

 

q(x, t)*`will now be displayed as`*q

(2)

pde := I*(diff(u(x, t), t))+diff(u(x, t), `$`(x, 2))+abs(u(x, t))^2*u(x, t) = 0

I*(diff(u(x, t), t))+diff(diff(u(x, t), x), x)+abs(u(x, t))^2*u(x, t) = 0

(3)

S := u(x, t) = (sqrt(a)+P(x, t))*exp(I*a*t)

u(x, t) = (a^(1/2)+P(x, t))*exp(I*a*t)

(4)

S1 := conjugate(u(x, t)) = (sqrt(a)+conjugate(P(x, t)))*exp(-I*a*t)

conjugate(u(x, t)) = (a^(1/2)+conjugate(P(x, t)))*exp(-I*a*t)

(5)

Q := abs(u(x, t))^2 = u(x, t)*conjugate(u(x, t))

abs(u(x, t))^2 = u(x, t)*conjugate(u(x, t))

(6)

F1 := expand(simplify(subs({S, S1}, rhs(Q))))

a+a^(1/2)*P(x, t)+a^(1/2)*conjugate(P(x, t))+abs(P(x, t))^2

(7)

F2 := abs(u(x, t))^2 = remove(has, F1, abs(P(x, t))^2)

abs(u(x, t))^2 = a+a^(1/2)*P(x, t)+a^(1/2)*conjugate(P(x, t))

(8)

FF := collect(F2, sqrt(a))

abs(u(x, t))^2 = a+(P(x, t)+conjugate(P(x, t)))*a^(1/2)

(9)

F3 := abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*sqrt(a))*rhs(S)

abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*a^(1/2))*(a^(1/2)+P(x, t))*exp(I*a*t)

(10)

F4 := remove(has, F3, P(x, t)*conjugate(P(x, t)))

abs(u(x, t))^2*u(x, t) = (a+(P(x, t)+conjugate(P(x, t)))*a^(1/2))*(a^(1/2)+P(x, t))*exp(I*a*t)

(11)

expand(%)

abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a^(1/2)*P(x, t)^2+exp(I*a*t)*a*conjugate(P(x, t))+exp(I*a*t)*a^(1/2)*conjugate(P(x, t))*P(x, t)

(12)

pde_linear, pde_nonlinear := selectremove(proc (term) options operator, arrow; not has((eval(term, P(x, t) = T*P(x, t)))/T, T) end proc, expand(%))

() = (), abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a^(1/2)*P(x, t)^2+exp(I*a*t)*a*conjugate(P(x, t))+exp(I*a*t)*a^(1/2)*conjugate(P(x, t))*P(x, t)

(13)

F6 := abs(u(x, t))^2*u(x, t) = exp(I*a*t)*a^(3/2)+2*exp(I*a*t)*a*P(x, t)+exp(I*a*t)*a*conjugate(P(x, t))

abs(u(x, t))^2*u(x, t) = exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t))

(14)

subs({F6, S}, pde)

I*(diff((a^(1/2)+P(x, t))*exp(a*t*I), t))+diff(diff((a^(1/2)+P(x, t))*exp(a*t*I), x), x)+exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(15)

eval(%)

I*((diff(P(x, t), t))*exp(a*t*I)+I*(a^(1/2)+P(x, t))*a*exp(a*t*I))+(diff(diff(P(x, t), x), x))*exp(a*t*I)+exp(a*t*I)*a^(3/2)+2*exp(a*t*I)*a*P(x, t)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(16)

expand(%)

I*(diff(P(x, t), t))*exp(a*t*I)+exp(a*t*I)*a*P(x, t)+(diff(diff(P(x, t), x), x))*exp(a*t*I)+exp(a*t*I)*a*conjugate(P(x, t)) = 0

(17)

expand(%/exp(I*a*t))

I*(diff(P(x, t), t))+a*P(x, t)+diff(diff(P(x, t), x), x)+a*conjugate(P(x, t)) = 0

(18)

PP := collect(%, a)

(P(x, t)+conjugate(P(x, t)))*a+I*(diff(P(x, t), t))+diff(diff(P(x, t), x), x) = 0

(19)

U1 := P(x, t) = r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))

P(x, t) = r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))

(20)

eval(subs(U1, PP))

(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))+conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))))*a+I*(-I*r[1]*m*exp(I*(l*x-m*t))+I*r[2]*m*exp(-I*(l*x-m*t)))-r[1]*l^2*exp(I*(l*x-m*t))-r[2]*l^2*exp(-I*(l*x-m*t)) = 0

(21)

simplify((r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))+conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t))))*a+I*(-I*r[1]*m*exp(I*(l*x-m*t))+I*r[2]*m*exp(-I*(l*x-m*t)))-r[1]*l^2*exp(I*(l*x-m*t))-r[2]*l^2*exp(-I*(l*x-m*t)) = 0)

conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t)))*a+r[2]*(-l^2+a-m)*exp(-I*(l*x-m*t))+r[1]*exp(I*(l*x-m*t))*(-l^2+a+m) = 0

(22)

J := eval(%)

conjugate(r[1]*exp(I*(l*x-m*t))+r[2]*exp(-I*(l*x-m*t)))*a+r[2]*(-l^2+a-m)*exp(-I*(l*x-m*t))+r[1]*exp(I*(l*x-m*t))*(-l^2+a+m) = 0

(23)

expand(%)

a*conjugate(r[1])*exp(I*conjugate(m)*conjugate(t))/exp(I*conjugate(l)*conjugate(x))+a*conjugate(r[2])*exp(I*conjugate(l)*conjugate(x))/exp(I*conjugate(m)*conjugate(t))-r[2]*exp(I*m*t)*l^2/exp(I*l*x)+r[2]*exp(I*m*t)*a/exp(I*l*x)-r[2]*exp(I*m*t)*m/exp(I*l*x)-r[1]*exp(I*l*x)*l^2/exp(I*m*t)+r[1]*exp(I*l*x)*a/exp(I*m*t)+r[1]*exp(I*l*x)*m/exp(I*m*t) = 0

(24)

indets(%)

{a, l, m, t, x, r[1], r[2], exp(I*l*x), exp(I*m*t), exp(I*conjugate(l)*conjugate(x)), exp(I*conjugate(m)*conjugate(t)), conjugate(l), conjugate(m), conjugate(t), conjugate(x), conjugate(r[1]), conjugate(r[2])}

(25)

subs({exp(-I*(l*x-m*t)) = Y, exp(I*(l*x-m*t)) = X}, J)

conjugate(X*r[1]+Y*r[2])*a+r[2]*(-l^2+a-m)*Y+r[1]*X*(-l^2+a+m) = 0

(26)

collect(%, {X, Y})

conjugate(X*r[1]+Y*r[2])*a+r[2]*(-l^2+a-m)*Y+r[1]*X*(-l^2+a+m) = 0

(27)

Download conjugate.mw

 

For a long time, triggered by a disagreement with one of my teachers, I wanted to demonstrate that Euler equations are not absolutely necessary to reproduce gyroscopic effects. Back then, there were no computer tools like Maple or programming languages with powerful libraries like Python. Propper calculations by hand (combining Newton’s equations and vector calculus) would have required days without guarantee of immediate success. Overall, costs and risks were too high to go into an academic argument with someone in charge of grading students.

Some years ago, I remembered the unfinished discussion with my teacher and simulated with MapleSim the simple gyroscope with two point masses that I had in mind at the time. It took only 10 minutes to demonstrate that I was right. At least I thought so. As I discovered recently when investigating the intermediate axis theorem, MapleSim derives behind the scenes Euler equations. This devalued the demonstration.

This post is about a second and successful attempt of a demonstration with Maple employing Lagrangian mechanics.  A rotating system of three point masses connected by rigid struts is used. The animation below from the attached Maple worksheet exactly reproduces a simulation of an equivalent T-shaped structure of three identical masses presented here.

 

Lagrangian Mechanics

The worksheet uses Lagrangian mechanics to derive equations of motion. Only translational energy terms are used in the Lagrangian to prevent Euler equations from being derived. To account for the bound motion of the three point masses, geometric constraints with Lagrange multipliers were added to the Lagrangian L of the system. This lead to a modified Lagrangian Lthat can be used with dedicated Maple commands to derive with little effort a set of Lagrange’s equations of the first kind and the corresponding constraints

Ein Bild, das Text, Schrift, weiß, Reihe enthält.

KI-generierte Inhalte können fehlerhaft sein.

     Ein Bild, das Schrift, Handschrift, Text, Typografie enthält.

KI-generierte Inhalte können fehlerhaft sein.

(source https://en.wikipedia.org/wiki/Lagrangian_mechanics)

For the system of three point masses the above equations lead to 9 coupled second-order ordinary differential equations (ODEs) and 3 algebraic constraints 

(Maple output from the command Physics,LagrangeEquations)

where xi, yi and zi are the components of the position vectors i of the masses 1 to 3 and the li,j are the constraints between the masses i and j, and b and h are the base and the height of the triangle.

The 12 equations together are also referred to as differential algebraic equations (DAEs). Maple has dedicated solvers for such systems which make implementation easy. The most difficult part is setting the initial conditions for all point masses. In this respect MapleSim is even easier to use since not all initial conditions have to be exactly defined by the user. MapleSim also detects constraints that allow for a simplification of the problem by reducing the number of variables to solve. This leads automatically to 3 instead of 12 equations to be solved. Computational effort is reduced in this way significantly.

 

Newtonian Mechanics

One could argue now that the above is a demonstration with Lagrangian mechanics and not with Newtonian mechanics. To treat the system in a Newtonian way, the masses must be isolated and internal forces acting on each mass via the struts are applied to each mass and effectively become external forces. This leads to 9 ODEs with 27 unknows

Ein Bild, das Text, Schrift, Screenshot enthält.

KI-generierte Inhalte können fehlerhaft sein.

Following actio=reactio for each of the (massless) struts reduces the number of unknows to 18

Ein Bild, das Text, Handschrift, Schrift enthält.

KI-generierte Inhalte können fehlerhaft sein.

To solve for the 18 unknows, 9 more relations are required. 3 algebraic constraints that keep the distance between the masses constant have already been listed in the previous section. 6 further algebraic constraints can be established from the fact that the force vectors point towards the opposing mass (see also below).
The effort to solve this system of equations will be even greater but with the benefit of having information about the internal forces in the system.
Before making this effort, it is advisable to take a closer look at the equations of motion derived so far.

 

Forces and the "mysterious" Lagrange Multipliers

Rearranging equations of motion from Lagrangian mechanics to

Ein Bild, das Text, Schrift, Screenshot, Electric Blue (Farbe) enthält.

KI-generierte Inhalte können fehlerhaft sein.

and comparing this to the equations of motion from Newtonian mechanics yields in vector notation 

or more general for the forces

Ein Bild, das Schrift, Handschrift, Reihe, Typografie enthält.

KI-generierte Inhalte können fehlerhaft sein.

where the i are the position vectors of the individual masses and the  are the constraint forces between them.  

In the case of a triangle formed by struts all internal forces must act in the direction of the edges of the triangle. If they would not act this way, opposing pairs of  and   would create a torque around the struts which would lead to an infinite angular acceleration of the massless struts. The above equation confirms this reasoning: The internal forces act in the direction of the difference vectors between the position vectors of the masses (which describe the edges) and scale with lij.

The beauty of the Lagrange multipliers in this case is that they hit 3 birds (three components of the vectors ) with one stone. This reduces the number of unknowns.

However, the Lagrange multipliers are somehow mysterious because they do not represent a physical quantity, but they can be used to calculate meaningful and correct physical results.

What makes them even more mysterious is the fact that positions constraints can be expressed in different ways. In the above example the square of the distance between the masses is kept constant instead of the distance. There are many more possibilities to formulate the constraint of constant distance and each of them results in different multipliers lij with different units. In principle they should all work equivalently but might not all be usable with dedicated solvers.

According to the above equation, the internal forces in a strut scale with the Lagrange multipliers and the length of the strut. During the back and forth flip of the triangle in the above animation the forces vary which can be appreciated from the lij in the following plot. 

Ein Bild, das Diagramm, Reihe enthält.

KI-generierte Inhalte können fehlerhaft sein.

Some observations:

  • At the start, only the strut between the red and the green masses is tensed by centrifugal forces. This would have been intuitively expected.
  • At the start, the broken symmetry in the initial conditions is already visible by the imbalance of the forces in the two other struts.
  • At no time two forces are zero
  • There is never compression in two struts at the same time. The existence of compression forces renders any attempt to replace the struts by cables useless
  • Plotted together in 3D the Lagrange multipliers describe a seemingly perfect circle.

Ein Bild, das Diagramm, Reihe, Kreis, Origami enthält.

KI-generierte Inhalte können fehlerhaft sein.

The last observation in particular shows that both the Lagrange multipliers and the IAT still hold some secrets that need to be clarified:

  • Is it an exact circle? How to prove that?
  • Does a circle appear for all initial conditions and geometries (obtuse isosceles triangles) when the intermediate axis theorem manifests?
  • What does the circle represent? Is it a kind of an invariant between the Lagrange multipliers that allows the calculation of one force when the two others are known?
  • Is there an analytical representation of the circle as a function of the geometry and the initial conditions?
  • What determines the center, the radius and the orientation of the circle?

 

Conclusion

Overall, the approach of adding non-physical terms that are zero to a physical quantity (the difference between kinetic and potential energy) to derive something meaningful is not obvious at all and underlines the genius of Lagrange. For a system of three bound masses it could be used to calculate internal forces as opposed to the more common use of calculating external constraint forces. Beyond the lack of fully satisfying intuitive explanations, the IAT still offers unanswered scientific questions.

 

PS.: 

  • The exercise was a nice cross-check of MapleSim and Maple.
  • dsolve and odeplot are awsome

 

IAT_without_Euler_equations.mw

according to what is new in Maple 2025, it says

  • Maple 2025 introduces several important improvements to simplify regarding expressions containing exponential, trigonometric, hyperbolic, and/or inverse trigonometric functions, resulting in more compact results. Other commands in the math library also provide simpler results due to these improvements.

But I still see weakness in simplify. (see also recent question).

Here is an example, A and B below are equivalent mathematically. But A is almost twice as big. So one would expect simplify(A) to return B. right? But it does not. Also using size option has no effect.  

Does one need more tricks in Maple to make it simplify this? Is this not something that a powerful CAS software like Maple should have been able to do?

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`


A:=(-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4;
B:=(4*exp(x/2)-x-2)^2;

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

(4*exp((1/2)*x)-x-2)^2

#check leaf size
MmaTranslator:-Mma:-LeafCount(A);

22

MmaTranslator:-Mma:-LeafCount(B);

13

#check they are the same
simplify(A-B);

0

#then why Maple can not simplify A to B ??
simplify(A);
simplify(A,size);
simplify(A,size,exp);
simplify(A) assuming real;

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

Student:-Precalculus:-CompleteSquare(A)

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

 

 

Download why_can_not_simplify_may_4_2025.mw

Using another software, all what is needed is call to Simpify to do it:

I also tried my most power full_simplify() function in Maple, and it had no effect

full_simplify:=proc(e::anything)
   local result::list;
   local f:=proc(a,b)
      RETURN(MmaTranslator:-Mma:-LeafCount(a)<MmaTranslator:-Mma:-LeafCount(b))
   end proc;

   #add more methods as needed

   result:=[simplify(e),
            simplify(e,size),
            simplify(combine(e)),
            simplify(combine(e),size),
            radnormal(evala( combine(e) )),
            simplify(evala( combine(e) )),
            evala(radnormal( combine(e) )),
            simplify(radnormal( combine(e) )),
            evala(factor(e)),
            simplify(e,ln),
            simplify(e,power),
            simplify(e,RootOf),
            simplify(e,sqrt),
            simplify(e,trig),
            simplify(convert(e,trig)),
            simplify(convert(e,exp)),
            combine(e)
   ];   
   RETURN( sort(result,f)[1]);   

end proc:

Calling full_simplify(A) did not simplify it.

I wanted to search for all files with some extention in directory tree. But when adding depth=infinity and also adding 'select'="*.log" (or whatever the extension I want is), then it returns an empty list even though there are files with this extension but deep in the tree.

If I remove select, then it does work, but it returns list of the files in the tree. Which I do not want. I want to filter these by select.

If I remove depth=infinity then select works but only finds such files at top level of the directory and does look down the tree where there are more such files.

It seems select and depth conflict with each others.  Adding 'all' option makes no difference.

I do not remember now if I reported this before or not.

Here is worksheet showing this problem

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

folder_name:="/home/me/maple2025"; #fails to find all such files
FileTools:-ListDirectory(folder_name,'select'="*.wav",depth=infinity);

"/home/me/maple2025"

[]

folder_name:="/home/me/maple2025"; #works but only top level
FileTools:-ListDirectory(folder_name,'select'="*.log");

"/home/me/maple2025"

["Maple_2025_Install_2025_04_03_12_34_10.log"]

folder_name:="/home/me/maple2025"; #works but this finds everything
FileTools:-ListDirectory(folder_name,depth=infinity);

"/home/me/maple2025"

`[Length of output exceeds limit of 10000]`

 


 

Download listdirectory_may_3_2025.mw

How can one get list of files with specific extension in the whole tree? And why is adding select makes it not work? Help does not say anything about select does not work when adding depth=infinity.

I suppose I can get list of all files in tree, then iterate over the list and remove all entries that do not end with the extension I wanted. But this is what select is supposed to do. For example

folder_name:="/home/me/maple2025/"; #works but this finds everything
L:=FileTools:-ListDirectory(folder_name,depth=infinity):
map(X->`if`(FileTools:-Extension(X)="wav",X,NULL),L);

Gives list of only files with extension "wav". So the above is workaround for now.

I’m currently trying to collect terms in an expression f^G(xi), but the result is not behaving as expected. I attempted two different coding approaches, but both resulted in errors. This particular case of collecting terms seems to be different from what I’ve encountered before, and I’m unsure how to resolve it.

Could you please advise on how to properly collect the terms in this situation and avoid the errors? Any insight into why this case behaves differently would also be appreciated.

Thank you for your help.

collect_term.mw

I am currently working with an ordinary differential equation (ODE) that I find difficult to express and solve accurately. In this ODE, the symbol f represents an exponential function rather than a typical variable, which adds to the confusion. Although I have followed the format used in related research papers, the results I obtain are not satisfactory.

Since this type of ODE is new and somewhat unfamiliar to me, I would greatly appreciate your guidance in:

  1. Properly formulating the ODE.

  2. Understanding the role of f in the context of exponential functions.

  3. Finding the correct and complete solutions.

  4. Learning how to clearly present each solution step by step.

Thank you in advance for your support.

AA.mw

These are the same (i.e. mathematically equivalent for real x)

A:=-x*(x - 4*exp(x/2) + 2);
B:=x*sqrt((-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4);

But can't see how to use Maple to show this, other than numerically and by plotting.

Any one knows of a trick? Below is worksheet. Using another software, it was able to show they are same:

Here are my attempts in Maple 2025
 

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

restart;

A:=-x*(x - 4*exp(x/2) + 2);
B:=x*sqrt((-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4);

-x*(x-4*exp((1/2)*x)+2)

x*((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)

plots:-display(Array([plot(A,x=-3..3),plot(B,x=-3..3)]))

 

 

Digits:=16;
seq(MmaTranslator:-Mma:-Chop(A-B),x=-2..2,.1)

16

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

simplify(A-B);

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

simplify(A-B) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

simplify(evala(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

simplify(normal(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

simplify(A-B,exp) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

simplify(evalc(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

 

 

Download show_same_may_3_2025.mw

Manually factoring each equation in this system one by one is time-consuming and inefficient. Is there a way to automate the factoring of expressions into two multiplicative terms—some of which may be single-term factors—using code?

restart

with(PDEtools)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

G1 := 5*lambda^2*alpha[1]^4*alpha[0]*a[4]+lambda^2*alpha[1]^4*a[3]-10*lambda*alpha[1]^2*alpha[0]^3*a[4]+lambda*k^2*a[1]*alpha[1]^2-6*lambda*alpha[1]^2*alpha[0]^2*a[3]+alpha[0]^5*a[4]-k^2*a[1]*alpha[0]^2-3*lambda*alpha[1]^2*alpha[0]*a[2]+alpha[0]^4*a[3]+lambda*w*alpha[1]^2+alpha[0]^3*a[2]-w*alpha[0]^2+((lambda^2*a[4]*alpha[1]^5-10*lambda*a[4]*alpha[0]^2*alpha[1]^3-4*lambda*a[3]*alpha[0]*alpha[1]^3+5*a[4]*alpha[0]^4*alpha[1]-2*k^2*a[1]*alpha[0]*alpha[1]-lambda*a[2]*alpha[1]^3+4*a[3]*alpha[0]^3*alpha[1]+3*a[2]*alpha[0]^2*alpha[1]-2*w*alpha[0]*alpha[1])*(diff(G(xi), xi))+lambda^2*beta[0]*a[5]*alpha[1]^2-4*mu*lambda*alpha[1]^4*a[3]+5*lambda^2*beta[0]*alpha[1]^4*a[4]-3*lambda*beta[0]*alpha[1]^2*a[2]-lambda*beta[0]*a[5]*alpha[0]^2-(1/2)*lambda*a[1]*alpha[0]*beta[0]-2*k^2*a[1]*alpha[0]*beta[0]+12*mu*alpha[1]^2*alpha[0]^2*a[3]+6*mu*alpha[1]^2*alpha[0]*a[2]-2*mu*k^2*a[1]*alpha[1]^2-(1/2)*mu*lambda*alpha[1]^2*a[1]+20*mu*alpha[1]^2*alpha[0]^3*a[4]-20*mu*lambda*alpha[1]^4*alpha[0]*a[4]-2*mu*lambda*alpha[1]^2*a[5]*alpha[0]-30*lambda*beta[0]*alpha[1]^2*alpha[0]^2*a[4]-12*lambda*beta[0]*alpha[1]^2*alpha[0]*a[3]-2*w*alpha[0]*beta[0]+5*beta[0]*alpha[0]^4*a[4]+4*beta[0]*alpha[0]^3*a[3]+3*beta[0]*alpha[0]^2*a[2]-2*mu*w*alpha[1]^2)/G(xi)+((1/4)*(3*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^2*a[1]+6*mu*beta[0]*alpha[1]^2*a[2]+3*mu*beta[0]*a[5]*alpha[0]^2-6*lambda*beta[0]^2*alpha[1]^2*a[3]-2*lambda*beta[0]^2*a[5]*alpha[0]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]^2*a[3]+(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]*a[2]-12*mu^2*alpha[1]^2*a[5]*alpha[0]+3*mu*a[1]*alpha[0]*beta[0]*(1/2)+10*beta[0]^2*alpha[0]^3*a[4]+6*beta[0]^2*alpha[0]^2*a[3]+3*beta[0]^2*alpha[0]*a[2]-k^2*a[1]*beta[0]^2+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]^3*a[4]-(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*k^2*a[1]*alpha[1]^2+(5*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^4*alpha[0]*a[4]+(4*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^2*a[5]*alpha[0]+(1/2)*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]^2*lambda*a[1]-9*mu^2*alpha[1]^2*a[1]*(1/4)-(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*w*alpha[1]^2+(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2)*alpha[1]^4*a[3]-(1/4)*lambda*beta[0]^2*a[1]-30*lambda*beta[0]^2*alpha[1]^2*alpha[0]*a[4]+24*mu*beta[0]*alpha[1]^2*alpha[0]*a[3]+60*mu*beta[0]*alpha[1]^2*alpha[0]^2*a[4]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*lambda*a[5]*alpha[0]-20*mu*lambda*beta[0]*alpha[1]^4*a[4]-7*mu*lambda*beta[0]*a[5]*alpha[1]^2+(2*mu*alpha[1]^3*a[2]-2*w*alpha[1]*beta[0]-4*lambda*beta[0]*alpha[1]^3*a[3]+8*mu*alpha[1]^3*alpha[0]*a[3]+mu*alpha[1]*a[5]*alpha[0]^2+(1/2)*mu*alpha[1]*alpha[0]*a[1]+20*mu*alpha[1]^3*alpha[0]^2*a[4]-4*mu*lambda*alpha[1]^5*a[4]-mu*lambda*alpha[1]^3*a[5]+20*beta[0]*alpha[1]*alpha[0]^3*a[4]+12*beta[0]*alpha[1]*alpha[0]^2*a[3]+6*beta[0]*alpha[1]*alpha[0]*a[2]-2*k^2*a[1]*alpha[1]*beta[0]-(1/2)*lambda*beta[0]*alpha[1]*a[1]-20*lambda*beta[0]*alpha[1]^3*alpha[0]*a[4]-2*lambda*beta[0]*a[5]*alpha[1]*alpha[0])*(diff(G(xi), xi))-w*beta[0]^2)/G(xi)^2+(((lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]^3*a[2]+(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2)*alpha[1]^5*a[4]+(2*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^3*a[5]+3*beta[0]^2*alpha[1]*a[2]+3*mu*beta[0]*alpha[1]*a[1]*(1/2)+8*mu*beta[0]*alpha[1]^3*a[3]-2*lambda*beta[0]^2*a[5]*alpha[1]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*alpha[0]*a[3]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]*a[5]*alpha[0]^2+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]*alpha[0]*a[1]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*alpha[0]^2*a[4]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*lambda*a[5]+30*beta[0]^2*alpha[1]*alpha[0]^2*a[4]+12*beta[0]^2*alpha[1]*alpha[0]*a[3]-6*mu^2*alpha[1]^3*a[5]-10*lambda*beta[0]^2*alpha[1]^3*a[4]+40*mu*beta[0]*alpha[1]^3*alpha[0]*a[4]+8*mu*beta[0]*a[5]*alpha[1]*alpha[0])*(diff(G(xi), xi))+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^4*a[3]+(5*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*beta[0]*alpha[1]^4*a[4]+(6*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*beta[0]*a[5]*alpha[1]^2-10*lambda*beta[0]^3*alpha[1]^2*a[4]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^2*a[1]+(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*a[2]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*a[5]*alpha[0]^2+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*a[1]*alpha[0]*beta[0]+12*mu*beta[0]^2*alpha[1]^2*a[3]+6*mu*beta[0]^2*a[5]*alpha[0]+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^4*alpha[0]*a[4]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^2*a[5]*alpha[0]+beta[0]^3*a[2]-14*mu^2*beta[0]*a[5]*alpha[1]^2+(30*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*alpha[0]^2*a[4]+(5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*lambda*a[5]*alpha[1]^2+(12*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*alpha[0]*a[3]+60*mu*beta[0]^2*alpha[1]^2*alpha[0]*a[4]+mu*beta[0]^2*a[1]-lambda*beta[0]^3*a[5]+10*beta[0]^3*alpha[0]^2*a[4]+4*beta[0]^3*alpha[0]*a[3])/G(xi)^3+((4*beta[0]^3*alpha[1]*a[3]+(1/2)*(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]*a[1]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^3*a[3]+7*mu*beta[0]^2*a[5]*alpha[1]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^5*a[4]+(5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^3*a[5]+20*beta[0]^3*alpha[1]*alpha[0]*a[4]+20*mu*beta[0]^2*alpha[1]^3*a[4]+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^3*alpha[0]*a[4]+(8*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*a[5]*alpha[1]*alpha[0])*(diff(G(xi), xi))+20*mu*beta[0]^3*alpha[1]^2*a[4]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^2*a[3]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[5]*alpha[0]+5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^4*alpha[0]*a[4]+4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^2*a[5]*alpha[0]+(17*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*beta[0]*a[5]*alpha[1]^2+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*beta[0]*alpha[1]^4*a[4]+beta[0]^4*a[3]+(30*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^2*alpha[0]*a[4]+(1/4)*(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[1]+3*mu*beta[0]^3*a[5]+5*beta[0]^4*alpha[0]*a[4]+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^4*a[3]+3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^2*a[1]*(1/4))/G(xi)^4+(((lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^5*a[4]+2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^3*a[5]+5*beta[0]^4*alpha[1]*a[4]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[5]*alpha[1]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^3*a[4])*(diff(G(xi), xi))+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^3*a[5]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^3*alpha[1]^2*a[4]+5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*beta[0]*alpha[1]^4*a[4]+6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*beta[0]*a[5]*alpha[1]^2+beta[0]^5*a[4])/G(xi)^5 = 0

indets(G1)

{k, lambda, mu, w, xi, B[1], B[2], a[1], a[2], a[3], a[4], a[5], alpha[0], alpha[1], beta[0], G(xi), diff(G(xi), xi)}

(2)

``

(3)

eq0 := 5*lambda^2*a[4]*alpha[0]*alpha[1]^4+lambda^2*a[3]*alpha[1]^4-10*lambda*a[4]*alpha[0]^3*alpha[1]^2+k^2*lambda*a[1]*alpha[1]^2-6*lambda*a[3]*alpha[0]^2*alpha[1]^2+a[4]*alpha[0]^5-k^2*a[1]*alpha[0]^2-3*lambda*a[2]*alpha[0]*alpha[1]^2+a[3]*alpha[0]^4+lambda*w*alpha[1]^2+a[2]*alpha[0]^3-w*alpha[0]^2 = 0

``

eq1 := lambda^2*a[4]*alpha[1]^5-10*lambda*a[4]*alpha[0]^2*alpha[1]^3-4*lambda*a[3]*alpha[0]*alpha[1]^3+5*a[4]*alpha[0]^4*alpha[1]-2*k^2*a[1]*alpha[0]*alpha[1]-lambda*a[2]*alpha[1]^3+4*a[3]*alpha[0]^3*alpha[1]+3*a[2]*alpha[0]^2*alpha[1]-2*w*alpha[0]*alpha[1] = 0

eq2 := lambda^2*beta[0]*a[5]*alpha[1]^2+6*mu*alpha[1]^2*alpha[0]*a[2]-2*mu*k^2*a[1]*alpha[1]^2-(1/2)*mu*alpha[1]^2*lambda*a[1]+20*mu*alpha[1]^2*alpha[0]^3*a[4]+12*mu*alpha[1]^2*alpha[0]^2*a[3]-(1/2)*lambda*a[1]*alpha[0]*beta[0]-2*k^2*a[1]*alpha[0]*beta[0]-3*lambda*beta[0]*alpha[1]^2*a[2]-lambda*beta[0]*a[5]*alpha[0]^2+5*lambda^2*beta[0]*alpha[1]^4*a[4]-4*mu*lambda*alpha[1]^4*a[3]-2*mu*w*alpha[1]^2+5*beta[0]*alpha[0]^4*a[4]+4*beta[0]*alpha[0]^3*a[3]+3*beta[0]*alpha[0]^2*a[2]-2*w*alpha[0]*beta[0]-20*mu*lambda*alpha[1]^4*alpha[0]*a[4]-2*mu*alpha[1]^2*lambda*a[5]*alpha[0]-30*lambda*beta[0]*alpha[1]^2*alpha[0]^2*a[4]-12*lambda*beta[0]*alpha[1]^2*alpha[0]*a[3] = 0

NULL

eq3 := (1/4)*(3*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^2*a[1]-(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*k^2*a[1]*alpha[1]^2+(1/2)*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]^2*lambda*a[1]+(5*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^4*alpha[0]*a[4]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]^3*a[4]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]^2*a[3]-30*lambda*beta[0]^2*alpha[1]^2*alpha[0]*a[4]-20*mu*beta[0]*lambda*alpha[1]^4*a[4]+(4*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^2*a[5]*alpha[0]-12*mu^2*alpha[1]^2*a[5]*alpha[0]+(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*alpha[0]*a[2]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^2*lambda*a[5]*alpha[0]-7*mu*beta[0]*lambda*a[5]*alpha[1]^2+24*mu*beta[0]*alpha[1]^2*alpha[0]*a[3]-9*mu^2*alpha[1]^2*a[1]*(1/4)-w*beta[0]^2+3*beta[0]^2*alpha[0]*a[2]-(1/4)*lambda*beta[0]^2*a[1]-k^2*a[1]*beta[0]^2+10*beta[0]^2*alpha[0]^3*a[4]+6*beta[0]^2*alpha[0]^2*a[3]-(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*w*alpha[1]^2+3*mu*a[1]*alpha[0]*beta[0]*(1/2)+(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2)*alpha[1]^4*a[3]+3*mu*beta[0]*a[5]*alpha[0]^2-6*lambda*beta[0]^2*alpha[1]^2*a[3]-2*lambda*beta[0]^2*a[5]*alpha[0]+6*mu*beta[0]*alpha[1]^2*a[2]+60*mu*beta[0]*alpha[1]^2*alpha[0]^2*a[4] = 0

eq4 := 2*mu*alpha[1]^3*a[2]-2*w*alpha[1]*beta[0]-20*lambda*beta[0]*alpha[1]^3*alpha[0]*a[4]-2*lambda*beta[0]*a[5]*alpha[1]*alpha[0]-2*k^2*a[1]*alpha[1]*beta[0]+20*beta[0]*alpha[1]*alpha[0]^3*a[4]+12*beta[0]*alpha[1]*alpha[0]^2*a[3]+6*beta[0]*alpha[1]*alpha[0]*a[2]+8*mu*alpha[1]^3*alpha[0]*a[3]+mu*alpha[1]*a[5]*alpha[0]^2+(1/2)*mu*alpha[1]*alpha[0]*a[1]-4*lambda*beta[0]*alpha[1]^3*a[3]-lambda*alpha[1]^3*mu*a[5]-(1/2)*lambda*beta[0]*alpha[1]*a[1]+20*mu*alpha[1]^3*alpha[0]^2*a[4]-4*mu*lambda*alpha[1]^5*a[4] = 0

eq5 := -6*mu^2*alpha[1]^3*a[5]+(2*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*alpha[1]^3*a[5]+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]^3*a[2]+(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2)*alpha[1]^5*a[4]+3*beta[0]^2*alpha[1]*a[2]+40*mu*beta[0]*alpha[1]^3*alpha[0]*a[4]+8*mu*beta[0]*a[5]*alpha[1]*alpha[0]+30*beta[0]^2*alpha[1]*alpha[0]^2*a[4]+12*beta[0]^2*alpha[1]*alpha[0]*a[3]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*alpha[0]*a[3]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]*a[5]*alpha[0]^2+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*alpha[1]*alpha[0]*a[1]+8*mu*beta[0]*alpha[1]^3*a[3]+3*mu*beta[0]*alpha[1]*a[1]*(1/2)-10*lambda*beta[0]^2*alpha[1]^3*a[4]-2*lambda*beta[0]^2*a[5]*alpha[1]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*alpha[0]^2*a[4]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*lambda*a[5] = 0

eq6 := -14*mu^2*beta[0]*a[5]*alpha[1]^2+beta[0]^3*a[2]+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)*a[1]*alpha[0]*beta[0]+12*mu*beta[0]^2*alpha[1]^2*a[3]+6*mu*beta[0]^2*a[5]*alpha[0]-10*lambda*beta[0]^3*alpha[1]^2*a[4]+(6*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*beta[0]*a[5]*alpha[1]^2+(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*a[2]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*a[5]*alpha[0]^2+(5*(-(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*lambda+4*mu^2))*beta[0]*alpha[1]^4*a[4]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^4*a[3]+(2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^2*a[1]+10*beta[0]^3*alpha[0]^2*a[4]+4*beta[0]^3*alpha[0]*a[3]-lambda*beta[0]^3*a[5]+mu*beta[0]^2*a[1]+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^4*alpha[0]*a[4]+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^2*a[5]*alpha[0]+(30*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*alpha[0]^2*a[4]+(5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*lambda*a[5]*alpha[1]^2+(12*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^2*alpha[0]*a[3]+60*mu*beta[0]^2*alpha[1]^2*alpha[0]*a[4] = 0

eq7 := 4*beta[0]^3*alpha[1]*a[3]+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^3*alpha[0]*a[4]+(8*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*a[5]*alpha[1]*alpha[0]+20*beta[0]^3*alpha[1]*alpha[0]*a[4]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]^3*a[3]+(5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*alpha[1]^3*mu*a[5]+(1/2)*(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*alpha[1]*a[1]+20*mu*beta[0]^2*alpha[1]^3*a[4]+7*mu*beta[0]^2*a[5]*alpha[1]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*mu*alpha[1]^5*a[4] = 0

eq8 := 4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^2*a[5]*alpha[0]+5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^4*alpha[0]*a[4]+beta[0]^4*a[3]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^2*a[3]+(4*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[5]*alpha[0]+20*mu*beta[0]^3*alpha[1]^2*a[4]+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^4*a[3]+3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^2*a[1]*(1/4)+5*beta[0]^4*alpha[0]*a[4]+3*mu*beta[0]^3*a[5]+(1/4)*(3*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[1]+(30*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^2*alpha[0]*a[4]+(17*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*mu*a[5]*alpha[1]^2+(20*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]*mu*alpha[1]^4*a[4] = 0

eq9 := (10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*alpha[1]^3*a[4]+(6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^2*a[5]*alpha[1]+5*beta[0]^4*alpha[1]*a[4]+(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^5*a[4]+2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*alpha[1]^3*a[5] = 0

eq10 := (2*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^3*a[5]+beta[0]^5*a[4]+5*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*beta[0]*alpha[1]^4*a[4]+6*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda)^2*beta[0]*a[5]*alpha[1]^2+(10*(lambda*B[1]^2-lambda*B[2]^2-mu^2/lambda))*beta[0]^3*alpha[1]^2*a[4] = 0

 

with(LargeExpressions)

COEFFS := solve({eq0, eq1, eq10, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9}, {w, a[1], a[2], alpha[0], alpha[1], beta[0]})

Download by_hand!.mw

Substituting the solutions into the ODE doesn't yield zero, despite the code appearing correct—suggesting either complexity, symbolic limits, or an implementation issue.

 

 

17-ode.mw

 

also in this ode why solution is like this how i can fixed this too

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

ode := diff(G(xi), xi) = sqrt(C*G(xi)^4+B*G(xi)^2+A)

diff(G(xi), xi) = (C*G(xi)^4+B*G(xi)^2+A)^(1/2)

(2)

dsolve(ode, G(xi))

xi-Intat(1/(C*_a^4+B*_a^2+A)^(1/2), _a = G(xi))+c__1 = 0

(3)
 

NULL

Download v1.mw

My maplet (author: Xavier Cormier) "sudokuvision_multithread3" allows you to generate, solve, and play nxm region sudoku puzzles. It is possible to import lists of puzzles in .csv, .sdm, and .sdk format. It loads a grid in line format. It saves puzzles in .txt and .csv format to import them on Android (Andoku3, OpenSudoku; you must re-save the file in .sdm) and on iOS (SmartSudoku, Good Sudoku). It saves game puzzles (in numbers or colors) and their solution as a .gif image.
Two possible interfaces.
Multithreading is used to generate sudoku puzzles in parallel on multiple threads: we use sequences for the random number and the number of sudokus for each thread:
e.g., [4521,7458]=s1 for the random number and [2,2]=s2 for the number of sudokus. We then generate 2[i] sudokus for the ith thread. with s1[i] as a random integer.
The maplet is compatible with Maple 2021 but not with Maple 2015.

Go to my Maple Cloud link :

https://maple.cloud/app/6283420531032064/sudoku+multithread3?key=8DBF1E6D71EF423B9BE883C27FF0FD892C14B4FCD25B4920A29AFE4E4B4363B8

2 3 4 5 6 7 8 Last Page 4 of 2205