acer

31901 Reputation

29 Badges

19 years, 204 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

I can think of a few ways to accomplish this.

The first way involves using a different sort call on each of the inner sums (coefficients of the lambda__ij(t) terms). This happens to work for these examples, although in a more general case it could run into difficulties or need even more special handling. This is what I did in the attachment below; it's not completely general code, though it does contain some generic stuff rather than being all ad hoc op stuff.

I could have made considerably shorter code to get this, at the expense of being more ad hoc (eg. leveraging the fact that the problematic sums are the coefficients of the lambda__ij(t) and thus acted on more easily via collect, or using the simple common structure of those sums, etc, etc). I deliberately avoided such here. I find chipping away at the more general problem far more interesting and worthwhile.

NB. Due how sort acts on the uniquified structure stored in kernel memory, invoking the code can actually change part of the original odes, in-place. (Assigning all results to a new variable may not always be strictly necessary, though I do it here.)

restart;

odes := [-(diff(x__1(t), t, t))+(2*x__1(t)-2*x__2(t))*`λ__12`(t)+(2*(-x__3(t)+x__1(t)))*`λ__31`(t) = 0, -(diff(y__1(t), t, t))+(2*y__1(t)-2*y__2(t))*`λ__12`(t)+(2*(-y__3(t)+y__1(t)))*`λ__31`(t) = 0, -(diff(z__1(t), t, t))+(2*z__1(t)-2*z__2(t))*`λ__12`(t)+(2*(z__1(t)-z__3(t)))*`λ__31`(t) = 0, -(diff(x__2(t), t, t))+(-2*x__1(t)+2*x__2(t))*`λ__12`(t)+(2*(x__2(t)-x__3(t)))*`λ__23`(t) = 0, -(diff(y__2(t), t, t))+(-2*y__1(t)+2*y__2(t))*`λ__12`(t)+(2*(y__2(t)-y__3(t)))*`λ__23`(t) = 0, -(diff(z__2(t), t, t))+(-2*z__1(t)+2*z__2(t))*`λ__12`(t)+(2*(z__2(t)-z__3(t)))*`λ__23`(t) = 0, -(diff(x__3(t), t, t))+(-2*x__2(t)+2*x__3(t))*`λ__23`(t)-(2*(-x__3(t)+x__1(t)))*`λ__31`(t) = 0, -(diff(y__3(t), t, t))+(-2*y__2(t)+2*y__3(t))*`λ__23`(t)-(2*(-y__3(t)+y__1(t)))*`λ__31`(t) = 0, -(diff(z__3(t), t, t))+(-2*z__2(t)+2*z__3(t))*`λ__23`(t)-(2*(z__1(t)-z__3(t)))*`λ__31`(t) = 0]

map(print, odes): # the original

-(diff(diff(x__1(t), t), t))+(2*x__1(t)-2*x__2(t))*lambda__12(t)+2*(-x__3(t)+x__1(t))*lambda__31(t) = 0

-(diff(diff(y__1(t), t), t))+(2*y__1(t)-2*y__2(t))*lambda__12(t)+2*(-y__3(t)+y__1(t))*lambda__31(t) = 0

-(diff(diff(z__1(t), t), t))+(2*z__1(t)-2*z__2(t))*lambda__12(t)+2*(z__1(t)-z__3(t))*lambda__31(t) = 0

-(diff(diff(x__2(t), t), t))+(-2*x__1(t)+2*x__2(t))*lambda__12(t)+2*(x__2(t)-x__3(t))*lambda__23(t) = 0

-(diff(diff(y__2(t), t), t))+(-2*y__1(t)+2*y__2(t))*lambda__12(t)+2*(y__2(t)-y__3(t))*lambda__23(t) = 0

-(diff(diff(z__2(t), t), t))+(-2*z__1(t)+2*z__2(t))*lambda__12(t)+2*(z__2(t)-z__3(t))*lambda__23(t) = 0

-(diff(diff(x__3(t), t), t))+(-2*x__2(t)+2*x__3(t))*lambda__23(t)-2*(-x__3(t)+x__1(t))*lambda__31(t) = 0

-(diff(diff(y__3(t), t), t))+(-2*y__2(t)+2*y__3(t))*lambda__23(t)-2*(-y__3(t)+y__1(t))*lambda__31(t) = 0

-(diff(diff(z__3(t), t), t))+(-2*z__2(t)+2*z__3(t))*lambda__23(t)-2*(z__1(t)-z__3(t))*lambda__31(t) = 0

the code

new := F(odes):
map(print, new):

-(diff(diff(x__1(t), t), t))+(2*x__1(t)-2*x__2(t))*lambda__12(t)+2*(x__1(t)-x__3(t))*lambda__31(t) = 0

-(diff(diff(y__1(t), t), t))+(2*y__1(t)-2*y__2(t))*lambda__12(t)+2*(y__1(t)-y__3(t))*lambda__31(t) = 0

-(diff(diff(z__1(t), t), t))+(2*z__1(t)-2*z__2(t))*lambda__12(t)+2*(z__1(t)-z__3(t))*lambda__31(t) = 0

-(diff(diff(x__2(t), t), t))+(2*x__2(t)-2*x__1(t))*lambda__12(t)+2*(x__2(t)-x__3(t))*lambda__23(t) = 0

-(diff(diff(y__2(t), t), t))+(2*y__2(t)-2*y__1(t))*lambda__12(t)+2*(y__2(t)-y__3(t))*lambda__23(t) = 0

-(diff(diff(z__2(t), t), t))+(2*z__2(t)-2*z__1(t))*lambda__12(t)+2*(z__2(t)-z__3(t))*lambda__23(t) = 0

-(diff(diff(x__3(t), t), t))+(2*x__3(t)-2*x__2(t))*lambda__23(t)-2*(x__1(t)-x__3(t))*lambda__31(t) = 0

-(diff(diff(y__3(t), t), t))+(2*y__3(t)-2*y__2(t))*lambda__23(t)-2*(y__1(t)-y__3(t))*lambda__31(t) = 0

-(diff(diff(z__3(t), t), t))+(2*z__3(t)-2*z__2(t))*lambda__23(t)-2*(z__1(t)-z__3(t))*lambda__31(t) = 0

new2 := F(simplify(-~new)):
map(print, new2):

diff(diff(x__1(t), t), t)+(2*x__2(t)-2*x__1(t))*lambda__12(t)+(2*x__3(t)-2*x__1(t))*lambda__31(t) = 0

diff(diff(y__1(t), t), t)+(2*y__2(t)-2*y__1(t))*lambda__12(t)+(2*y__3(t)-2*y__1(t))*lambda__31(t) = 0

diff(diff(z__1(t), t), t)+(2*z__2(t)-2*z__1(t))*lambda__12(t)+(2*z__3(t)-2*z__1(t))*lambda__31(t) = 0

diff(diff(x__2(t), t), t)+(2*x__1(t)-2*x__2(t))*lambda__12(t)+(2*x__3(t)-2*x__2(t))*lambda__23(t) = 0

diff(diff(y__2(t), t), t)+(2*y__1(t)-2*y__2(t))*lambda__12(t)+(2*y__3(t)-2*y__2(t))*lambda__23(t) = 0

diff(diff(z__2(t), t), t)+(2*z__1(t)-2*z__2(t))*lambda__12(t)+(2*z__3(t)-2*z__2(t))*lambda__23(t) = 0

diff(diff(x__3(t), t), t)+(2*x__2(t)-2*x__3(t))*lambda__23(t)+(2*x__1(t)-2*x__3(t))*lambda__31(t) = 0

diff(diff(y__3(t), t), t)+(2*y__2(t)-2*y__3(t))*lambda__23(t)+(2*y__1(t)-2*y__3(t))*lambda__31(t) = 0

diff(diff(z__3(t), t), t)+(2*z__2(t)-2*z__3(t))*lambda__23(t)+(2*z__1(t)-2*z__3(t))*lambda__31(t) = 0

Download Format_odes_acc.mw

A second way involves using a single kind of sort call (which is more resistant to some weaknesses of the first way) and produces a uniform ordering with the inner sums (coefficients of lambda__ij(t) terms). The uniformity advantage is balanced by some extra leading minus signs in from of said coefficients. I haven't bothered to attach that right now.

It's a little tricky to code some of this because type(...,polynom) can catch too much in its net. And there are some wonderfully Maple-ish quirks of automatic simplification of coefficients when using collect, and fancy handling. Also fun because sign doesn't accept an order=plex(...) option akin to how sort does.

ps. I changes your original to assign a list to name odes, rather than a bare expression sequence (which I find to be error-prone for some people).

You were using the subscripted name T[S] as well as assigning a value to name T. That's a collision, and assigning to the latter clobbers your assignment to the former. You could use the name T__S instead of T[S], since it also renders subscripted in 2D Input, but is distinct from T.

If you want to use a subscripted name as the parameter of your operator then use x__2 instead of x[2]. (In 2D Input mode, that is x followed by two underscores, followed by the 2.)

Also, you were incorrectly using square brackets as if they delimited subexpressions. They don't. In Maple square brackets construct a list. Use round brackets to delimit to subexpressions (ie. term grouping, etc).

You don't have to construct T as an operator. You could also use just an expression. (See the two variants, below.)

restart

T__S := 290

eta := 17; lambda := 24

h := .2; `Ω` := 2*Pi*10; R := 2

T := proc (x__2) options operator, arrow; eta*`Ω`^2*R^2*(x__2/h-(1/2)*x__2^2/h^2)/lambda+T__S end proc

plot(T, .1 .. .2)

restart

T__S := 290

eta := 17; lambda := 24

h := .2; `Ω` := 2*Pi*10; R := 2

T := eta*`Ω`^2*R^2*(x__2/h-(1/2)*(x__2/h)^2)/lambda+T__S

plot(T, x__2 = .1 .. .2)

Download TSL_bung_9_ac.mw

I was able to find it here, as a Post.

You can find your own postings from your profile page. (See also the Questions,Posts,Answers,Replies tabbed links).

You seem to be asking for sets, rather than lists.

I can't tell whether you mean M, or Sol. So I've done both in the attachment. You can change either back.

Systmes_Idea_ac.mw

If you're asking for something else then please explain in detail, thanks.

Systèmes : Test idée

restart

L := [seq(S[i], i = 1 .. 12)]

[S[1], S[2], S[3], S[4], S[5], S[6], S[7], S[8], S[9], S[10], S[11], S[12]]

sys_1 := [x+y = 2, x-y = 0]

sys_2 := [x+2*y = 3, x-3*y = -1]

sys_3 := [x+4*y = -3, x-3*y = -1]

sys_4 := [x+2*y = 3, x-3*y = 3]

sys_5 := [x-2*y = 3, x-3*y = -1]

sys_6 := [x+2*y = 7, x-3*y = -1]

sys_7 := [x+2*y = 8, x-3*y = -1]

sys_8 := [x+2*y = 9, x-3*y = -1]

sys_9 := [x+2*y = 10, x-3*y = -1]

sys_10 := [x+2*y = -3, x-3*y = -1]

sys_11 := [x+2*y = -4, x-3*y = -1]

sys_12 := [x+2*y = -5, x-3*y = -1]

M := [seq({(eval(cat(sys_, i)))[]}, i = 1 .. 12)]

[{x-y = 0, x+y = 2}, {x-3*y = -1, x+2*y = 3}, {x-3*y = -1, x+4*y = -3}, {x-3*y = 3, x+2*y = 3}, {x-3*y = -1, x-2*y = 3}, {x-3*y = -1, x+2*y = 7}, {x-3*y = -1, x+2*y = 8}, {x-3*y = -1, x+2*y = 9}, {x-3*y = -1, x+2*y = 10}, {x-3*y = -1, x+2*y = -3}, {x-3*y = -1, x+2*y = -4}, {x-3*y = -1, x+2*y = -5}]

NULL

Sol := map(proc (sys) options operator, arrow; solve(sys, {x, y}) end proc, M)

[{x = 1, y = 1}, {x = 7/5, y = 4/5}, {x = -13/7, y = -2/7}, {x = 3, y = 0}, {x = 11, y = 4}, {x = 19/5, y = 8/5}, {x = 22/5, y = 9/5}, {x = 5, y = 2}, {x = 28/5, y = 11/5}, {x = -11/5, y = -2/5}, {x = -14/5, y = -3/5}, {x = -17/5, y = -4/5}]

DocumentTools:-InsertContent(DocumentTools:-Layout:-Worksheet(subs("centred" = "left", DocumentTools:-Tabulate(Matrix(4, 3, proc (i, j) options operator, arrow; `≡`(L[3*i-3+j], M[3*i-3+j]) end proc), width = 120, alignment = center, color = blue, fillcolor = "AliceBlue", output = XML))))

 

`≡`(S[1], {x-y = 0, x+y = 2})

`≡`(S[2], {x-3*y = -1, x+2*y = 3})

`≡`(S[3], {x-3*y = -1, x+4*y = -3})

`≡`(S[4], {x-3*y = 3, x+2*y = 3})

`≡`(S[5], {x-3*y = -1, x-2*y = 3})

`≡`(S[6], {x-3*y = -1, x+2*y = 7})

`≡`(S[7], {x-3*y = -1, x+2*y = 8})

`≡`(S[8], {x-3*y = -1, x+2*y = 9})

`≡`(S[9], {x-3*y = -1, x+2*y = 10})

`≡`(S[10], {x-3*y = -1, x+2*y = -3})

`≡`(S[11], {x-3*y = -1, x+2*y = -4})

`≡`(S[12], {x-3*y = -1, x+2*y = -5})

 

Solutions 

DocumentTools:-InsertContent(DocumentTools:-Layout:-Worksheet(subs("centred" = "left", DocumentTools:-Tabulate(Matrix(4, 3, proc (i, j) options operator, arrow; `≡`(L[3*i-3+j], Sol[3*i-3+j]) end proc), width = 120, alignment = center, color = blue, fillcolor = "LightYellow", output = XML))))
 

`≡`(S[1], {x = 1, y = 1})

`≡`(S[2], {x = 7/5, y = 4/5})

`≡`(S[3], {x = -13/7, y = -2/7})

`≡`(S[4], {x = 3, y = 0})

`≡`(S[5], {x = 11, y = 4})

`≡`(S[6], {x = 19/5, y = 8/5})

`≡`(S[7], {x = 22/5, y = 9/5})

`≡`(S[8], {x = 5, y = 2})

`≡`(S[9], {x = 28/5, y = 11/5})

`≡`(S[10], {x = -11/5, y = -2/5})

`≡`(S[11], {x = -14/5, y = -3/5})

`≡`(S[12], {x = -17/5, y = -4/5})

 

You write "RGB", but you only have a single Matrix. Usually RGB means three layers, for Red, Green, and Blue.

So I'll use your single Matrix for a HUE layer.

I'll do it in two ways:
1) replacing the COLOR Array, after a plot3d construction
2) using the image option of the plot3d command

Plot1_ac.mw

Here is one way to do that.

It's quite straightforward, and is terser still without the various beautifying options for plotting.

I'll use it a few times below, to get some slightly different effects,

restart;

with(plots): with(plottools,transform):

setcolors("Spring"):
setoptions(size=[400,400], axes=boxed, axesfont=["Times",9],
           labeldirections=[horizontal,vertical], thickness=3);

 

F := unapply([Re,Im](exp(x+I*y)),[x,y]);

proc (x, y) options operator, arrow; [Re(exp(x+I*y)), Im(exp(x+I*y))] end proc

 

PR := plot([seq([x,y,y=-Pi..Pi], x=-2..2, numelems=11)],
           labels=[Re(z),Im(z)], gridlines=false):

 

PC := display(transform(F)(PR), gridlines):

 

display(Array([display(PR, tickmarks=[decimalticks,piticks],
                       axis[2]=[tickmarks=spacing(Pi/4)]),
               display(PC, labels=[Re,Im](exp(z)))]));

 

 


Did you want to make use of this? Perhaps in the labels on the right?

evalc(F(x,y));

[exp(x)*cos(y), exp(x)*sin(y)]


You could also show just the left-side (x<0), since it gives a more
clear presentation for the circles mapped to [0..1,0..1].

Let's take just that portion of the above lines (keeping the same colors).

PR2 := transform((x,y)->[ifelse(x>0,undefined,x),y])(PR):

 

PC2 := display(transform(F)(PR2), gridlines):

 

display(Array([display(PR2, labels=[Re(z)=x,Im(z)=y],
                       tickmarks=[decimalticks,piticks],
                       axis[2]=[tickmarks=spacing(Pi/4)]),
               display(PC2, labels=Equate([Re,Im](exp(z)),evalc(F(x,y))))]));

 

 

 

 

setcolors(ColorTools:-Gradient("Red".."Blue",'best')):

 

PR3 := plot([seq([x,y,y=-Pi..Pi],x=-2..2,numelems=11)],
            gridlines=false):

 

PC3 := display(transform(F)(PR3), gridlines):

 

display(Array([display(PR3, labels=[Re(z)=x,Im(z)=y],
                       tickmarks=[decimalticks,piticks],
                       axis[2]=[tickmarks=spacing(Pi/4)]),
               display(PC3, labels=Equate([Re,Im](exp(z)), evalc(F(x,y))))]));

 

 

Download conf01.mw

The problem in your code is that your solve call returns two answers (both being sets) and you are passing the expression sequence of both of those as arguments to the simplify command.

That makes simplify interpret its arguments like a request for simplify-with-side-relations, which is the cause of your error message.

If you intend on trying to simplify both results from solve in a single call to simplify then you could pass them inside a list. That automatically maps simplify across the elements of the list. Note however that for this example there is no change in the results.

Here it is, using Maple 2019 (like you),

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

_local(Pi)

_local(D)

Warning, A new binding for the name `Student:-VectorCalculus:-D` has been created. The global instance of this name is still accessible using the :- prefix, :-`Student:-VectorCalculus:-D`.  See ?protect for details.

D := proc (p1) options operator, arrow; a-beta*p1 end proc

D := proc (p2) options operator, arrow; a-beta*p2 end proc

r := proc (Pc) options operator, arrow; theta-upsilon*(Pu-Pc) end proc

A := (2*Pu*upsilon^2*U[0]-epsilon*(2*beta*k*lambda*tau0*upsilon*U[0]+2*Cm*beta*upsilon*U[0]-Cm*epsilon*lambda*upsilon+Cr*epsilon*lambda*upsilon-Pu*epsilon*lambda*upsilon-U*epsilon*lambda*upsilon-2*beta*k*lambda*tau0-epsilon*k*lambda*upsilon+2*epsilon*lambda*upsilon*w+2*a*upsilon*U[0]+epsilon*lambda*theta-2*Cm*beta-2*a)*upsilon/(-2*epsilon^2*lambda*upsilon+4*beta*upsilon*U[0]-4*beta)-2*theta*upsilon*U[0]-upsilon*Pu+U*upsilon-w*upsilon+theta)/(2*upsilon*(upsilon*U[0]-1)) >= 0

B := r(Pc) >= 0

DATA_1 := [Cm = 15000, U = 1000, U[0] = 50, Cr = 1000, w = 2000, a = 60000, beta = .8, lambda = .9, tau0 = .4, k = 20000, epsilon = .1]

E := subs(DATA_1, A)

F := subs(DATA_1, B)

solve({E, F}, {theta, upsilon})

{-1.*upsilon*(-1.*Pu+Pc) <= theta}, {upsilon*(15998200.*upsilon^2*Pu-479973.*upsilon*Pu-937303000.*upsilon+3200.*Pu+18752000.)/(15998200.*upsilon^2-479973.*upsilon+3200.) <= theta}, {theta <= upsilon*(15998200.*upsilon^2*Pu-479973.*upsilon*Pu-937303000.*upsilon+3200.*Pu+18752000.)/(15998200.*upsilon^2-479973.*upsilon+3200.), -1.*upsilon*(-1.*Pu+Pc) <= theta}

simplify([%])

[{-upsilon*(-1.*Pu+Pc) <= theta}, {upsilon*(15998200.*upsilon^2*Pu-479973.*upsilon*Pu-937303000.*upsilon+3200.*Pu+18752000.)/(15998200.*upsilon^2-479973.*upsilon+3200.) <= theta}, {theta <= upsilon*(15998200.*upsilon^2*Pu-479973.*upsilon*Pu-937303000.*upsilon+3200.*Pu+18752000.)/(15998200.*upsilon^2-479973.*upsilon+3200.), -upsilon*(-1.*Pu+Pc) <= theta}]

Download Q3_ac.mw

You can construct this kind of thing using nprintf.

`#msub(mi("t"),mn("1"));`

`#msub(mi("t"),mn("1"));`

Yes, the current convention makes it easier to visually distinguish between the 2D Math typeset output of the two forms, t__1 versus t[1].

For reference on that mn numeric element, perhaps see here.

The Fractals:-EscapeTime routines work with images, rather than plots. That allows for rendering which is much lighter on using GUI resources. Computationally, they attempt to use the Compiler (successful in the Julia or Mandelbrot cases), which is faster than even the evalhf mode fallback. Their computation is also parallelized.

In contrast the plotting schemes (basically, 2D densityplot, or a carefully oriented plot3d 3D surface plot) induce use of much more GUI resources (time and memory) for the rendering. And computationally, they attempt to use fast evalhf mode by default, but are neither compiled nor parallelized. The densityplot result looks a bit better, IMO, with less unnecessary whitespace around the plot than what plot3d plots have. But the rendering of densityplot results is often harder on the GUI than is that of plot3d, at a common higher resolution.

An advantage of doing it with actual plots is that one can easily see the code and formula being used for the iterative scheme. But if grid resolution is too high then the rendering may be too intensive, and the GUI can "go away".

The attachment shows your example (remove/adjust the sin(z) term if not wanted) using 2D densityplot. Various different grid resolutions are used, according to whether it's doing a single frame plot, a "traditional" animation, or an Explore. It doesn't call evalf explicitly (unlike the linked code you have) because the Julia01 procedure calls will get run under evalhf mode by the densityplot command.

julia01.mw

In your GUI Options menus, what does it say for the item:
   Interface -> "Open worksheets in"
?  Is it set to "New Tab", or to "New Window".

AFAIK, that setting is stored in the GUI preferences file in the field,
   MDIOnOpenAndNew
where "false" means open in a new tab rather than a new/separate GUI window.

Note that when you change the GUI Option via menus then you have to fully close and re-launch, to get a changed effect. Similarly, if you edit the preferences file with an external editor -- while the Maple GUI is open -- then fully closing the GUI will clobber the edits.

Note that this is not that shared-kernel stuff. That's about the Maple kernel mserver engines Those are separate processes (and non-Java, besides). This is about the Java GUI windowing.

I always have the option set to "New Tab", ie. MDIOnOpenAndNew=false in the preferences file.

I don't know whether you tried to import your preferences from M2024 (and that it failed to import your M2024 setting for this option), or whether your started from scratch with GUI preferences and perhaps overlooked setting this one.

ps. It's possible that this is not your underlying problem (or that it's not all working as intended). Apart from clicking the desktop launcher, the aspect I've described also controls whether File->New results in a new tab or a new/separate window. Is that File->New already behaving OK, while the launcher is not? If they are different then my first guess about this being a simple option setting issue may be wrong. (...and then I'd ask whether you can concurrently Open the same exact .mw file twice, or whether the exec line in your launch icon passes any special options to the executable, etc...).

Have you tried storing KinAddCurveData in a .mla Library Archive file?

By that I mean using the Create and the Save commands from the LibraryTools package.

Then at the start of a new worksheet you would append the new .mla's location to libname, ie.
   libname := "mylocation/mylib.mla", libname:
where, naturally, you would replace with the actual name and location.

If that worked then it would be possible to (in one of a few ways) to make it automatically available without the need to manually prepend to libname.

But first check whether it works. (This is the usual way to make a procedure available across sessions, without completely recreating it. I hazily recall that procedures created via  define_external results could also be re-used in this way, but I'm not 100% sure. So you could test it.)

You could first test with a version of that was just something simple, like,
   KinAddCurveData := proc(x) x^2; end proc
That'd be a sanity check that the .mla approach itself was working. Once it did, you could try with the define_external version.

You might also need to look at the Help page with Topic,
    define_external,save
You may need to also pass the appropriate GENARGS option to define_external.

The creation and save session might look something like this,

KinAddCurveData :=
   define_external( 'AddCurveData',
                    'GENARGS'=proc()
         'LIB'=ExternalCalling:-ExternalLibraryName("C:\\Users\\tom\\Documents\\Excel docs\\kinexa dll solver\\equilibriumdll\\Equilibrium.dll");
                              end proc
);

mymla := LibraryTools:-Create("C:\\Users\\tom\\Documents\\MyEquil.mla");

LibraryTools:-Save(KinAddCurveData, mymla);

The usage session might then look like,

restart;
libname := "C:\\Users\\tom\\Documents\\MyEquil.mla",libname;

KinAddCurveData();

If it works you could also make the creation session fancier (test whether the .mla exists already, optionally delete it first, etc).

One thing I am not sure about is whether the GENARGS option allows you to use any arbitrary location for the .dll file, or whether it would need to be some place in the runtime linking path. A hint'd be if it complains about not finding it...

Please check for spelling mistakes, etc.

Your equations eq1, eq2 have instances of f and theta instead of f(x) and theta(x).

That is the meaning of the error message that you got, conveying that problem about f vs f(x).

You also have one too few boundary conditions.

So I've added D(theta)(9)=1, but you could change it.

restart

kernelopts(version);

`Maple 18.02, X86 64 LINUX, Oct 20 2014, Build ID 991181`

with(plots):

eq1 := diff(f(x), x, x, x)+(1/2)*(1+phi[1])^2.5*(1-phi[2])^2.5*((1-phi[2])(1-phi[1]+phi[1]*rho[s1]/rho[fl])+phi[2]*rho[s2]/rho[fl])*f(x)*(diff(f(x), x, x))+((1+phi[1])^2.5*(1-phi[2])^2.5*M+1/K[p])*sin(alpha)^2*(1-(diff(f(x), x)))+(1+phi[1])^2.5*(1-phi[2])^2.5*((1-phi[2])(1-phi[1]+phi[1]*rho[s1]*beta[s1]/(rho[fl]*beta[fl]))+phi[2]*rho[s2]*beta[s2]/(rho[fl]*beta[fl]))*lambda*cos(gamma)*theta(x) = 0:

eq2 := (k[s2]+2*k[fl]-2*phi[2](k[fl]-k[s2]))*(k[s1]+2*k[fl]-2*phi[1](k[fl]-k[s1]))*(diff(theta(x), x, x))/((k[s2]+2*k[fl]+phi[2](k[fl]-k[s2]))*(k[s1]+2*k[fl]+phi[1](k[fl]-k[s1])))+(1/2)*Pr*((1-phi[2])(1-phi[1]+phi[1]*rho[s1]*C[p][s1]/(rho[fl]*C[p][fl]))+phi[2]*rho[s2]*C[p][s2]/(rho[fl]*C[p][fl]))*f(x)*(diff(theta(x), x))+upsilon*Pr*theta(x)/((1-phi[2])(1-phi[1]+phi[1]*rho[s1]*C[p][s1]/(rho[fl]*C[p][fl]))+phi[2]*rho[s2]*C[p][s2]/(rho[fl]*C[p][fl])) = 0:

bcs := f(0) = 0, (D(f))(0) = 0, (D(f))(9) = 1;

f(0) = 0, (D(f))(0) = 0, (D(f))(9) = 1

theta(0) = 1, theta(9) = 0, (D(theta))(9) = 1

a1 := [phi[1] = .1, phi[2] = .1, rho[s1] = 3970, rho[s2] = 8933, rho[fl] = 997.1, beta[s1] = .85, beta[s2] = 1.67, beta[fl] = 21, k[s1] = 40, k[s2] = 401, k[fl] = .613, C[p][s1] = 765, C[p][s2] = 385, C[p][fl] = 4179, sin(alpha) = 0, cos(gamma) = 1, M = 1, K[p] = .5, lambda = 0, upsilon = 1]:

c1 := dsolve({bcs, bcs1, subs(a1, eq1), subs(a1, eq2)}, numeric):

TFP := Typesetting:-Typeset(theta(x)):

display(p1, p2, p3, p4, thickness = 3, legendstyle = [location = right], size = [700, 450]);

 

Download HIPT_ac.mw

Your substitution of the found roots is only being done at Digits=10. That means the working precision for the operations in the evaluation of the expression upon substitution. It does not mean that the results of that substitution in the expression (a compound expression) will be accurate to 10 places.

You can be a more accurate result from the substituion by using a higher Digits for that substitution/evaluate-at-a-point step.

I do this  below by wrapping the 2-argument eval calls (for evaluating the expression at a point) in an evalf[20] call so that it uses Digits=20 for the evaluations.

I also wrap that in evalf[5] so the the results are terser with just five digits.

For example,

forget(evalf);
[seq(evalf[5](evalf[20](eval(poly, x = SL[i]))), i = 1 .. nops(SL))];

   [         -11            -11             -11            -11  ]
   [2.8353 10    - 1.0886 10    I, 1.2648 10    - 3.3670 10    I]

forget(evalf);
[seq(evalf[5](evalf[10](eval(poly, x = SL[i]))), i = 1 .. nops(SL))];

   [-0.0000035746 + 0.0000044384 I, -0.000025687 - 0.0000048971 I]

Root_Poly_ac.mw

@C_R You asked about a Help page.

On the Help page with Topic,
    worksheet,documenting/2DMathShortcutKeys   (to which several other 2D Math pages like)
there is table item for backslash, with description,

   Escape Next Character (For displaying "^" or "_", for example)

In other words, it's a somewhat general way to enter literal plaintext characters in 2D Input/Math mode, as opposed to marked up entry.

That Help page is linked to from several other 2D Math pages, and appears 2nd in the Browser when querying for just "shortcut". The phrasing doesn't quite convey the breadth of the mechanism.

There's a less accurate description on the Help page with Topic,
   worksheet,help,QuickHelpDetails
ie,

   Escape next character for entering "^"

 

Unfortunately, there are no examples of such escaping on the Help page,
   worksheet,documenting,2DMathDetails

The use of % to denote an inert form is also underdocumented. There's a blurb on ?value, and a link there from ?InertForm. But the search ?inert doesn't provide much of direct use on it.

On my Linux there is a palettes subdirectory, at the same location as the maplerc GUI preferences file, if I have a Favorites palette set up.

For example, for my Maple 2022 that palettes subdirectory contained a Favorites.properties file. The maplerc file references it in two places: once to denote it as expanded or not, and once for its palettelist.

Perhaps there is a similar file and subfolder on your first machine, that you also need to copy over.

1 2 3 4 5 6 7 Last Page 1 of 331