acer

33315 Reputation

29 Badges

20 years, 265 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

If you only need to plot it then the tolerance for the numeric integration doesn't need to be super fine.

For some ostensbily complex expressions, simplify@evalc might produce en enormous new expression, or take a very long time. Since your integrand1 and integrand3 are quite short, maybe the numeric roundoff is acceptable.

restart; with(plots)

V := exp(-k^2*t)*((-4*k*(sin(k*x)/exp(1)+sin(k*(1-x)))*(k^2-1))*(1/((k^2+1)*(k^4+1))))/((2*Pi)*(exp(I*k)-exp(-I*k)))

L := 3/4; k1 := proc (r) options operator, arrow; L+(3/4)*I+r*exp(((1/6)*I)*Pi) end proc; k2 := proc (r) options operator, arrow; -L+(3/4)*I+r*exp(((5/6)*I)*Pi) end proc; k3 := proc (s) options operator, arrow; s+(3/4)*I end proc; dk1 := D(k1); dk2 := D(k2); dk3 := D(k3)

3/4

integrand1 := Re((eval(V, k = k1(r)))*dk1(r)-(eval(V, k = k2(r)))*dk2(r)); integrand3 := Re((eval(V, k = k3(s)))*dk3(s))

length(integrand1); length(integrand3)

1446

339

NULL

approx_u := proc (x, t) local temp1, temp2, res; temp1 := evalf(Int(eval(integrand1, [:-x = x, :-t = t]), r = 0 .. infinity, epsilon = 0.1e-3, method = _d01amc)); temp2 := evalf(Int(eval(integrand3, [:-x = x, :-t = t]), s = -L .. L, epsilon = 0.1e-3, method = _d01ajc)); res := temp1+temp2; if not res::numeric then lprint([x, t]) end if; res end proc

CodeTools:-Usage(approx_u(.5, .1))

memory used=485.92MiB, alloc change=28.00MiB, cpu time=2.23s, real time=2.02s, gc time=343.19ms

.6536368283

forget(`evalf/int`); forget(evalf); CodeTools:-Usage(plot3d(approx_u, 0 .. 1, 0 .. 2*Pi, grid = [13, 13], axes = boxed, labels = ["x", "t", "u(x,t)"], title = "Fokas Method of solution", shading = zhue, adaptmesh = false))

memory used=46.06GiB, alloc change=200.85MiB, cpu time=3.97m, real time=3.33m, gc time=51.14s

Download heat_equation_on_finte_interval_ac2.mw

Here's something (no AI used),

restart;

kernelopts(version);

`Maple 2026.0, X86 64 LINUX, Apr 28 2026, Build ID 2011354`

ode:= 4*(-1 + sqrt(1 - 1/x^2)*x^2)*sec(4 + 4*x + 4*arccsc(x))^2 - sqrt(1 - 1/x^2)*x^2*diff(f(x), x) = 0;

4*(-1+(1-1/x^2)^(1/2)*x^2)*sec(4+4*x+4*arccsc(x))^2-(1-1/x^2)^(1/2)*x^2*(diff(f(x), x)) = 0

new := simplify(PDEtools:-dchange({x=csc(y)},ode,[y])) assuming y>-1, y<1;

4*(-1+csc(y)*cot(y))*sec(4+4*csc(y)+4*y)^2+diff(f(y), y) = 0

ysol := dsolve(new);

f(y) = c__1+tan(4+4*csc(y)+4*y)

odetest(ysol, new);

0

xsol := PDEtools:-dchange({y=arccsc(x)},ysol,[x]);

f(x) = c__1+tan(4+4*x+4*arccsc(x))

odetest(xsol, ode);

0

Download dchange_ex_ac.mw

Hopefully the attached revision will shed some light on what effects "loading" a package can have on parsing subsequent code, due to rebinding of names.

Without the call to with(...) the names of the exports don't affect higher-level references to the name. (That kind of a central point of having exports of modules -- they can be accessed, but unless the package module is "loaded" the subsequent parsing of the name isn't affected.)

Notice also that this involves not so much what a name evaluates to at execution time, as to what binding is in effect for a name (ie. what it resolves to) at parse time.

See also the Help page for with, which discusses the binding effect.

InitCommon_acc.mw

ps. The OP's Question mentions checking for "existence", but I'm not sure what that is means. It's not clear to me whether your usage cases will involve checking whether a global name has been assigned, or been rebound, etc.

[edit] I ought to mention that I would never want to write "production quality" code that depended on what rebindings might have occurred earlier (via with, etc). That seems like coding fragility which would be risky to introduce unnecessarily.

I know the OP writes large, sophisticated packages, some of which might interact.

The above attachment is intended only as an illustration of how some mechanisms behave; it's not any recommendation. I was guessing as to what difficulties the OP might be encountering, eg. possibly redefinition during out of order reexecution or rereading of source.

None of my attachment belongs anywhere near quality code. I will try to find time to add a further note on how I think separate packages could interect and be well-coded, so that their definition could be robust wrt what might have occurred earlier in a session. (One guess by me as to what might be the motivating cases behind the Question...)

Since you've already assigned,

   u := A[0] + A[1]*R(xi) + B[1]/R(xi);

then what do you think it means to use the indexed names u[0], u[1] ?

Those names u[0] and u[1] will reference (index) into the expression assigned to name u. They are not distinct from u.

Did you intend, instead, to use wholly separate names like u__0 and u__1?

restart;

kernelopts(version);

`Maple 2023.2, X86 64 LINUX, Nov 24 2023, Build ID 1762575`

T := R(xi)*R(xi) + lambda:

u := A[0] + A[1]*R(xi) + B[1]/R(xi):

#
# You probably don't want this:
#
u[0];

(A[0]+A[1]*R(xi)+B[1]/R(xi))[0]

#
# You might prefer to use this:
#
u__0;

u__0

d[1] := A[1]*T - B[1]*T/R(xi)^2:

d[2] := 2*A[1]*R(xi)*T - 2*B[1]*T/R(xi) + 2*B[1]*(R(xi)^2 + lambda)*T/R(xi)^3:

expand(((-alpha^2*b^2 + a^2)*alpha^2)/(2*beta)*d[2] + (omega + alpha^2*(alpha^2*l^2 + k^2)/2 - a*C[1]/(-alpha^2*b^2 + a^2))*u__0/(beta - 2*beta*a^2/(-alpha^2*b^2 + a^2)) + u__0*u__0*u__0):

value(%):

simplify(%):

 

collect(%, R(xi));

A[1]*(-alpha^6*b^4+a^4*alpha^2)*R(xi)^3/(beta*(alpha^2*b^2+a^2))+lambda*A[1]*(-alpha^6*b^4+a^4*alpha^2)*R(xi)/(beta*(alpha^2*b^2+a^2))-(1/2)*(-b^2*l^2*alpha^6+(a^2*l^2-b^2*k^2)*alpha^4+(a^2*k^2-2*b^2*(beta*u__0^2+omega))*alpha^2-2*((beta*u__0^2-omega)*a+C[1])*a)*u__0/(beta*(alpha^2*b^2+a^2))+lambda*B[1]*(-alpha^6*b^4+a^4*alpha^2)/(beta*(alpha^2*b^2+a^2)*R(xi))+(1/2)*(-2*alpha^6*b^4*lambda^2*B[1]+2*a^4*alpha^2*lambda^2*B[1])/(beta*(alpha^2*b^2+a^2)*R(xi)^3)


Download bashar_27_2.mw

This kind of programming mistake with mixing a symbol with its indexed-name form has been mentioned to you in a previous, recent Question.

The OP's attachment was last saved in Maple 2025. Using that version, an alternate can be obtained, with a common factor of sqrt(2) pulled out and cancelled.

restart

kernelopts(version)

`Maple 2025.2, X86 64 LINUX, Nov 11 2025, Build ID 1971053`

 

expr := sqrt(x__0+1)*sqrt(-2*beta^2*x__0-2*beta^2+4)*sqrt(-(x__0+1)*(beta^2-1))/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/(sqrt(-beta^2+1)*sqrt(-2*beta^2*x__0-2*beta^2+4))

 

`assuming`([simplify(combine(lhs(expr)))], [0 < x__0 and x__0 < 1])

2^(1/2)/((-beta^2+1)^(1/2)*(2+(-x__0-1)*beta^2)^(1/2))

NULL

Download Simplify_radical_02_ac.mw

That result attains without need of the assumptions on beta.

You can expand that, if you don't want the contents of the radical to be simplified.

expand(%)

2^(1/2)/((-beta^2+1)^(1/2)*(-beta^2*x__0-beta^2+2)^(1/2))

When you have difficulties, don't suppress printing output of intermediate results using full colon statement terminators. Use semicolons and look at the intermediate results.

Also, look at the Help page of the command causing you difficulties. Then you could see that BarChart produce horizontal bars, and ColumnGraph produces vertical bars.

restart

with(Statistics); with(plots)

Data := [45, 38, 51, 67, 74, 91]

P := ColumnGraph(Data, tickmarks = [[1 = "Chemical Vector Control", 2 = "Resistant Cultivars", 3 = "Roguing & Sanitation", 4 = "u1+u2", 5 = "u1+u3", 6 = "Integrated"], default], width = .75)

T := textplot([[.5, 48, "45%"], [1.5, 41, "38%"], [2.5, 54, "51%"], [3.5, 70, "67%"], [4.5, 77, "74%"], [5.5, 94, "91%"]], font = ["TIMES", "BOLD", 12])

display([P, T], title = "Figure 20: Comparative Effectiveness of Optimal Control Strategies", labels = ["Control Strategies", "Reduction in Coinfection Burden (%)"], labelfont = ["TIMES", "BOLD", 14], titlefont = ["TIMES", "BOLD", 16], axes = boxed, gridlines = true, size = [1000, 650])

 

NULL

Download Bargraph_ac.mw

You cannot solve for only {omega, a[0], a[1], b[1]} because there are still constraints on the remaining names.

But (without getting into parametric solving, or eliminate, etc) is there a reason why you cannot pass the whole system to solve?

For example,  here is a list of different solutions. Each solution is one of the sets in the list sols. For each solution set, if a name does not appear then it is free to vary in that solution.

restart;

kernelopts(version);

`Maple 2023.2, X86 64 LINUX, Nov 24 2023, Build ID 1762575`

sys := subs(a[1]=a__1,a[0]=a__0,b[1]=b__1,

[-alpha^4*b^2*lambda*mu*b[1] + a^2*alpha^2*lambda*mu*b[1] + 6*beta*lambda^2*sigma*a[0]*a[1]^2 + 6*beta*mu^2*a[0]*a[1]^2 - 6*beta*lambda*a[0]*b[1]^2 = 0, -alpha^4*b^2*lambda^2*mu*sigma - alpha^4*b^2*mu^3 + a^2*alpha^2*lambda^2*mu*sigma + a^2*alpha^2*mu^3 - 4*beta*lambda^2*sigma*a[0]*b[1] - 4*beta*lambda*mu*b[1]^2 - 4*beta*mu^2*a[0]*b[1] = 0, -alpha^4*b^2*lambda^2*sigma - alpha^4*b^2*mu^2 + a^2*alpha^2*lambda^2*sigma + a^2*alpha^2*mu^2 + beta*lambda^2*sigma*a[1]^2 + beta*mu^2*a[1]^2 - 3*beta*lambda*b[1]^2 = 0, -alpha^4*b^2*lambda^2*sigma - alpha^4*b^2*mu^2 + a^2*alpha^2*lambda^2*sigma + a^2*alpha^2*mu^2 + 3*beta*lambda^2*sigma*a[1]^2 + 3*beta*mu^2*a[1]^2 - beta*lambda*b[1]^2 = 0, -alpha^6*b^4*lambda^2*mu*b[1] + alpha^6*b^2*l^2*lambda^2*sigma*a[0] + alpha^6*b^2*l^2*mu^2*a[0] - a^2*alpha^4*l^2*lambda^2*sigma*a[0] + alpha^4*b^2*k^2*lambda^2*sigma*a[0] - a^2*alpha^4*l^2*mu^2*a[0] + alpha^4*b^2*k^2*mu^2*a[0] + 2*alpha^2*b^2*beta*lambda^2*sigma*a[0]^3 + a^4*alpha^2*lambda^2*mu*b[1] - a^2*alpha^2*k^2*lambda^2*sigma*a[0] - 6*alpha^2*b^2*beta*lambda^2*a[0]*b[1]^2 + 2*alpha^2*b^2*beta*mu^2*a[0]^3 - a^2*alpha^2*k^2*mu^2*a[0] + 2*a^2*beta*lambda^2*sigma*a[0]^3 + 2*alpha^2*b^2*lambda^2*omega*sigma*a[0] - 6*a^2*beta*lambda^2*a[0]*b[1]^2 + 2*a^2*beta*mu^2*a[0]^3 + 2*alpha^2*b^2*mu^2*omega*a[0] - 2*a^2*lambda^2*omega*sigma*a[0] - 2*a^2*mu^2*omega*a[0] + 2*a*lambda^2*sigma*C[1]*a[0] + 2*a*mu^2*C[1]*a[0] = 0, -2*alpha^6*b^4*lambda^3*sigma - 2*alpha^6*b^4*lambda*mu^2 + alpha^6*b^2*l^2*lambda^2*sigma + alpha^6*b^2*l^2*mu^2 - a^2*alpha^4*l^2*lambda^2*sigma + alpha^4*b^2*k^2*lambda^2*sigma + 2*a^4*alpha^2*lambda^3*sigma - a^2*alpha^4*l^2*mu^2 + alpha^4*b^2*k^2*mu^2 + 6*alpha^2*b^2*beta*lambda^2*sigma*a[0]^2 + 2*a^4*alpha^2*lambda*mu^2 - a^2*alpha^2*k^2*lambda^2*sigma - 6*alpha^2*b^2*beta*lambda^2*b[1]^2 + 6*alpha^2*b^2*beta*mu^2*a[0]^2 - a^2*alpha^2*k^2*mu^2 + 6*a^2*beta*lambda^2*sigma*a[0]^2 + 2*alpha^2*b^2*lambda^2*omega*sigma - 6*a^2*beta*lambda^2*b[1]^2 + 6*a^2*beta*mu^2*a[0]^2 + 2*alpha^2*b^2*mu^2*omega - 2*a^2*lambda^2*omega*sigma - 2*a^2*mu^2*omega + 2*a*lambda^2*sigma*C[1] + 2*a*mu^2*C[1] = 0, -alpha^6*b^4*lambda^3*sigma + alpha^6*b^4*lambda*mu^2 + alpha^6*b^2*l^2*lambda^2*sigma + alpha^6*b^2*l^2*mu^2 - a^2*alpha^4*l^2*lambda^2*sigma + alpha^4*b^2*k^2*lambda^2*sigma + a^4*alpha^2*lambda^3*sigma - a^2*alpha^4*l^2*mu^2 + alpha^4*b^2*k^2*mu^2 + 6*alpha^2*b^2*beta*lambda^2*sigma*a[0]^2 - a^4*alpha^2*lambda*mu^2 - a^2*alpha^2*k^2*lambda^2*sigma - 2*alpha^2*b^2*beta*lambda^2*b[1]^2 + 12*alpha^2*b^2*beta*lambda*mu*a[0]*b[1] + 6*alpha^2*b^2*beta*mu^2*a[0]^2 - a^2*alpha^2*k^2*mu^2 + 6*a^2*beta*lambda^2*sigma*a[0]^2 + 2*alpha^2*b^2*lambda^2*omega*sigma - 2*a^2*beta*lambda^2*b[1]^2 + 12*a^2*beta*lambda*mu*a[0]*b[1] + 6*a^2*beta*mu^2*a[0]^2 + 2*alpha^2*b^2*mu^2*omega - 2*a^2*lambda^2*omega*sigma - 2*a^2*mu^2*omega + 2*a*lambda^2*sigma*C[1] + 2*a*mu^2*C[1] = 0]

):

 

sols := subsindets([solve(sys,explicit,allsolutions)],`=`,eq->ifelse(eq,NULL,eq));

[{a = 0, a__1 = 0, alpha = 0, b__1 = 0}, {a = 0, a__0 = 0, a__1 = 0, alpha = 0, lambda = 0}, {a = 0, alpha = 0, beta = 0}, {a = 0, a__1 = 0, b = 0, b__1 = 0}, {a = 0, a__0 = 0, a__1 = 0, b = 0, lambda = 0}, {a = 0, b = 0, beta = 0}, {a__0 = 0, a__1 = 0, alpha = 0, lambda = 0, C[1] = a*omega}, {a = alpha*b, a__0 = 0, a__1 = 0, lambda = 0, C[1] = 0}, {a = -alpha*b, a__0 = 0, a__1 = 0, lambda = 0, C[1] = 0}, {lambda = 0, mu = 0}, {alpha = 0, b__1 = 0, sigma = -mu^2/lambda^2}, {b__1 = 0, mu = 0, sigma = 0}, {a = alpha*b, b__1 = 0, sigma = -mu^2/lambda^2}, {a = -alpha*b, b__1 = 0, sigma = -mu^2/lambda^2}, {a = I*b*alpha, b__1 = 0, sigma = -mu^2/lambda^2}, {a = -I*b*alpha, b__1 = 0, sigma = -mu^2/lambda^2}, {alpha = 0, beta = 0, sigma = -mu^2/lambda^2}, {beta = 0, mu = 0, sigma = 0}, {a = alpha*b, beta = 0, sigma = -mu^2/lambda^2}, {a = -alpha*b, beta = 0, sigma = -mu^2/lambda^2}, {a = 0, a__0 = 0, beta = (1/4)*alpha^4*b^2/a__1^2, lambda = -b__1^2/(a__1^2*sigma), mu = 0, omega = -(1/4)*alpha^2*(2*a__1^2*alpha^2*l^2*sigma+alpha^2*b^2*b__1^2+2*a__1^2*k^2*sigma)/(a__1^2*sigma)}, {a__0 = 0, a__1 = 0, alpha = 0, b__1 = 0, C[1] = a*omega}, {a = alpha*b, a__0 = 0, a__1 = 0, b__1 = 0, C[1] = 0}, {a = -alpha*b, a__0 = 0, a__1 = 0, b__1 = 0, C[1] = 0}, {a__0 = 0, beta = -(1/4)*alpha^2*(-alpha^2*b^2+a^2)/a__1^2, lambda = -b__1^2/(a__1^2*sigma), mu = 0, C[1] = (1/4)*(-2*a__1^2*alpha^6*b^2*l^2*sigma-alpha^6*b^4*b__1^2+2*a^2*a__1^2*alpha^4*l^2*sigma-2*a__1^2*alpha^4*b^2*k^2*sigma+2*a^2*a__1^2*alpha^2*k^2*sigma+a^4*alpha^2*b__1^2-4*a__1^2*alpha^2*b^2*omega*sigma+4*a^2*a__1^2*omega*sigma)/(a__1^2*sigma*a)}, {alpha = 0, beta = 0, C[1] = a*omega}, {a = alpha*b, beta = 0, C[1] = 0}, {a = -alpha*b, beta = 0, C[1] = 0}]

 

 

Download bashar27_1.mw


ps. I substituted a[1]=a__1, a[0]=a__0, and b[1]=b__1 because your system already contained the names a and b. You should not mix those with the indexed names.

It's new behaviour as of Maple 2024.

I will submit a bug report.

[edit] It seems to be related to the seq call at showstat(`plot/iplot2d`,178)
and floating-point error.

Another example, showing only one contour in M2026,

plots:-contourplot(y+sin(x),x=-2*Pi..2*Pi,y=-1..7,':-contours' = 2);

Your Equation Label (2) refers to the HTML entity `&bigstar;` which you can check by lprint'ing it.

Notice the surrounding single left-ticks. Those a so-called name-quotes, in Maple. And `&bigstar;` is a name (in Maple's technical sense). It's not an indexed name. It's a symbol (in Maple's technical sense). That's why type(..,symbol) returns true for it.

In Maple, symbols beginning with the ampersand symbol are treated as so-called neutral operators, and allow for calling with infix functional notation.

In Text mode the Maple GUI allows the glyph to be entered, without surrounding left-ticks, and in upright roman. If you paste that into a 2D Input area then you can accomplish the (mistaken) action of entering something like `&bigstar;` but without the left-ticks. Notice that is rendered in upright roman in your Q1. The 2D parser tries to interpret it as a neutral operator, but finds an unexpected form (inlcuding unexpected special characters, without the surrounding left-ticks). It's not a valid symbol, in that case, since it has non-numeric characters but no left-ticks. Yet it looked as if it was going to be a neutral operator. Hence the error message, unknown operator. I don't know why the GUI allows one to enter that, without the left-quotes.

I don't know what the GUI is doing when it accepts name `&#8273;` in 2D Input mode but then seems to change it into something else. I've seen some actions where it hasn't done that, in which case I don't see that placeholder glyph, and also it then lprints as expected. But mostly it seems to change it into some other form (unicode?), and the output rendering and lprint then fail. I don't know why it does that, or what was the difference in the cases I didn't see that, for the same input character.

There were various problems, including (but not limited to) premature evaluation of your proc CC which gets called in expression T with symbolic names as arguments. And the plot syntax was wrong, mixing an expression (in S) with a range instead of the form S=range. There were more items to adjust. Please see the comments in the attachment.

Note there are significant regions in the S-mu-Z-Pr space for which there might not be roots found. It can take longer when it's trying to find roots that don't happen to exist.

restart;

 

T := 2^(2/3)*(16*CC(S,mu,Z,Pr)^2*Pi^2 + 2*Pi^2*Z^2 + 16*Pi*S*CC(S,mu,Z,Pr) + 3*S^2)*Pr^(1/3)/(4*(4*CC(S,mu,Z,Pr)*Pi + S)^(2/3)*(2*Pi^2*Z^2 + 4*Pi*S*CC(S,mu,Z,Pr) + S^2)^(2/3)*CC(S,mu,Z,Pr)^(1/3)*Pi^(2/3));

R := mu = 2^(2/3)*S*(16*C^2*Pi^2 - 2*Pi^2*Z^2 - S^2)*Pr^(1/3)/(4*(4*C*Pi + S)^(2/3)*(2*Pi^2*Z^2 + 4*C*Pi*S + S^2)^(2/3)*C^(4/3)*Pi^(2/3));

 

# There are five identical calls to CC in T, with the very
# same arguments (S,mu,Z,Pr), so I added `option remember` to CC,
# in order to prevent it from recomputing for each call(!).
# You don't want it five times slower, if you can avoid that.
# (And alternative be to make `T` a proc that admits all the
# four names, and compute the CC call as a first step. But I'm
# trying to keep the edits shorter.)
#
# I also made CC return unevaluated for nonnumeric arguments.
#
CC:=subs(__R=R, proc(S,mu,Z,Pr) option remember;
                  if not [S,mu,Z,Pr]::list(numeric) then
                    return 'procname'(args); end if;
                  fsolve(__R,C=0.01..100);
                end proc):

 

CC(1,0,0.5,0.2);

 

# There are signficant regions (in the 4-variable space) in which there
# may be no roots found. So for some parameter choices you may not get any
# plot at all.
#
# For example: a subregion shows for which no roots are found,
#
plot3d(eval(T,[mu=0.5,Z=0.25]),S=0..15,Pr=0..1,grid=[17,17],
       orientation=[-10,75,0],adaptmesh=false);

 

        
# The `continuous` option makes Explore compute only when you release
# the Slider at a new position. For something which computes slowly
# like your CC, this helps prevent it getting choked up on a backlog
# of values that you "slide" through.
#
# Note also that you need at least one float end-point for the ranges
# for parameters mu and Pr (you had  range 0..1, etc), or else they'll
# only take on the integer values, eg. 0 and 1
#
# I use initial values for the parameters at which I know some plot
# attains. I use option adaptview=false so that it doesn't attempt the
# end-values {mu,Pr}={0,1} which may be problematic. I force the
# plot's vertical view, explicitly, so that I get a steady constant `view`.
#
Explore(plot(T,S=0..15,view=[0..15,0..1],adaptive=false,numpoints=49),
        parameters=[[mu=0 .. 1.0,minorticks=0.25,continuous=false],
                    [Z=0..0.5,minorticks=0.1,continuous=false],
                    [Pr=0..1.0,minorticks=0.25,continuous=false]],
        initialvalues=[mu=0.5,Z=0.25,Pr=0.5], adaptview=false);

 

Download Explore_Plot_Problem_ac.mw

ps. If you move one of these Sliders, then keep an eye on the GUI's status bar at its bottom. I advise waiting for it to go from Evaluating to Ready, before doing anything else (expecially moving any other Slider). Also, it gets slow for mu>0.5 or so...

When you expand your eqn1 the lhs's of the Eval calls get put into {} braces. That is,
   Eval(..., x__1=L__1)
becomes,
   Eval(..., {x__1=L__1})
and so on.

That makes them not match the Eval call in the lhs of bc1., which lacks those braces.

You could programmatically change all the Eval calls into this form, or you could write it that way if they're all entered directly by you. I show both ways, below. I used Maple 2022, as you do.

restart

T := proc (e) options operator, arrow; subsindets(e, And(specfunc(Eval), satisfies(proc (u) options operator, arrow; (op(2, u))::`=` end proc)), proc (u) options operator, arrow; Eval(op(1, u), {op(2, u)}) end proc) end proc

bc1 := E__b*I__b*(Eval(diff(`&phi;__1`(x__1), `$`(x__1, 3)), x__1 = L__1)) = -m__1*omega^2*(Eval(`&phi;__1`(x__1), x__1 = L__1)+(1/2)*D__1*(Eval(diff(`&phi;__1`(x__1), x__1), x__1 = L__1)))+E__b*I__b*(Eval(diff(`&phi;__1`(x__2), `$`(x__2, 3)), x__2 = 0))

eqn1 := E__b*I__b*(Eval((diff(`&phi;__1`(x__1), `$`(x__1, 3)))*`&phi;__2`(x__1), x__1 = L__1))-E__b*I__b*(Eval((diff(`&phi;__1`(x__1), `$`(x__1, 2)))*(diff(`&phi;__2`(x__1), x__1)), x__1 = L__1))

algsubs(T(bc1), T(expand(eqn1)))

((Eval(phi__2(x__1), {x__1 = L__1}))*(Eval(diff(diff(diff(phi__1(x__2), x__2), x__2), x__2), {x__2 = 0}))-(Eval(diff(diff(phi__1(x__1), x__1), x__1), {x__1 = L__1}))*(Eval(diff(phi__2(x__1), x__1), {x__1 = L__1})))*I__b*E__b-(1/2)*(Eval(phi__2(x__1), {x__1 = L__1}))*m__1*omega^2*(D__1*(Eval(diff(phi__1(x__1), x__1), {x__1 = L__1}))+2*(Eval(phi__1(x__1), {x__1 = L__1})))

restart


Alternatively, if all the Eval calls are entered by you, then explicitly use braces
when entering all the 2nd arguments.

bc1 := E__b*I__b*(Eval(diff(`&phi;__1`(x__1), `$`(x__1, 3)), {x__1 = L__1})) = -m__1*omega^2*(Eval(`&phi;__1`(x__1), x__1 = L__1)+(1/2)*D__1*(Eval(diff(`&phi;__1`(x__1), x__1), {x__1 = L__1})))+E__b*I__b*(Eval(diff(`&phi;__1`(x__2), `$`(x__2, 3)), {x__2 = 0}))

eqn1 := E__b*I__b*(Eval((diff(`&phi;__1`(x__1), `$`(x__1, 3)))*`&phi;__2`(x__1), {x__1 = L__1}))-E__b*I__b*(Eval((diff(`&phi;__1`(x__1), `$`(x__1, 2)))*(diff(`&phi;__2`(x__1), x__1)), {x__1 = L__1}))

algsubs(bc1, expand(eqn1))

((Eval(diff(diff(diff(phi__1(x__2), x__2), x__2), x__2), {x__2 = 0}))*(Eval(phi__2(x__1), {x__1 = L__1}))-(Eval(diff(diff(phi__1(x__1), x__1), x__1), {x__1 = L__1}))*(Eval(diff(phi__2(x__1), x__1), {x__1 = L__1})))*I__b*E__b-(1/2)*(Eval(phi__2(x__1), {x__1 = L__1}))*m__1*omega^2*(D__1*(Eval(diff(phi__1(x__1), x__1), {x__1 = L__1}))+2*(Eval(phi__1(x__1), x__1 = L__1)))

Download question527_ac.mw

ps. I don't understand the construction D[1]*Eval(...) in your bc1, but that's not part of your original ly reported difficulty.

For your part 1), you could look at this old thread, which covers that aspect pretty thoroughly. Carl Love gave a general bi-directional procedure, and I gave the following for a definite integral like Int(Sum(...)).

F:=e->subsindets(e,And(specfunc(anything,Int),
                       satisfies(u->nops(u)>1 and type(op(1,u),
                                                       specfunc(anything,Sum)) and
                                    type(op(2,u), {name,name=range}))),
                 u->Sum(Int(op([1,1],u),op(2..,u)),op([1,2..],u))):

 

expr := Int(Sum(f[i](x,t),i=1..n),x=a..b);

Int(Sum(f[i](x, t), i = 1 .. n), x = a .. b)

F(expr);

Sum(Int(f[i](x, t), x = a .. b), i = 1 .. n)

Download GFY_1.mw

That's a question that's been asked several times before, and there have been a variety of ways to go about it (depending on how general one might want it, etc). If you have sum or int instead of inert Sum or Int then it's trivial to replace replace those up front, or utilize op(0,..) in the code and modify the types, etc.

For your part 2), it depends on what you're willing to accept for incidental transformation of g(t) and f(x). The literal example,

    Int(g(t)*f(x),x=a..b)

can be handled directly by either expand, simplify, or even IntegrationTools:-Expand.

But what if you had something like, say,

    Int((1-cos(t)^2)*(1-sin(2*x)^2), x=a..b)

Those commands could alter the subexpressions g(t) and f(x). Using Maple 2022 (as your attachment used),

restart;

kernelopts(version);

`Maple 2022.2, X86 64 LINUX, Oct 23 2022, Build ID 1657361`

goo := Int((1-cos(t)^2)*(1-sin(2*x)^2), x=a..b);

Int((1-cos(t)^2)*(1-sin(2*x)^2), x = a .. b)

simplify(goo);

(1-cos(t)^2)*(Int(cos(2*x)^2, x = a .. b))

expand(goo);

(cos(t)^2-1)*(Int(4*sin(x)^2*cos(x)^2-1, x = a .. b))

simplify(expand(goo));

(1-cos(t)^2)*(Int((2*cos(x)^2-1)^2, x = a .. b))

Download int_ex03.mw

So for part 2), what would you need, more generally? That requirement might affect what answer could serve.

You could put,

   $include "NODEXML.mm"

into some parent text file, and read that instead (or $include it from something else that is read, etc).

But you have to trigger the $include directives with some other mechanism instance. It could be read. Or you could use a shell call to the TTY/CLI `maple` script with that parent text file fed in as input.

The point is that you need some parent action that is not an $include directive.

For your Maple 2015 you could adjust the actual procedure used by the command plots:-sparsematrixplot.

restart;

B := LinearAlgebra:-ToeplitzMatrix([1, 2, 3, 0, 0, -3, -2, -1], symmetric):

 

plots:-sparsematrixplot(B, color=orange, labels=["",""]);


Adjust the code in the procedure itself. We only need do this once per session (or in init).

`plots/sparsematrixplot`:=FromInert(subsop([5,3]=[op([5,3],ToInert(eval(`plots/sparsematrixplot`))),_Inert_STATSEQ(_Inert_ASSIGN(_Inert_LOCAL(8), _Inert_FLOAT(_Inert_INTPOS(0), _Inert_INTPOS(0))))][],ToInert(eval(`plots/sparsematrixplot`)))):

 

plots:-sparsematrixplot(B, color=orange, labels=["",""]);

plots:-sparsematrixplot(B, color=orange, labels=["",""],
                        overrideoption, style=polygonoutline);

Download spmp_2015_ac.mw

For Maple 2024 and later the alternate command plots:-matrixplot offers its dimension and gap options, and as of Maple 2025 it offers a sparse option.

restart; with(plots); B := LinearAlgebra:-ToeplitzMatrix([1, 2, 3, 0, 0, -3, -2, -1], symmetric)

matrixplot(B, dimension = 2, sparse, color = orange, colorbar = false, gap = 0., style = polygon, labels = ["", "", ""])

matrixplot(B, dimension = 2, sparse, color = orange, gap = 0., style = polygonoutline,
           colorbar = false, labels = ["", "", ""])

Download spmp_2026_ac.mw

In that example I forced only a single color, so as to focus on comparison of the gap with the sparsematrix command. But the default is actually a range/variety of colors,

In recent Maple versions the plots:-matrixplot command can also do custom coloring, including accepting the colorscheme option. Eg,

restart;

interface(version);

`Standard Worksheet Interface, Maple 2026.1, Linux, April 28 2026 Build ID 2011354`

with(plots):

B := LinearAlgebra:-ToeplitzMatrix([1, 2, 3, 0, 0, -3, -2, -1], symmetric):

 

matrixplot(B, dimension = 2, sparse, gap = 0., style = polygonoutline,
           colorscheme="turbo",
           colorbar = false, labels = ["", "", ""], size=[400,400]);

Download spmp2_2026_ac.mw

When you call,

    plot([h(7.7,x),x=0..30]);

the evaluation of h(7.7,x) happens before the plot procedure receive any arguments, and before the symbol x takes on any numeric values. Hence, you are seeing the same error message that you would if you executed,

    h(7.7,x)

alone.

You could try,

    plot([ 'h(7.7,x)[1]', 'h(7.7,x)[2]', x=0..30 ]);

or,

    plot([ x->h(7.7,x)[1], x->h(7.7,x)[2], 0..30 ]);

If that works, but seems slower than you expect, then let us know as there may be some memoization adjustment possible, to avoid duplication of computation.  (Eg, procedure h might be given option remember; or option remember, system; etc).

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