Maple 2024 Questions and Posts

These are Posts and Questions associated with the product, Maple 2024

Hello

Here is the ODE

sys := {diff(w(t), t) = y(t)*z(t), diff(x(t), t) = a*w(t), diff(y(t), t) = x(t)*z(t) + w(t), diff(z(t), t) = -x(t)*y(t), w(0) = w0, x(0) = x0, y(0) = y0, z(0) = z0}

with initial parameters a=2, w0 = -0.727367040, x0 = -0.728244724, y0 = -0.237753623 and z0 = 0.014225402.

With these parameters I have no problem to plot the solution.

nsys := subs({a=2,w0 = -0.727367040, x0 = -0.728244724, y0 = -0.237753623, z0 = 0.014225402},sys);

numsol := dsolve(nsys, numeric, method = rkf45);

vars:=[x,y,z,w];

with(plots):

col := [red, magenta, cyan, blue]:
display(
  seq(
    plots:-odeplot(numsol, [t, vars[i](t)], t=0..3, color=col[i], legend=vars[i](t))
    , i=1..numelems(vars)
  )
)

How to use animate (or explore?)  with a slider for each parameter (a,x0,y0,z0,w0)? And if I want to add a tfinal as well for the simulation (in place of 3)? ( I am newbie as far as using plot and related functions in Maple).  

Many thanks. 

sometimes (not often) I get this pop-up window when I open new worksheet and run something first time in it.

And it can last for 10-20 seconds until connection is made.

I have my preferences set to  create new engine for each worksheet.

The strange thing when this happened now, is that I only had 4 worksheets open and was not running anything in any of them. So Maple was not "busy". Task manage showed 8 mservers.exe processes on it at the time. Which is not unormal.

I have 128 GB and PC was not busy at the time this happened.

Any idea what can cause this to happen?

Windows 10 home edition, Maple 2024.1

When making this plot, using smart plot (i.e. not giving the plot command the x=from..to and also not giving it y=from...to

p:=plot(0,color=red);

I need to programatically find the x=-10..10 and y=-1..1 from the variable p. But if I do

rhs~(indets(p, identical("originalview")=anything));

it gives

              {[-10. .. 10., 0. .. 0.]}

But clearly looking at the plot the y axis is from -1..1

The reason I need to determine the view from the above plot, is that I need to use same view windows size in another plot not using smart plot (phase plot) which requires one to provide explicit x and y ranges. i.e I'd like the phase plot to have same view size in terms of x range and y range.

I printed the PLOT structure but do not see another field to look at. 

Any idea or trick to find y=-1..1 values in this example ? I am using Maple 2024.1

lprint(p)
PLOT(CURVES(Matrix(200,2,{(1, 1) = -10., (2, 1) = -9.89484789949749, (3, 1) = 
-9.80335561909548, (4, 1) = -9.70046298090452, (5, 1) = -9.59688830351759, (6,
1) = -9.49380589849246, (7, 1) = -9.39823531356784, (8, 1) = -9.29927750854271,
(9, 1) = -9.19693520502513, (10, 1) = -9.09492111457286, (11, 1) = 
-8.98998708341709, (12, 1) = -8.89756113165829, (13, 1) = -8.79351140100503, (
14, 1) = -8.6890344321608, (15, 1) = -8.58835151356784, (16, 1) = 
-8.49692177788945, (17, 1) = -8.38820297889447, (18, 1) = -8.29610389547739, (
19, 1) = -8.18897076683417, (20, 1) = -8.09413979497487, (21, 1) = 
-7.99009518894472, (22, 1) = -7.89102011959799, (23, 1) = -7.78764567839196, (
24, 1) = -7.69271567135678, (25, 1) = -7.59032083417085, (26, 1) = 
-7.4839613758794, (27, 1) = -7.39137515477387, (28, 1) = -7.29137949949749, (29
, 1) = -7.18807420301508, (30, 1) = -7.08701012462312, (31, 1) = 
-6.9892254321608, (32, 1) = -6.88065220301508, (33, 1) = -6.78309432763819, (34
, 1) = -6.67893047236181, (35, 1) = -6.58454253768844, (36, 1) = 
-6.48135159396985, (37, 1) = -6.38425695778894, (38, 1) = -6.28276508643216, (
39, 1) = -6.18353823115578, (40, 1) = -6.07965690954774, (41, 1) = 
-5.97960685025126, (42, 1) = -5.87729121407035, (43, 1) = -5.77582280301507, (
44, 1) = -5.68258387135678, (45, 1) = -5.57572153366834, (46, 1) = 
-5.48014258492462, (47, 1) = -5.37823549045226, (48, 1) = -5.28069739798995, (
49, 1) = -5.17239388140703, (50, 1) = -5.07861099396985, (51, 1) = 
-4.97216657788945, (52, 1) = -4.87515404824121, (53, 1) = -4.76903758693467, (
54, 1) = -4.67747702713568, (55, 1) = -4.57320023718593, (56, 1) = 
-4.47247400603015, (57, 1) = -4.37181357688442, (58, 1) = -4.27152345929648, (
59, 1) = -4.17517605326633, (60, 1) = -4.07102195577889, (61, 1) = 
-3.97175554874372, (62, 1) = -3.86728232964824, (63, 1) = -3.77270890854271, (
64, 1) = -3.66818757386935, (65, 1) = -3.56807434874372, (66, 1) = 
-3.46820480201005, (67, 1) = -3.36389067336683, (68, 1) = -3.26781355276382, (
69, 1) = -3.16941743919598, (70, 1) = -3.06077643819095, (71, 1) = 
-2.96241091055276, (72, 1) = -2.86181373366834, (73, 1) = -2.7595089959799, (74
, 1) = -2.66547103417085, (75, 1) = -2.5652296120603, (76, 1) = 
-2.46575123417085, (77, 1) = -2.35934029145729, (78, 1) = -2.26543724422111, (
79, 1) = -2.15709262110553, (80, 1) = -2.05931995175879, (81, 1) = 
-1.96257900603015, (82, 1) = -1.85855141105528, (83, 1) = -1.75410300301508, (
84, 1) = -1.65907041708543, (85, 1) = -1.5581500321608, (86, 1) = -1.4596616, (
87, 1) = -1.35289910050251, (88, 1) = -1.26051985527638, (89, 1) = 
-1.15441893366834, (90, 1) = -1.05467848944724, (91, 1) = -.955901429145728, (
92, 1) = -.857045790954773, (93, 1) = -.756219297487437, (94, 1) = 
-.649344903517589, (95, 1) = -.551351549748743, (96, 1) = -.454619526633167, (
97, 1) = -.351214585929648, (98, 1) = -.248034748743718, (99, 1) = 
-.155424717587939, (100, 1) = -.0457214572864313, (101, 1) = .0460731437185924,
(102, 1) = .153437240201004, (103, 1) = .255905869346734, (104, 1) = 
.347398149748743, (105, 1) = .4502907879397, (106, 1) = .553865465326634, (107,
1) = .656947870351759, (108, 1) = .752518455276382, (109, 1) = .851476260301508
, (110, 1) = .953818563819095, (111, 1) = 1.05583265427136, (112, 1) = 
1.16076668542714, (113, 1) = 1.25319263718593, (114, 1) = 1.3572423678392, (115
, 1) = 1.46171933668342, (116, 1) = 1.56240225527638, (117, 1) = 
1.65383199095477, (118, 1) = 1.76255078994975, (119, 1) = 1.85464987336683, (
120, 1) = 1.96178300201005, (121, 1) = 2.05661397386935, (122, 1) = 
2.1606585798995, (123, 1) = 2.25973364924623, (124, 1) = 2.36310809045226, (125
, 1) = 2.45803809748744, (126, 1) = 2.56043293467337, (127, 1) = 
2.66679239296482, (128, 1) = 2.75937861407035, (129, 1) = 2.85937426934673, (
130, 1) = 2.96267956582914, (131, 1) = 3.06374364422111, (132, 1) = 
3.16152833668342, (133, 1) = 3.27010156582915, (134, 1) = 3.36765944120603, (
135, 1) = 3.47182329648241, (136, 1) = 3.56621123115578, (137, 1) = 
3.66940217487437, (138, 1) = 3.76649681105528, (139, 1) = 3.86798868241206, (
140, 1) = 3.96721553768844, (141, 1) = 4.07109685929648, (142, 1) = 
4.17114691859297, (143, 1) = 4.27346255477387, (144, 1) = 4.37493096582915, (
145, 1) = 4.46816989748744, (146, 1) = 4.57503223517588, (147, 1) = 
4.6706111839196, (148, 1) = 4.77251827839196, (149, 1) = 4.87005637085427, (150
, 1) = 4.97835988743719, (151, 1) = 5.07214277487437, (152, 1) = 
5.17858719095477, (153, 1) = 5.27559972060302, (154, 1) = 5.38171618190955, (
155, 1) = 5.47327674170854, (156, 1) = 5.57755353165829, (157, 1) = 
5.67827976281407, (158, 1) = 5.7789401919598, (159, 1) = 5.87923030954774, (160
, 1) = 5.97557771557789, (161, 1) = 6.07973181306533, (162, 1) = 
6.1789982201005, (163, 1) = 6.28347143919598, (164, 1) = 6.37804486030151, (165
, 1) = 6.48256619497488, (166, 1) = 6.5826794201005, (167, 1) = 
6.68254896683417, (168, 1) = 6.78686309547739, (169, 1) = 6.8829402160804, (170
, 1) = 6.98133632964824, (171, 1) = 7.08997733065327, (172, 1) = 
7.18834285829146, (173, 1) = 7.28894003517588, (174, 1) = 7.39124477286432, (
175, 1) = 7.48528273467337, (176, 1) = 7.58552415678392, (177, 1) = 
7.68500253467337, (178, 1) = 7.79141347738694, (179, 1) = 7.88531652462311, (
180, 1) = 7.9936611477387, (181, 1) = 8.09143381708543, (182, 1) = 
8.18817476281407, (183, 1) = 8.29220235778895, (184, 1) = 8.39665076582915, (
185, 1) = 8.49168335175879, (186, 1) = 8.59260373668342, (187, 1) = 
8.69109216884422, (188, 1) = 8.79785466834171, (189, 1) = 8.89023391356784, (
190, 1) = 8.99633483517588, (191, 1) = 9.09607527939699, (192, 1) = 
9.1948523396985, (193, 1) = 9.29370797788945, (194, 1) = 9.39453447135678, (195
, 1) = 9.50140886532663, (196, 1) = 9.59940221909548, (197, 1) = 
9.69613424221106, (198, 1) = 9.79953918291458, (199, 1) = 9.9027190201005, (200
, 1) = 10.},datatype = float[8],storage = rectangular,order = Fortran_order,
shape = []),COLOUR(RGB,.47058824,0.,.54901961e-1,_ATTRIBUTE("source" = 
"mathdefault"))),AXESLABELS("",""),VIEW(-10. .. 10.,DEFAULT,_ATTRIBUTE("source"
= "mathdefault")),_ATTRIBUTE("input" = [table([(1)=plot,(2)=[0]]), 
"originalview" = [-10. .. 10., 0. .. 0.], "originalaxesticks" = AXESTICKS(
DEFAULT,DEFAULT,_ATTRIBUTE("source" = "mathdefault"))]))

Update

This below is a proc that takes PLOT data struct and returns correct x,y ranges.  It seems to work ok on few tests I did. Bug reports are welcome.

 


 

restart;

#gets a PLOT struct and returns correct x,y ranges

get_x_y_range:=proc(p)::list;
local T,from_x,to_x,from_y,to_y;

   try
      T:=plottools:-getdata(p,'rangesonly');
   catch:
      error StringTools:-FormatMessage( lastexception[2..-1] );
   end try;

  from_x := op(1,T[1]);
  to_x   := op(2,T[1]);
  from_y := op(1,T[2]);        
  to_y   := op(2,T[2]);  
            
  if from_y=to_y then
     if from_y<0 then
        to_y   := 0;                
        from_y := from_y-abs(from_y)/2;
     elif from_y>0 then                     
        from_y := 0;
        to_y   := to_y+to_y/2;
    else
        from_y := -1;
        to_y   := 1;                
    fi;             
  fi;

  RETURN([from_x..to_x,from_y..to_y]);
            
end proc:

p := plot(6);
get_x_y_range(p)

[-10. .. 10., 0 .. 9.000000000]

p := plot(-3);
get_x_y_range(p)

[-10. .. 10., -4.500000000 .. 0]

p := plot(0);
get_x_y_range(p)

[-10. .. 10., -1 .. 1]

p := plot(x);
get_x_y_range(p)

[-10. .. 10., -10. .. 10.]

p := plot(sin(x));
get_x_y_range(p)

[-6.25176936900243163 .. 6.25176937505602837, -1. .. 1.]

p := plot(exp(x));
get_x_y_range(p)

[-9.94999999999999929 .. 9.94999999999999929, 0.477276339400000010e-4 .. 20952.2223799999992]

 


 

Download get_x_y_range.mw

 

Update

Warning.  plottools:-getdata(p,'rangesonly') is buggy. I replaced this with 

                  rhs~(indets(p, identical("originalview")=anything))[];

which gives more accurate Y ranges used. Here is example showing that getdata(p,'rangesonly') returns wrong y ranges for a plot compared to how it shows on the screen, So in the function above, better use the second method instead. This whole getdata(p,'rangesonly'); should be looked at by Maplesoft and fix to make it return correct values that agrees with screen view.


 

sol:=1/2/cos(x)*(sin(x)^2+(sin(x)^4+36*cos(x))^(1/2));
p:=plot(sol,x=-3..3);

(1/2)*(sin(x)^2+(sin(x)^4+36*cos(x))^(1/2))/cos(x)

plottools:-getdata(p,'rangesonly'); #WRONG y values compared to the above plot

[-1.59843684366660455 .. 1.59843684366660455, -709.846391756980552 .. 432.636304188149381]

rhs~(indets(p, identical("originalview")=anything))[]; #better result compared to plot (still not exact but better).

[-1.50000000000 .. 1.50000000000, 2.50000000000 .. 8.50000000000]

 


 

Download fixed_plot_Y_range.mw

Hi 

I teach Pre-Calulus High School level, and our school recently upgraded to Maple 2024. Like in Maple 2023 we use Assistant-Tools-import DATA and chosing an Excel file from which to import to do regression on.  In the new 2024 we have experienced, that Maple cannot read in DATA, meaning it cannot read column of DATA into a Maple document. However if we copy into Excel document on the machine locally, then there is no issue and the data is imported. 

Any idear what can cause this?  

I just saw that Maple 2024 no longer supports importing Quandl data.

If this is a feature that I will like to use, it is possible to keep both Maple 2023 and Maple 2024 installed at the same time on Microsoft Windows 11 without conflicts?  Or should I just not upgrade to Maple 2024?  I currently have a perpetual license for Maple 2023 and am on the 15-day trial for Maple 2024.

I just installed the 15-day trial for the new Maple 2024.  It looks like Maple 2024 has the same problem as Maple 2023 in that it will not maintain a connection to MapleCloud.  I can sign in to MapleCloud no problem but as soon as I close the window, it forgets my password and I have to log back in each time I want to access MapleCloud.  Is there a way for Maple 2023 or Maple 2024 to remember my Maplesoft password so I do not have to log back in every time I want to access MapleCloud?

I would like to calculate the following quantity: 

 

Where F is the SU(2) field strength tensor given by:

The gauge field V (in my code A) is defined as

 

where rj is the unit vector in spherical coordinates.

I tried to calculate it with maple, however, the result is not correct. I should get a scalar function, but my result still contains dependencies on x,y,z. And I really don't know why. I have defined the gauge field in (11) and the field strength tensor in (14). I could imagine that SumOverRepeatedIndices() in (16) does not work as I think (For each a = (1,2,3) I would like a summation over mu and nu). Greek letters are my spacetime indices and lowercase letters are my space indices. Do I perhaps have to use SU(2) indices instead of the space indices? But how exactly does a SU(2) index differ from a space index?    

restart

with(Physics)

__________________________________________________________________

(1)

with(Vectors)NULL

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `+++-`, coordinates = spherical)

[coordinatesystems = {X}, signature = `+ + + -`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(2)

Setup(realobjects = {g, diff(x, x), diff(y(x), x), diff(z(x), x), f__A(X[1])})

[realobjects = {g, phi, r, rho, theta, x, `x'`, y, `y'`, z, `z'`, f__A(r)}]

(3)

"x'(r,theta,phi)  :=  r * sin(theta) * cos(phi)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, sin(theta), cos(phi)) end proc

(4)

"y'(r,theta,phi) := r * sin(theta) * sin(phi)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, sin(theta), sin(phi)) end proc

(5)

"z'(r,theta,phi)  := r * cos(theta)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, cos(theta)) end proc

(6)

 

This ist my unit vector:

Define(R[a] = [(diff(x, x))/r, (diff(y(x), x))/r, (diff(z(x), x))/r]) 

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(7)

R[definition]

R[a] = [`x'`/r, `y'`/r, `z'`/r]

(8)

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

r^2

(9)

"Define(A[mu,~a] =(1-`f__A`(X[1]) )/(g*X[1])*LeviCivita[a, mu,j,4]* R[j] )  "

{A[mu, `~a`], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(10)

A[definition]

A[mu, `~a`] = (1-f__A(r))*Physics:-LeviCivita[4, a, j, mu]*R[j]/(g*r)

(11)

A[]

A[mu, a] = Matrix(%id = 36893489989479580364)

(12)

Define(F[mu, nu, a] = d_[nu](A[mu, a])-d_[mu](A[nu, a])+LeviCivita[a, b, c, 4]*A[mu, `~b`]*A[nu, `~c`])

{A[i, `~a`], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(13)

F[definition]

F[mu, nu, a] = -Physics:-d_[nu](A[a, mu], [X])+Physics:-d_[mu](A[a, nu], [X])-Physics:-LeviCivita[4, a, b, c]*A[mu, `~b`]*A[nu, `~c`]

(14)

simplify(F[])

F[mu, nu, a] = _rtable[36893489989585113204]

(15)

"-1/(4)Simplify(SumOverRepeatedIndices(F[mu,nu,a]*F[~mu,~nu,a])); "

-(1/4)*((2*(-1+f__A(r))*`z'`*r*g-(diff(f__A(r), r))*`z'`*r^2*g-(-1+f__A(r))^2*`z'`*`x'`)^2+4*(-1+f__A(r))^4*`y'`^2*`z'`^2+((diff(f__A(r), r))*`x'`*r^2*g+2*(1-f__A(r))*`x'`*r*g+(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+((diff(f__A(r), r))*`y'`*r^2*g+2*(1-f__A(r))*`y'`*r*g+(-1+f__A(r))^2*`y'`*`x'`)^2+(2*(-1+f__A(r))*`x'`*r*g-(diff(f__A(r), r))*`x'`*r^2*g-(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2+(-2*(-1+f__A(r))*`z'`*r*g+(diff(f__A(r), r))*`z'`*r^2*g+(-1+f__A(r))^2*`z'`*`x'`)^2+(-(diff(f__A(r), r))*`x'`*r^2*g-2*(1-f__A(r))*`x'`*r*g-(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+2*(-1+f__A(r))^4*`x'`^4+2*(-1+f__A(r))^4*`y'`^2*`x'`^2+2*(-1+f__A(r))^4*`z'`^2*`x'`^2+(-(diff(f__A(r), r))*`y'`*r^2*g-2*(1-f__A(r))*`y'`*r*g-(-1+f__A(r))^2*`y'`*`x'`)^2+(-2*(-1+f__A(r))*`x'`*r*g+(diff(f__A(r), r))*`x'`*r^2*g+(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2)/(r^8*g^4)

(16)

L__FST := simplify(-(1/4)*((2*(-1+f__A(r))*`z'`*r*g-(diff(f__A(r), r))*`z'`*r^2*g-(-1+f__A(r))^2*`z'`*`x'`)^2+4*(-1+f__A(r))^4*`y'`^2*`z'`^2+((diff(f__A(r), r))*`x'`*r^2*g+2*(1-f__A(r))*`x'`*r*g+(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+((diff(f__A(r), r))*`y'`*r^2*g+2*(1-f__A(r))*`y'`*r*g+(-1+f__A(r))^2*`y'`*`x'`)^2+(2*(-1+f__A(r))*`x'`*r*g-(diff(f__A(r), r))*`x'`*r^2*g-(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2+(-2*(-1+f__A(r))*`z'`*r*g+(diff(f__A(r), r))*`z'`*r^2*g+(-1+f__A(r))^2*`z'`*`x'`)^2+(-(diff(f__A(r), r))*`x'`*r^2*g-2*(1-f__A(r))*`x'`*r*g-(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+2*(-1+f__A(r))^4*`x'`^4+2*(-1+f__A(r))^4*`y'`^2*`x'`^2+2*(-1+f__A(r))^4*`z'`^2*`x'`^2+(-(diff(f__A(r), r))*`y'`*r^2*g-2*(1-f__A(r))*`y'`*r*g-(-1+f__A(r))^2*`y'`*`x'`)^2+(-2*(-1+f__A(r))*`x'`*r*g+(diff(f__A(r), r))*`x'`*r^2*g+(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2)/(r^8*g^4))

(-g^2*r^4*(`x'`^2+(1/2)*`y'`^2+(1/2)*`z'`^2)*(diff(f__A(r), r))^2+4*g^2*r^3*(`x'`^2+(1/2)*`y'`^2+(1/2)*`z'`^2)*(-1+f__A(r))*(diff(f__A(r), r))-4*((1/8)*(`x'`^2+`y'`^2+`z'`^2)^2*f__A(r)^2-(1/4)*(`x'`^2+`y'`^2+`z'`^2)^2*f__A(r)+(1/8)*`x'`^4+(g^2*r^2+(1/4)*`y'`^2+(1/4)*`z'`^2)*`x'`^2+(1/2)*(g^2*r^2+(1/4)*`y'`^2+(1/4)*`z'`^2)*(`y'`^2+`z'`^2))*(-1+f__A(r))^2)/(r^8*g^4)

(17)

 

Download SU(2)-field-strength-tensor_.mw

Dear all, in the example below I create a matrix(3x2) and each element contains a vector. How can I avoid the double brackets of the matrix elements or eliminate the double brackets?

Thanks for help

I know this question has been asked time and time again. Starting of with the expr . That is the end goal I want to achieve.  How would I reduce the expansion to get it into 1-f(x,y,z)/g(x,y,z) format?. I have tried all sorts of approaches.
 

restart

#

expr:=1 - (x__1*x__2 + y__1*y__2 - z__1*z__2)^2/((x__1^2 + y__1^2 - z__1^2)*(x__2^2 + y__2^2 - z__2^2))

1-(x__1*x__2+y__1*y__2-z__1*z__2)^2/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(1)

normal( (1) );

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(2)

simplify( (2) );

((y__2^2-z__2^2)*x__1^2-2*x__2*(y__1*y__2-z__1*z__2)*x__1+(y__1^2-z__1^2)*x__2^2-(y__1*z__2-y__2*z__1)^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(3)

radnormal(%)

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(4)

Test:=combine(%)

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(5)

 

n:={op(numer(Test))}

{x__1^2*y__2^2, x__2^2*y__1^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2, -2*x__1*x__2*y__1*y__2, 2*x__1*x__2*z__1*z__2, 2*y__1*y__2*z__1*z__2}

(6)

d:={op(expand(denom(Test)))}

{x__1^2*x__2^2, x__1^2*y__2^2, x__2^2*y__1^2, y__1^2*y__2^2, z__1^2*z__2^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2}

(7)

d subset n

false

(8)

d intersect n

{x__1^2*y__2^2, x__2^2*y__1^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2}

(9)

add(%[i],i=1..nops(%))

x__1^2*y__2^2-x__1^2*z__2^2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2-y__2^2*z__1^2

(10)

factor( (10) );

x__1^2*y__2^2-x__1^2*z__2^2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2-y__2^2*z__1^2

(11)

n minus d

{-2*x__1*x__2*y__1*y__2, 2*x__1*x__2*z__1*z__2, 2*y__1*y__2*z__1*z__2}

(12)

 


 

Download 2024-07-20_Q_Simplify_Reformat.mw

This is some serious problem in Latex in Maple 2024.1

I went back to using _C1, _C2 for my own constants of integration.

But I want to get the nice latex for c__1,c__2.

So to do that, my understanding is that I just need to call Maple's dsolve after restart on some random ode in order to set c__1,c__2 for display only and also for latex.

This below seems to confirm this.  But now the latex generated is all wrong and messed up on some places. 

My question is: I want to use use _C1,_C2 (i.e. the traditional constants) in my own code I write which generates solution to an ode, but for Latex, I'd like these to come out as c__1,c__2 since they look nicer.

What is the correct way to do this? What Am I doing wrong here? I do not see it.

interface(version);

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

#EXAMPLE showing using _C1 for input and latex. All works OK
restart;

sol:=y(x) = x+_C1/x^2;

y(x) = x+_C1/x^2

#correct latex. No problem compiling, but not nice looking _C1
latex(sol)

y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}

#Example showing what happens when making call to dsolve initially
restart;

dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants

y(x) = c__1*x+c__2

sol:=y(x) = x+_C1/x^2;

y(x) = x+c__1/x^2

#bad latex, gives error when compiling with texlive
latex(sol)

y \! \left(x \right) = x +\frac{c}{_}

 

 

Download latex_problem_maple_2024_july_18_2024.mw

And to confirm this is new problem in Maple 2024, I run the same exact worksheet now in Maple 2023.2, and there it works correctly. i.e. Latex generated is correct in both cases. Here is the Maple 2023.2 worksheet, you can see below the difference in Latex.

interface(version);

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

#EXAMPLE showing using _C1 for input and latex. All works OK
restart;

38296

sol:=y(x) = x+_C1/x^2;

y(x) = x+_C1/x^2

#correct latex. No problem compiling, but not nice looking _C1
latex(sol)

y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}

#Example showing what happens when making call to dsolve initially
restart;

38296

dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants

y(x) = c__1*x+c__2

sol:=y(x) = x+_C1/x^2;

y(x) = x+c__1/x^2

#good Latex now in Maple 2023.2.
latex(sol)

y \! \left(x \right) = x +\frac{c_{1}}{x^{2}}

 

 

Download latex_problem_maple_2023.2.mw

If it makes any difference to Maple, I am using the typesetting EXTENDED now for everything. But I do not think Latex should care about this, but thought to mention it just in case.

Hello

Consider,  as an example,  the following (simple) transcendental equation. 

alpha*((epsilon-1)*x+y-3*x*z-epsilon/3*x^3+b*sin(w)+3)

How to retrieve the coefficients and the terms considering that the unknowns are x,y,z and w?   Something like [x,y,x*z,x^3,sin(w),1] and their coefficients.  

many thanks

I have thought before that Maple's dsolve will try to return implicit solution automatically if unable to find explicit one or for some  other reasons it prefers implicit.

But In this ode, we see Maple returns no solution at all for this first order quadrature ode, even though it can find solution when given implicit option.

Is this a correct behaviour? Should it not have returned this solution automatically?

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 1774 and is the same as the version installed in this computer, created 2024, July 16, 17:18 hours Pacific Time.`

restart;

ode:=diff(y(x),x)=sin(y(x));
IC:=y(a)=b;

diff(y(x), x) = sin(y(x))

y(a) = b

maple_sol:=dsolve([ode,IC]);

maple_sol:=dsolve([ode,IC],explicit);

maple_sol:=dsolve([ode,IC],implicit);

x-ln(csc(y(x))-cot(y(x)))-a+ln(csc(b)-cot(b)) = 0

 

 

Download why_no_solution_by_dsolve_july_18_2024.mw

Update

I found another example of this problem. Maple gives no solution to this ODE unless option implicit is given. This is not right behaviour. If Maple can't give explicit solution, it should return the implicit one automatically. How is the user supposed to know there is a solution to this ode otherwise?
 

restart;

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1786 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

restart;

libname;

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

ode:=(x^2+y(x)^2-2*y(x))*diff(y(x),x) = 2*x:
IC:=y(0)=1:
sol:=dsolve([ode,IC],y(x));

sol:=dsolve([ode,IC],y(x),'implicit');

-exp(-1)+exp(-y(x))*x^2+exp(-y(x))*y(x)^2 = 0

sol:=dsolve([ode,IC],y(x),'useInt');

y(x) = -RootOf(exp(_Z)*x^2-(Int(_b*(_b-2)/exp(_a), _b = 0 .. -_Z))+Int(_b*(_b-2)/exp(_a), _b = 0 .. 1))

sol:=dsolve([ode,IC],y(x),'explicit');

 


 

Download why_does_not_solve_unless_implicit_august_12_2024.mw

 

I called dsolve with timelimit on this ode.  All of Maple instantly locks up.

I do not mean the worksheet, but everything. I have each worksheet using its own engine,. Not able to open new worksheet, nothing clicks. The whole front end locks up. Can't click on anything. 

Killing every mserver.exe does not even resolve this. I had to terminate all of Maple from the task manager. The strange thing, is that looking at task manager I see mserver.exe doing nothing. zero CPU. Only the front end process is at high CPU (the one with the Java icon).  It looks like the Java frontend is locked up for some reason.

 

Do others see the same thing? does this happen on the mac also? Please make sure to save all your work before trying to run this on your PC.

Maple 2024.1 on windows 10. This is first order Riccati ode.

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 1774 and is the same as the version installed in this computer, created 2024, July 16, 17:18 hours Pacific Time.`

ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

(a2*x^2+b2*x+c2)*(diff(y(x), x)) = y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0

DEtools:-odeadvisor(ode);

[_rational, _Riccati]

#WARNING. This will freeze all of Maple.
timelimit(30,dsolve(ode));


Download maple_lock_up_july_17_2024.mw

These are GUI options on my end.

 

 

 

 

UPDATE 1

in Maple 2023.2 also on windows 10,  there is no lock up at all. same code. The solution to the ode is very large. I tried using both typesetting level  to EXTENDED  and  typesetting level MAPLE STANDARD and no hang.

I wonder if this has something to do with why Maple 2024.1 locks up? But I have not changed anything in my end. I made no change in options or anything else. same PC, same graphics card. 

UPDATE 2

Found the BUG!!  

In Maple 2024.1, if I change the display option typesetting level  to EXTENDED, the front end do not hang.

If I change the display typesetting level MAPLE STANDARD, the ftont end hangs.

But why??


 

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 1774 and is the same as the version installed in this computer, created 2024, July 16, 17:18 hours Pacific Time.`

ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

(a2*x^2+b2*x+c2)*(diff(y(x), x)) = y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0

DEtools:-odeadvisor(ode);

[_rational, _Riccati]

interface(typesetting=extended):

timelimit(30,dsolve(ode));

`[Length of output exceeds limit of 1000000]`

interface(typesetting=standard):

#WARNING, this will hang MAPLE now. WHY??
timelimit(30,dsolve(ode));


 

Download maple_lock_up_july_17_2024_2.mw

ps. Reported to Maplesoft support. July 17, 2024. Hopefully this will be fixed in Maple 2024.2

 

Hello

I am trying to understand how to use Maple to solve a PDE.  Below it is a problem (Henon-Heilles system) where the answer is known.  

with(PDEtools);

infolevel[pdsolve]:=3:

declare(Hamil(x,y,u,v));

PDEHamil := u*diff(Hamil(x, y, u, v), x) + v*diff(Hamil(x, y, u, v), y) + (-2*x*y - x)*diff(Hamil(x, y, u, v), u) + (-x^2 + y^2 - y)*diff(Hamil(x, y, u, v), v) = 0;

pdsolve(PDEHamil)

Maple returns no solution, but one solution is:

sH:=1/2*(u^2+v^2)+1/2*(x^2+y^2-2/3*y^3)+x^2*y;

simplify(eval(subs(Hamil(x,y,u,v)=sH,PDEHamil)));
    0=0

What am I missing?

Many thanks.

I was working with a Dataframe when I wanted to change the datatype of multiple columns at the same time as this is quite a large dataframe. I found in the helpfile that I can change datatype by the following command: 

SubsDatatype(Data, plts, float) which then change the datatype of "plts" into float. I had hoped that using multiple columns in the command would work in this way: SubsDatatype(Data, [plts, act], float)  but apparently not. Is there a way to do this or do I have to do it column by column?

Additionally I have another question about dataframes. I would like to replace "0" in the dataframe by a "blank" as you can do in excel. How do you do this in a dataframe?

Thanks in advance for any help given!

First 29 30 31 32 33 34 35 Last Page 31 of 43