MaplePrimes Questions

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?  

before run file remove all (:) i want calculate equation but with a condition for example: when a=4 then find other parameter in my equation with respect to a=4 find other

usesol.mw

sigma1:=10^(-5):sigma2:=10^(5):sigma3:=3.7*10^(6):alpha:=5*10^(-7):beta1:=0.5*10^(-4):beta2:=0.5*10^(-4):beta3:=0.5*10^(-4):ky:=1:kz:=10^4:mu1:=10:mu2:=11:mu3:=0.86:mu4:=0.2:mu5:=1:v1:=0.5:v2:=1:alphaa:=0.6:alphas:=0.24:alphad:=0.16:A:=0.5:mus:=0.17:k:=0.2:#parameters 
dsys:={diff(x1(t),t)=sigma1*y(t)-beta1*x1(t)*y(t)/(ky+x1(t)+x2(t))-v1*x1(t)-mu1*x1(t)+(2*alphad+alphaa)*k*A*S(t),diff(x2(t),t)=v1*x1(t)-beta2*x2(t)*y(t)/(ky+x1(t)+x2(t))+alpha*v2*x1(t)*z(t)-mu2*x2(t),diff(y(t),t)=sigma2*(beta1*x1(t)*y(t)/(ky+x1(t)+x2(t))+beta2*x2(t)*y(t)/(ky+x1(t)+x2(t)))-mu4*y(t)-mu5*y(t)^2,diff(z(t),t)=sigma3+y(t)*beta3/(kz+y(t))-mu3*z(t)-v2*z(t)*x2(t),diff(S(t),t)=(k*(alphas-alphad)-mus)*S(t) }; #SYS ODE

rhs; with(DEtools);# to find the equilibrium points
fx1 = sigma1*y-beta1*x1*y-v1*x1-mu1*x1+(2*alphad+alphaa)*k*A*s; fx2 = alpha*v2*x1*z-beta2*x2*y-mu2*x2+v1*x1; fy = sigma2*(beta1*x1*y+beta2*x2*y)-mu4*y-mu5*y^2; fz = sigma3+y*(kz+y)-mu3*z-v2*z*x2; fs = (k*(alphas-alphad)-mus)*s;

eqs := solve({fs, fx1, fx2, fy, fz}, {s, x1, x2, y, z})

L := map(subs, [eqs], [x1, x2, y, z, s])

J := unapply(VectorCalculus:-Jacobian([fx1, fx2, fy, fz, fs], [x1, x2, y, z, s]), x1, x2, y, z, s); J(x1, x2, y, z, s)

Verification_known_T_R_30_07_2024.mw That`s the worksheet.

For some strange reason the command simplify doesn`t work. Beforehand it managed to simplify quite bulky expressions.

Thank you in advance!

 

I would like to solve this system of differential equations y_1 , y_2. However, there should be no exact solutions for this problem. Is there a way to get a numerical solution of such coupled equations in maple and if so, how? I know the dsolve() command, but it did not work here. The boundary conditions are f(0)-1 = K(0) = 0 and f'(inf) = K'(inf) = 0. It would be nice if someone could help me or tell me where to look to solve something like this.

restart

with(Physics)NULL

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

(1)

``Setup(realobjects = {a, g, v, K(diff(rho(x), x)), f(diff(rho(x), x))})

[realobjects = {a, g, v, K(`rho'`), f(`rho'`)}]

(2)

-(`rho'`^2*(diff(K(`rho'`), `rho'`, `rho'`))+2*`rho'`*(diff(K(`rho'`), `rho'`))+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

-(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*(diff(K(`rho'`), `rho'`))*`rho'`+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

(3)

2*(diff(f(`rho'`), `rho'`, `rho'`))/g^2+(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+(2*(`rho'`+1/2))*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(2*`rho'`^2*g^2) = 0

2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

(4)

y_1 := -(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*`rho'`*(diff(K(`rho'`), `rho'`))+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

-(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*(diff(K(`rho'`), `rho'`))*`rho'`+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

(5)

y_2 := 2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

(6)

NULL

Download coupled_deq.mw

Recently there have been some questions about the unit packages. I would like to add another one that has been on my desk for a while.

The Simple environement overloads the command frem and piecewise. The "most powerful" (can we say so?) environement Standard does not

{with(Units:-Simple)[]} minus {with(Units:-Standard)[]}
                       {frem, piecewise}

For example calculating the remainder of a length in mm does not work in the Standard environment

restart;
with(Units:-Simple):
convert(frem(1.234*Unit(m),Unit(cm)),units,mm);
                      4.000000000 Unit(mm)

restart;
with(Units:-Standard):
convert(frem(1.234*Unit(m),Unit(cm)),units,mm)
Error, invalid input: frem received 1.234*Units:-Unit(m), which is not valid for its 1st argument, x

Why is that?

In the Programming Guide, Ch. 3 "Maple Expressions", subsection 3.13 "Other Expressions" there is a section called "Composition".

There is the following snippet

In particular, although the inverses of the circular functions are commonly denoted by a power-like notation in written mathematics, in Maple, for example, sin^(-1) denotes the reciprocal of the sin function, while sin@@(-1) denotes the arcsine (arcsin).

I opened a new worksheet to check this. I found the results confusing.

1/sin

1/sin

(1)

arcsin(x)

arcsin(x)

(2)

sin^(-1)

1/sin

(3)

sin^(-1)(x)

1/sin

(4)

(sin^(-1))(x)

1/sin(x)

(5)

sin@@(-1)

arcsin

(6)

sin@@(-1)*x

arcsin*x

(7)

sin@@(-1)

arcsin

(8)

sin@@(-1)(x)

arcsin

(9)

(sin@@(-1))(x)

arcsin(x)

(10)

NULL

 

Consider (1) and (2). 

(1) is in accordance with the quoted snippet: sin^(-1) is the reciprocal of the sine function. But when we use this same expression as a function call, the function that is called is arcsine. Does this make sense to be this way?

Next, consider (3), (4), and (5), which I expected to be the same expressions as (1), (2) and (2), respectively. The only difference is that (1) and (2) use 2D math and (3), (4), and (5) use Maple input.

Both results using Maple input give as output the reciprocal of sine.

Why is there this difference between the 2D version and the Maple input version?

Consider (4) and (5). Why is it that we need to add parentheses for the argument x to be applied to the function?

Finally, what is the reasoning behind the syntax sin@@(-1) denoting arcsine?

@@ represents repeated composition. sin@@3 represents the function sin(sin(sin))). 

Is sin@@(-1) equal to arcsine simply by convention or is there some logical reason?

Download Repeated_Composition.mw

I am reading the Maple Programming Guide chapter 3 "Maple Expressions". There are subsections on "Indexed Expressions" and "Member Selection".

The following is based on reading these sections.

Consider the following module definition

m := module() export e, f:=2; end module:

What is the difference between m[e] and m:-e or m[f] and m:-f?

The documentation says that both evaluate module m's export e but the difference is that the index selection form will evaluate e before resolving the export.

What does this mean exactly?

When I try out in a worksheet both m[f] and m:-f return 2 and m[e] and m:-e return the name e.

when i finding parameter i want just choose a case for example a_1=a_1  and any other case a_2=0,and remove other case how i can do in maple

restart

with(PDEtools)

undeclare(prime)

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

(1)

with(DEtools)

with(DifferentialAlgebra)

"with(Student[ODEs][Solve]): "

with(IntegrationTools)

with(inttrans)

with(PDEtools)

with(Physics)

with(PolynomialTools)

with(RootFinding)

with(SolveTools)

with(LinearAlgebra)

with(sumtools)

``

ode := F(xi)^5*a[4]+F(xi)^4*a[3]+F(xi)^3*a[2]+(-k^2*a[1]+(diff(diff(F(xi), xi), xi))*a[5]-w)*F(xi)^2+(1/2)*F(xi)*(diff(diff(F(xi), xi), xi))*a[1]-(1/4)*(diff(F(xi), xi))^2*a[1] = 0

NULL

L := convert((cosh(xi)+sinh(xi))/(cosh(xi)-sinh(xi)), trig)

"Q(xi):=L:"

S := sum(A[i]*Q(xi)^i, i = 0 .. 1)+sum(B[i]*Q(xi)^(-i), i = 1 .. 1)

``

(2)

S

K := F(xi) = S

F1 := eval(ode, K)

simplify(%)

P := numer(lhs())*denom(rhs()) = numer(rhs())*denom(lhs())

Warning,  computation interrupted

 

NULL

solve(identity(P, xi), {k, w, A[0], A[1], B[1], a[1], a[2], a[3], a[4], a[5]})

Warning, solutions may have been lost

 

{k = k, w = w, A[0] = 0, A[1] = A[1], B[1] = 0, a[1] = a[1], a[2] = a[2], a[3] = a[3], a[4] = a[4], a[5] = a[5]}, {k = k, w = -4*A[0]*a[5], A[0] = A[0], A[1] = A[1], B[1] = B[1], a[1] = 0, a[2] = -4*a[5], a[3] = 0, a[4] = 0, a[5] = a[5]}, {k = k, w = (1/2)*A[0]*(3*k^2*A[0]^2*a[4]+2*k^2*A[0]*a[3]+k^2*a[2]+4*k^2*a[5]+2*A[0]^2*a[4]+2*A[0]*a[3]+2*a[2]), A[0] = A[0], A[1] = 0, B[1] = 0, a[1] = -(1/2)*A[0]*(3*A[0]^2*a[4]+2*A[0]*a[3]+a[2]+4*a[5]), a[2] = a[2], a[3] = a[3], a[4] = a[4], a[5] = a[5]}, {k = k, w = w, A[0] = A[0], A[1] = 0, B[1] = 0, a[1] = a[1], a[2] = (-A[0]^3*a[4]+k^2*a[1]-A[0]^2*a[3]+w)/A[0], a[3] = a[3], a[4] = a[4], a[5] = a[5]}, {k = k, w = 4*A[1]*a[5]+4*B[1]*a[5], A[0] = -A[1]-B[1], A[1] = A[1], B[1] = B[1], a[1] = 0, a[2] = -4*a[5], a[3] = 0, a[4] = 0, a[5] = a[5]}, {k = k, w = -k^2*a[1]-4*A[0]*a[5]+a[1], A[0] = A[0], A[1] = (1/4)*A[0]^2/B[1], B[1] = B[1], a[1] = a[1], a[2] = -4*a[5], a[3] = 0, a[4] = 0, a[5] = a[5]}, {k = k, w = w, A[0] = 2*B[1], A[1] = B[1], B[1] = B[1], a[1] = a[1], a[2] = (1/2)*(k^2*a[1]+w-a[1])/B[1], a[3] = 0, a[4] = 0, a[5] = -(1/8)*(k^2*a[1]+w-a[1])/B[1]}, {k = k, w = w, A[0] = A[0], A[1] = B[1], B[1] = B[1], a[1] = 0, a[2] = w/A[0], a[3] = 0, a[4] = 0, a[5] = -(1/4)*w/A[0]}, {k = k, w = 0, A[0] = 0, A[1] = B[1], B[1] = B[1], a[1] = 0, a[2] = a[2], a[3] = 0, a[4] = 0, a[5] = -(1/4)*a[2]}

(3)

Download choose_case.mw

dear maple user help me to correct this error . 

I want to solve the coupled pdes  plot the graphs but unable to get it. please help me. Here are the maple codes

restart:
L:=0.4:
d1:=0.3: d2:=0.3: 

h:=z->piecewise( z<=d1,   1,
                 z<=d1+L,   1-(delta/(2))*(1 + cos((2*(Pi)/L)*(z - d1 - L/2))), 
                 z<=d1+L+d2,  1 ):

a:=x4*S*Gr/(4*x1*x5)*sin(alpha):
b:=1/Da+(x3*M/(x1*(1+m^2))):
c:=(1/x1)*DP:
x1:=1/((1-phi1)^2.5*(1-phi2)^2.5):
x5:=khnf/kf:
x3:=shnf/sf:
x4:=(1-phi2)*((1-phi1)+phi1*(RBs1)/(RBf))+phi2*RBs2/RBf:
shnf:=sbf*((ss2+2*sbf-2*phi2*(sbf-ss2))/(ss2+2*sbf+phi2*(sbf-ss2))):
sbf:=sf*((ss1+2*sf-2*phi1*(sf-ss1))/(ss1+2*sf+phi1*(sf-ss1))):
ss2:=2.7*10^(-8):
ss1:=59.6*10^(6):
sf:=6.67*10^(-1):
khnf:=kbf*((ks2+2*kbf-2*phi2*(kbf-ks2))/(ks2+2*kbf+phi2*(kbf-ks2))):
kbf:=kf*((ks1+2*kf-2*phi1*(kf-ks1))/(ks1+2*kf+phi1*(kf-ks1))):
ks1:=401:
ks2:=76.5:
kf:=0.4972:
RBs1:=8933*16.7*10^(6):
RBs2:=6320*18*10^(6):
RBf:=1063*1.8*10^(6):
DP:=(1/192)*(18432*F-77*b^2*h(z)^8+308*b*h(z)^8*a+768*h(z)^6*a+12*b*h(z)^8)/(h(z)^4*(b*h(z)^2-6)):
conds:= w(h(z),0)=0, theta(h(z),0)=0, D[1](w)(r,0)=0, D[1](theta)(r,0)=0:
pdes:= diff(w(r, z), r, r)+(1/r)*(diff(w(r, z), r))-(1/Da+(x3/x1)*M)*w(r, z)-(1/x1)*(DP+theta*x4*sin(alpha))=0,
         diff(theta(r, z), r,r)+(1/r)*(diff(theta(r, z), r))+(S/x5)=0:
pars:= { F=1.5,Da=0.1,phi1=0.01,phi2=0.02,alpha=Pi/4,S=0.1,Gr=2,m=0.5}:
         
  PrVals:=[2, 5, 7,9]:
  colors:=[red, green, blue, black]:
  for j from 1 to numelems(PrVals) do
      pars1:=`union`( pars, {M=PrVals[j]}):
      pdSol:= pdsolve( eval([pdes], pars1),
                       eval([conds], pars1),
                       numeric
                     );
      plt[j]:=pdSol:-plot( w(r,z), z=1, r=0..1, numpoints=200, color=colors[j]);
  od:
  plots:-display( [seq(plt[j], j=1..numelems(PrVals))]);
Error, final value in for loop must be numeric or character
Error, unable to execute seq
 PrVals:=[2, 5, 7,9]:
  colors:=[red, green, blue, black]:
  for j from 1 to numelems(PrVals) do
      pars1:=`union`( pars, {M=PrVals[j]}):
      pdSol:= pdsolve( eval([pdes], pars1),
                       eval([conds], pars1),
                       numeric
                     );
      plt[j]:=pdSol:-plot( theta(r,z), z=1, r=0..1, numpoints=200, color=colors[j]);
  od:
  plots:-display( [seq(plt[j], j=1..numelems(PrVals))]);
Error, final value in for loop must be numeric or character
Error, unable to execute seq

 PrVals:=[2, 5, 7,9]:
  colors:=[red, green, blue, black]:
  for j from 1 to numelems(PrVals) do
      pars1:=`union`( pars, {M=PrVals[j]}):
      pdSol:= pdsolve( eval([pdes], pars1),
                       eval([conds], pars1),
                       numeric
                     );
      plt[j]:=pdSol:-plot( DP,  z=0..1, numpoints=200, color=colors[j]);
  od:
  plots:-display( [seq(plt[j], j=1..numelems(PrVals))]);

i am looking for simplify this type of simplifying assume beta is Real and there is any stuf package for working with complex and conjugate automaticaly

NULL

restart

with(inttrans)

with(PDEtools)

with(DEtools)

with(DifferentialAlgebra)

"with(Student[ODEs][Solve]): "

with(IntegrationTools)

with(inttrans)

with(PDEtools)

with(Physics)

with(PolynomialTools)

with(RootFinding)

with(SolveTools)

with(LinearAlgebra)

with(sumtools)

declare(u(x, t), conjugate(u(x, t)))

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

(1)

undeclare(prime)

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

(2)

B__0 := I*G(x)^3*conjugate(G(x))^2+(2*I)*G(x)^2*(diff(G(x), x))+(2*I)*(diff(G(x), x))*G(x)*conjugate(G(x))

I*G(x)^3*conjugate(G(x))^2+(2*I)*G(x)^2*(diff(G(x), x))+(2*I)*(diff(G(x), x))*G(x)*conjugate(G(x))

(3)

"G(x):=beta*exp(I*x) "

proc (x) options operator, arrow, function_assign; Physics:-`*`(beta, exp(Physics:-`*`(I, x))) end proc

(4)

R__0 := diff(G(x), `$`(x, 2))

-beta*exp(I*x)

(5)

B__0

I*beta^3*(exp(I*x))^3*conjugate(beta*exp(I*x))^2-2*beta^3*(exp(I*x))^3-2*beta^2*(exp(I*x))^2*conjugate(beta*exp(I*x))

(6)

"#`B__0 `must equal to (I*beta^(5)*exp(I*x)) after simplify betwen expresion  what code need i don't know"?""

B1 := laplace(B__0, t, s)

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)/s

(7)

R1 := laplace(R__0, t, s)

-beta*exp(I*x)/s

(8)

B2 := invlaplace(B1/s, s, t)

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t

(9)

R2 := invlaplace(R1/s, s, t)

-beta*exp(I*x)*t

(10)

Sol := B2+R2

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t-beta*exp(I*x)*t

(11)

simplify((-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t-beta*exp(I*x)*t)

(I*exp((3*I)*x)*conjugate(beta*exp(I*x))^2*beta^2-2*exp((2*I)*x)*conjugate(beta*exp(I*x))*beta-2*exp((3*I)*x)*beta^2-exp(I*x))*beta*t

(12)

expand((I*exp((3*I)*x)*conjugate(beta*exp(I*x))^2*beta^2-2*exp((2*I)*x)*conjugate(beta*exp(I*x))*beta-2*exp((3*I)*x)*beta^2-exp(I*x))*beta*t)

I*beta^3*t*(exp(I*x))^3*conjugate(beta)^2*(exp(-I*conjugate(x)))^2-2*t*beta^2*(exp(I*x))^2*conjugate(beta)*exp(-I*conjugate(x))-2*t*(exp(I*x))^3*beta^3-beta*exp(I*x)*t

(13)
 

NULL

Download simplify.mw

A little continuation of topics 1 and 2. This is a very similar cube from 2
 

but with a different equation:

f1 := (x1-sin(x1))^2+(x2-sin(x2))^2+(x3-sin(x3))^2-0.02513144866;
And other point coordinates (-.8283302152, -.8283302152, .8283302152) and (.8283302152, .8283302152, -.8283302152).

 

First 86 87 88 89 90 91 92 Last Page 88 of 2427