acer

32440 Reputation

29 Badges

19 years, 360 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

The hang (in Maple 2024 at least), seems to depend on having both 

   with(Physics):

and that,

   PDEtools:-undeclare(...):

In fact it seems related just to the 2D prettyprinting of the constructed partial derivatives within the Vx Matrix result under default extended typesetting (and that loaded environment).

(You can check that claim by suppressing the relevant output by making the problematic line end with a full colon as statement terminator. You can also lprint it.)

So, one workaround is to not make that undeclare call. 

I didn't check whether the latest Physics update add-on the Maple 2024 fixes it.

Here is a shorter example that illustrates the hang (which can be avoided with several kinds of workaround...),

restart

kernelopts(version)

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

with(Physics)

PDEtools:-undeclare(prime)

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

diff(omega(x, t), t)

diff(omega(x, t), t)

R := diff(diff(omega(x, t), t), x)

 

lprint(R)

diff(diff(omega(x,t),t),x)


Printing this hangs

R

``

NULL

Download derivativve_ex01.mw

nb. You could also get by here with just,

    collect(F2,[theta1],normal)

The normal call smartens up those negative signs in the "coefficient".

restart;

 

B12 := -6*(p1 + p2)/(p1 - p2)^2:

F2 := (theta1*theta2*p1^2 + (-2*p2*theta1*theta2 - 6)*p1
      + theta1*theta2*p2^2 - 6*p2)/(p1 - p2)^2:

 

collect(F2,[theta1,theta2],normal);

theta2*theta1-6*(p1+p2)/(p1-p2)^2

Download janh_01.mw

You could scale your image to some desired size (in pixels).

restart;

with(ImageTools): with(LinearAlgebra):

M:=1/255*RandomMatrix(8,generator=0..255):
G:=convert(M,Image):

Embed(Scale(G,1..400,method=nearest));

Img_Scale.mw


ps. If you create your Matrix M with the datatype=float[8] option then you could Embed/Scale that, without having to convert to `Image`.

Your result from solve is an expression sequence (ie. a sequence of two expressions).

You can't just pass that sequence straight to the simplify command, as the arguments after the first would get interpreted as incorrectly specifying options. That's why you got that error message.

Instead, you could put those two results from solve into a list, and then simplify that.

restart

Pi1 := (w-i1)*(1/2+(i1-i2)/(2*tau))*(1-(Pn-Pr)/(1-delta))+(s-i1-Crr)*(1/2+(i1-i2)/(2*tau))*((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)+Ce*rho0*(((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)*eta+1-(Pn-Pr)/(1-delta))

diff(Pi1, i1) = 0

solve(%, i1)

simplify([%])

[(1/3)*(((-1+delta)*((-1+delta)*(tau^2+(6*Ce*eta*rho0-Crr-2*i2+s)*tau+Crr^2+(-2*s+i2)*Crr+s^2-i2*s+i2^2)*beta^2*upsilon^2-2*((s-(3/2)*w-(1/2)*i2-Crr+(1/2)*tau)*delta^2+((-(1/2)*Pr-1/2)*tau+(-(3/2)*Pn+Pr+1)*Crr+(-s+(3/2)*w+(1/2)*i2)*Pr+((3/2)*Pn-1)*s+(1/2)*i2+(-(3/2)*Pn+3/2)*w)*delta-(1/2)*Pr*(s+i2-Crr-tau))*beta*upsilon+(-1+delta)*(delta-Pr)^2))^(1/2)+((s+i2-Crr-tau)*delta-s-i2+Crr+tau)*beta*upsilon-delta^2+(Pr+1)*delta-Pr)/(beta*upsilon*(-1+delta)), (1/3)*(-((-1+delta)*((-1+delta)*(tau^2+(6*Ce*eta*rho0-Crr-2*i2+s)*tau+Crr^2+(-2*s+i2)*Crr+s^2-i2*s+i2^2)*beta^2*upsilon^2-2*((s-(3/2)*w-(1/2)*i2-Crr+(1/2)*tau)*delta^2+((-(1/2)*Pr-1/2)*tau+(-(3/2)*Pn+Pr+1)*Crr+(-s+(3/2)*w+(1/2)*i2)*Pr+((3/2)*Pn-1)*s+(1/2)*i2+(-(3/2)*Pn+3/2)*w)*delta-(1/2)*Pr*(s+i2-Crr-tau))*beta*upsilon+(-1+delta)*(delta-Pr)^2))^(1/2)+((s+i2-Crr-tau)*delta-s-i2+Crr+tau)*beta*upsilon-delta^2+(Pr+1)*delta-Pr)/(beta*upsilon*(-1+delta))]


Download Q_Simplify_ac.mw

Your worksheet contains the input,

   ScrollableMathTableOutput = false

but that would do nothing as Maple input. It's not an assignment and, more importantly, there is no such programmatic option. It can't do anything relevant here.

There can be a meaningful such line, if you add it using an external text editor (preferably while the Maple GUI is not running), in the GUI's stored configuration/preferences file. That is not a file of Maple commands. It's a file of stored GUI options/preferences.

I don't know whether that would resolve your problem. But note that your worksheet did not, in and of itself, disable matrix scrolling. So you may well not have actually successfully tried that yet.
 

ps. Your worksheet attachment was last saved using Maple 2025.0. It may not fix this particular issue, but you might otherwise benefit from the Maple 2025.1 point-release update.

The relevant thing that changed in Maple's behavior is that lowercase int began to try floating-point quadrature (aka numeric integration) in the case that it detects floats in the integrand. (Previously, it did that if only the numeric range contained floats.) This happens to have exposed a weakness in a particular numeric integration method.

So now your example (with the float in the integrand) is attempting numeric rather than symbolic integration, and it goes wrong using the _d01amc method.

Note however that you can disable that computational route, for the int command here, by supplying the numeric=false option. Then you'd get successful symbolic integration here, even for this example with a float in the integrand.

You could also get successful numeric integration here by forcing some other method (or raising Digits).

I believe that covers the relevant details. You can see the commonalities below, run with Maple 2022.2 versus Maple 2024.2. It is only the first variant below which changed, which behaves like the OP's example.

restart;

kernelopts(version);

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

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0..infinity);

1.

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0.0..infinity);

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

Control: Entering NAGInt

trying d01amc (nag_1d_quad_inf)

d01amc: result=0.

0.

restart;

infolevel[`evalf/int`]:=1:

evalf(Int(1e6*exp(-1e6*t), t=0..infinity));

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

Control: Entering NAGInt

trying d01amc (nag_1d_quad_inf)

d01amc: result=0.

0.

restart;

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0.0..infinity, numeric=false);

1

restart;

map(M->int(1e6*exp(-1e6*t), t=0.0..infinity, method=M),
    [_d01amc,gquad,_Dexp,_d01ajc]);

[0., 1., 1.000000000, 1.]

restart;
Digits:=16:

map(M->int(1e6*exp(-1e6*t), t=0.0..infinity, method=M),
    [_d01amc,gquad,_Dexp,_d01ajc]);

[1., 1., 1.000000000000000, 1.]

Download int_deta_2022.2.mw

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0..infinity);

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

Control: Entering NAGInt

trying d01amc (nag_1d_quad_inf)

d01amc: result=0.

0.

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0.0..infinity);

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

Control: Entering NAGInt

trying d01amc (nag_1d_quad_inf)

d01amc: result=0.

0.

restart;

infolevel[`evalf/int`]:=1:

evalf(Int(1e6*exp(-1e6*t), t=0..infinity));

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

evalf/int/control: attempting Levin method

Control: Entering NAGInt

trying d01amc (nag_1d_quad_inf)

d01amc: result=0.

0.

restart;

infolevel[`evalf/int`]:=1:

int(1e6*exp(-1e6*t), t=0.0..infinity, numeric=false);

1.

restart;

map(M->int(1e6*exp(-1e6*t), t=0.0..infinity, method=M),
    [_d01amc,gquad,_Dexp,_d01ajc]);

[0., 1., 1.000000000, 1.]

restart;
Digits:=16:

map(M->int(1e6*exp(-1e6*t), t=0.0..infinity, method=M),
    [_d01amc,gquad,_Dexp,_d01ajc]);

[1., 1., 1.000000000000000, 1.]

Download int_deta_2024.2.mw

For example,

type(y(x), And(typefunc(symbol,symbol),
               satisfies(u->nops(u)=1)));

                true

If you actually intended name instead of (either instance of) symbol then you could change accordingly.

The animate export of the solution modules returned by pdsolve,numeric is  considerately more efficient than generating frames as separate plots and thus repeatedly pushing the computation further out.

The results of separate animations can also be ripped out of each structure and then recombined so that they show together.

The following seems reasonably quick, taking about 12 seconds to do the computational work on my machine, ie. generating the 4*2*2*35=560 curves.

I've used Maple 2018, as the OP did.

restart

Nc := .3; M := 1.5; QG := 1.5; Thetaa := .2; n1 := 1; n2 := 0; lambda1 := .1; lambda2 := .1; lambda3 := .1p := 2; a := .5; alpha1 := (1/2)*PiNULL

p1 := 0.1e-1; p2 := 0.1e-1

rf := 997.1; kf := .613; cpf := 4179; betaf := 21*10^(-5)

betas1 := .85*10^(-5); rs1 := 3970; ks1 := 40; cps1 := 765

betas2 := 1.67*10^(-5); rs2 := 8933; ks2 := 401; cps2 := 385

z1 := 1/((1-p1)^2.5*(1-p2)^2.5)

knf := kf*(ks1+2*kf-2*p1*(kf-ks1))/(ks1+2*kf+p1*(kf-ks1)); khnf := knf*(ks2+2*knf-2*p2*(knf-ks2))/(ks2+2*knf+p2*(knf-ks2))

z2 := 1-p1-p2+p1*rs1/rf+p2*rs2/rf

z3 := 1-p1-p2+p1*rs1*cps1/(rf*cpf)+p2*rs2*cps2/(rf*cpf)

z4 := khnf/kf

z5 := 1-p1-p2+p1*rs1*betas1/(rf*betaf)+p2*rs2*betas2/(rf*betaf)

OdeSys := z4*(X*(diff(Theta(X, tau), X, X))+diff(Theta(X, tau), X))/z3-(diff(Theta(X, tau), tau))-Nc*(Theta(X, tau)-Thetaa)^2*z5/z1-M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n1*z2/z3)/(z3*(1-Thetaa)^p)-Nr*(Theta(X, tau)^4-Thetaa^4)/z3+QG*X*(1+lambda1*(Theta(X, tau)-Thetaa)+lambda2*(Theta(X, tau)-Thetaa)^2+lambda3*(Theta(X, tau)-Thetaa)^3)/z3; Cond := {Theta(0, tau) = 1+a*sin(alpha1), Theta(X, 0) = 0, (D[1](Theta))(1, tau) = 0}

OdeSys1 := z4*(X*(diff(Theta(X, tau), X, X))+diff(Theta(X, tau), X))/z3-(diff(Theta(X, tau), tau))-Nc*(Theta(X, tau)-Thetaa)^2*z5/z1-M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n2*z2/z3)/(z3*(1-Thetaa)^p)-Nr*(Theta(X, tau)^4-Thetaa^4)/z3+QG*X*(1+lambda1*(Theta(X, tau)-Thetaa)+lambda2*(Theta(X, tau)-Thetaa)^2+lambda3*(Theta(X, tau)-Thetaa)^3)/z3; Cond1 := {Theta(0, tau) = 1+a*sin(alpha1), Theta(X, 0) = 0, (D[1](Theta))(1, tau) = 0}

OdeSysa := z4*(X*(diff(Theta(X, tau), X, X))+diff(Theta(X, tau), X))/z3-(diff(Theta(X, tau), tau))-Nc*(Theta(X, tau)-Thetaa)^2*z5/z1-M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n1*z2/z3)/(z3*(1-Thetaa)^p)-Nr*(Theta(X, tau)^4-Thetaa^4)/z3+QG*X*(1+lambda1*(Theta(X, tau)-Thetaa)+lambda2*(Theta(X, tau)-Thetaa)^2+lambda3*(Theta(X, tau)-Thetaa)^3)/z3; Conda := {Theta(0, tau) = 1+a*cos(alpha1), Theta(X, 0) = 0, (D[1](Theta))(1, tau) = 0}

OdeSysa1 := z4*(X*(diff(Theta(X, tau), X, X))+diff(Theta(X, tau), X))/z3-(diff(Theta(X, tau), tau))-Nc*(Theta(X, tau)-Thetaa)^2*z5/z1-M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n2*z2/z3)/(z3*(1-Thetaa)^p)-Nr*(Theta(X, tau)^4-Thetaa^4)/z3+QG*X*(1+lambda1*(Theta(X, tau)-Thetaa)+lambda2*(Theta(X, tau)-Thetaa)^2+lambda3*(Theta(X, tau)-Thetaa)^3)/z3; Conda1 := {Theta(0, tau) = 1+a*cos(alpha1), Theta(X, 0) = 0, (D[1](Theta))(1, tau) = 0}

colour := [cyan, black]; colour1 := [red, blue]

NrVals := [2.5, 3.5]

NN := 35:
str := time[real]():
for j from 1 to nops(NrVals) do
Ans := pdsolve((eval([OdeSys,Cond],Nr=NrVals[j]))[],numeric,spacestep=1/200,timestep=1/100):
Ans1 := pdsolve((eval([OdeSys1,Cond1],Nr=NrVals[j]))[],numeric,spacestep=1/200,timestep=1/100):
Ansa := pdsolve((eval([OdeSysa,Conda],Nr=NrVals[j]))[],numeric,spacestep=1/200,timestep=1/100):
Ansa1 := pdsolve((eval([OdeSysa1,Conda1], Nr=NrVals[j]))[],numeric,spacestep=1/200,timestep=1/100):

eta[j] := Ans:-animate((int(z3*z5*Nc*(Theta(X, tau)-Thetaa)^2/(z1*z4)+NrVals[j]*(Theta(X, tau)^4-Thetaa^4)/z4+M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n1*z2/z3)/(z4*(1-Thetaa)^p), X = 0 .. 1,numeric,epsilon=1e-5,method=_Dexp))/(z3*z5*Nc*(1-Thetaa)^2/(z1*z4)+NrVals[j]*(-Thetaa^4+1)/z4+M^2*(1-Thetaa)*(1+n1*z2/z3)/z4), tau = 0 .. 2, X = 0.01..1.0, frames=NN, linestyle = "solid", 'axes' = 'boxed', labels = [" τ ", " η "], color = colour[j], title="X = %4.3f"):
eta1[j] := Ans1:-animate((int(z3*z5*Nc*(Theta(X, tau)-Thetaa)^2/(z1*z4)+NrVals[j]*(Theta(X, tau)^4-Thetaa^4)/z4+M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n2*z2/z3)/(z4*(1-Thetaa)^p), X = 0 .. 1,numeric,epsilon=1e-5,method=_Dexp))/(z3*z5*Nc*(1-Thetaa)^2/(z1*z4)+NrVals[j]*(-Thetaa^4+1)/z4+M^2*(1-Thetaa)*(1+n2*z2/z3)/z4), tau = 0 .. 2, X = 0.01..1.0, frames=NN, linestyle = "dash", 'axes' = 'boxed', labels = [" τ ", " η "], color = colour[j], title="X = %4.3f");
etaa[j] := Ansa:-animate((int(z3*z5*Nc*(Theta(X, tau)-Thetaa)^2/(z1*z4)+NrVals[j]*(Theta(X, tau)^4- Thetaa^4)/z4+M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n1*z2/z3)/(z4*(1-Thetaa)^p), X = 0 .. 1,numeric,epsilon=1e-5,method=_Dexp))/(z3*z5*Nc*(1-Thetaa)^2/(z1*z4)+NrVals[j]*(-Thetaa^4+1)/z4+M^2*(1-Thetaa)*(1+n1*z2/z3)/z4), tau = 0 .. 2, X = 0.01..1.0, frames=NN, linestyle = "solid", 'axes' = 'boxed', labels = [" τ ", " η "], color = colour1[j], title="X = %4.3f");
etaa1[j] := Ansa1:-animate((int(z3*z5*Nc*(Theta(X, tau)-Thetaa)^2/(z1*z4)+NrVals[j]*(Theta(X, tau)^4-Thetaa^4)/z4+M^2*(Theta(X, tau)-Thetaa)^(p+1)*(1+n2*z2/z3)/(z4*(1-Thetaa)^p), X = 0 .. 1,numeric,epsilon=1e-5,method=_Dexp))/(z3*z5*Nc*(1-Thetaa)^2/(z1*z4)+NrVals[j]*(-Thetaa^4+1)/z4+M^2*(1-Thetaa)*(1+n2*z2/z3)/z4), tau = 0 .. 2, X = 0.01..1.0, frames=NN, linestyle = "dash", 'axes' = 'boxed', labels = [" τ ", " η "], color = colour1[j], title="X = %4.3f");

Plots1[j] := Ans1:-animate(Theta(X, tau), tau = 0..2, linestyle = "dash", labels = ["Y", Theta(Y, tau)], color = colour[j], 'axes' = 'boxed', frames=NN, title="tau = %4.3f");
 Plotsa[j] := Ansa:-animate(Theta(X, tau), tau = 0..2, linestyle = "solid", labels = ["Y", Theta(Y, tau)], color = colour1[j], 'axes' = 'boxed', frames=NN, title="tau = %4.3f");
 Plots[j] := Ans:-animate(Theta(X, tau), tau = 0..2, linestyle = "solid", labels = ["Y", Theta(Y, tau)], color = colour[j], 'axes' = 'boxed', frames=NN, title="tau = %4.3f");
 Plotsa1[j] := Ansa1:-animate(Theta(X, tau), tau = 0..2, linestyle = "dash", labels = ["Y", Theta(Y, tau)], color = colour1[j], 'axes' = 'boxed', frames=NN, title="tau = %4.3f");

end do:
(time[real]()-str)*`seconds`;

11.645*seconds

plots:-display(seq(plots:-display(seq([seq(PLOT(op([1,KK,..],RR[j]),op(2..,RR[j])),
                                           RR=[Plots,Plotsa,Plots1,Plotsa1])][],
                                      j=1..nops(NrVals))),
                   KK=1..NN),insequence,size=[700,700]);

plots:-display(seq(plots:-display(seq([seq(PLOT(op([1,KK,..],RR[j]),op(2..,RR[j])),
                                           RR=[eta,etaa,eta1,etaa1])][],
                                      j=1..nops(NrVals))),
                   KK=1..NN),insequence,size=[700,700]);

``

Download paper2_new_efficiency_plots_2025_acc.mw

You can even get a nice closed form for the expression that represents this curve, in terms of either variable.

restart;

f3:=-1/(((-qh-1)*Tch+qc+1)*deltac+(qh+1)*Tch)*(6*alpha^2*(alpha-1)*(alpha+1)*(((-qh-1)*Tch+qc+1)^2*deltac^2+((-7/3*(qh^2)-10/3*qh-1)*Tch^2+(2*(qh+1))*(qc+1)*Tch+(1/3)*qc^2-2*qc*(1/3)-1)*deltac+4*qh*Tch^2*(qh+1)*(1/3)))=0:

params:=[qh=0.64,deltac=0.5,deltah=0.5,alpha=0.8,gamma=0.1,M=1.6205];

[qh = .64, deltac = .5, deltah = .5, alpha = .8, gamma = .1, M = 1.6205]

Eq1:=eval(collect(f3,[Tch,qc]), params);

1.3824*(0.27333334e-1*Tch^2+(.8200*qc+.8200)*Tch+.4166666667*qc^2+.1666666667*qc-.25)/(.820*Tch+.5*qc+.5) = 0

plots:-implicitplot(Eq1, qc=0..1, Tch=0..1);

S1:=solve({(lhs-rhs)(eval(f3,convert(params,rational)))=0,
                qc>0, Tch>0}, [qc,Tch]);

[[qc < 3/5, 0 < qc, Tch = -15*qc-15+(10/41)*(3526*qc^2+7462*qc+3936)^(1/2)]]

S2:=solve({(lhs-rhs)(eval(f3,convert(params,rational)))=0,
                qc>0, Tch>0}, [Tch,qc]);

[[Tch < -15+(40/41)*246^(1/2), 0 < Tch, qc = -(123/125)*Tch-1/5+(2/125)*(3526*Tch^2-6150*Tch+2500)^(1/2)]]

indets([S1,S2],`<`);
evalf(%);

{0 < Tch, 0 < qc, Tch < -15+(40/41)*246^(1/2), qc < 3/5}

{0. < Tch, 0. < qc, Tch < .30184111, qc < .6000000000}

Download 1_6_ac.mw

The range qc=0.34..0.5Tch=0.01..0.05 that you were using doesn't contain what you're after. It just misses the curve where the expression is zero...

plots:-implicitplot(Eq1, qc=0.34..0.5, Tch=0.01..0.1, rangeasview);

You could augment the convert command.

restart;

`convert/sinc` := proc(ee)
   evalindets(
     evalindets(
       evalindets(ee,
                  specfunc(sin),x -> op(x)*sinc(op(x))),
       specfunc(cos),x -> (op(x)+Pi/2)*sinc(op(x)+Pi/2)),
     specfunc(tan),x -> op(x)*sinc(op(x))/(op(x)+Pi/2)/sinc(op(x)+Pi/2));
end proc:

 

convert(sin(s), sinc);

s*sinc(s)

convert(cos(s), sinc);

(s+(1/2)*Pi)*sinc(s+(1/2)*Pi)

convert(tan(s), sinc);

s*sinc(s)/((s+(1/2)*Pi)*sinc(s+(1/2)*Pi))

Download conv_sinc_ex.mw

And you could also make such a convert(...,sinc) call for a compound expression involving a mix of sin&cos&tan, naturally.

ps. I changed your Post into a Question.

pps. You could also handle csc/sec/cot , in a few ways, eg. by converting to sincos as intermediate form.

ppps. It's possible to simply replace name sin/cos/tan by your operators, under eval. I deliberately used evalindets instead, to target only function calls of those names, and not any (other) instances of the bare names. Examples where is might matter could be rare, and possibly look contrived...

An Explore example, using your attachment g1.mw .

The signifant first change here is to remove the fixed view option from the plot3d call (since the surface's scale changes so much with the parameters) and to supply the adaptview=false option to Explore so that it allow each frame to get its own view independently. See magenta text edits.

g1_ac.mw

restart

_local(gamma)

M := 2*sqrt(7*a^6*alpha[4]^2-8*a^4*l^2*alpha[4]*alpha[5]+a^2*l^4*alpha[5]^2+12*a^5*alpha[3]*alpha[4]-8*a^3*l^2*alpha[1]*alpha[4]-6*a^3*l^2*alpha[3]*alpha[5]+2*a*l^4*alpha[1]*alpha[5]+10*a^4*alpha[2]*alpha[4]+5*a^4*alpha[3]^2-6*a^2*l^2*alpha[1]*alpha[3]-4*a^2*l^2*alpha[2]*alpha[5]+l^4*alpha[1]^2-8*a^4*alpha[4]+8*a^3*alpha[2]*alpha[3]+2*a^2*l^2*alpha[5]-4*a*l^2*alpha[1]*alpha[2]-6*a^3*alpha[3]+3*a^2*alpha[2]^2+2*a*l^2*alpha[1]-4*a^2*alpha[2]+a^2)

G := proc( alpha__1,alpha__2,alpha__3,alpha__4,alpha__5 )
   global last;
   last := [[:-alpha[1] = alpha__1,:-alpha[2] = alpha__2,:-alpha[3] = alpha__3,
             :-alpha[4] = alpha__4,:-alpha[5] = alpha__5],
            eval(M, [:-alpha[1] = alpha__1,:-alpha[2] = alpha__2,:-alpha[3] = alpha__3,
                     :-alpha[4] = alpha__4,:-alpha[5] = alpha__5])];
   plot3d(Im(eval(last[2])), a = -10 .. 10, l = -10 .. 10,
          #view = -10 .. 10,
          grid = [100, 100],
          colorscheme="turbo",
          style = surface, adaptmesh = false, size = [500, 500]); end proc:

last := 'last'; Explore(G(`&alpha;__1`, `&alpha;__2`, `&alpha;__3`, `&alpha;__4`, `&alpha;__5`), `&alpha;__1` = -5.00000001 .. 5.000000001, `&alpha;__2` = -5.00000001 .. 5.000000001, `&alpha;__3` = -5.00000001 .. 5.000000001, `&alpha;__4` = -5.00000001 .. 5.000000001, `&alpha;__5` = -5.00000001 .. 5.000000001, initialvalues = [`&alpha;__1` = 1, `&alpha;__2` = 1, `&alpha;__3` = 1, `&alpha;__4` = 1, `&alpha;__5` = 5], placement = right, adaptview = false)

 

 

 

 

alpha__1

 

 

 

 

alpha__2

 

 

 

 

alpha__3

 

 

 

 

alpha__4

 

 

 

 

alpha__5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The following tests that the first indices (yours have just one) of the elements are four distinct values.
 

L:=[ [F[1], F[2], F[3], F[4]],
     [F[1], F[2], F[3], M[1]],
     [F[1], F[2], F[3], M[2]],
     [F[1], F[2], F[3], M[3]],
     [F[1], F[2], F[3], M[4]],
     [F[1], F[2], F[4], M[1]],
     [F[1], F[2], F[4], M[2]],
     [F[1], F[2], F[4], M[3]],
     [F[1], F[2], F[4], M[4]],
     [F[1], F[2], M[1], M[2]] ]:

 

select(LL->nops({map2(op,1,LL)[]})=4,L);

[[F[1], F[2], F[3], F[4]], [F[1], F[2], F[3], M[4]], [F[1], F[2], F[4], M[3]]]


Download map_op_ex.mw

You haven't stated explicitly that all the lists in L will always have elements that are indexed by at least one value, but I have presumed it so.

ps. I didn't see dharr's Answer before posting my own. The fact that they are so similar is really because it's a natural way to approach it.
[edit] dharr's Answer seems to have gone missing. But it was fine, IMO, (presuming all elements have exactly one index, which is also reasonable in the absence of stated details),
    select(x->nops({map(op,x)[]})=4,L);

[edit] Some explanation of the steps, so that next time you might build your own,

Turn the inner lists of indexed items into
lists of just their indices.

map( LL -> map2(op,1,LL), L );

[[1, 2, 3, 4], [1, 2, 3, 1], [1, 2, 3, 2], [1, 2, 3, 3], [1, 2, 3, 4], [1, 2, 4, 1], [1, 2, 4, 2], [1, 2, 4, 3], [1, 2, 4, 4], [1, 2, 1, 2]]

But now also make them sets of the indices, to
get rid of duplicates.

map( LL -> {map2(op,1,LL)[]}, L );

[{1, 2, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3}, {1, 2, 3, 4}, {1, 2, 4}, {1, 2, 4}, {1, 2, 3, 4}, {1, 2, 4}, {1, 2}]

But now take the nops of those sets, and set equal to 4.

map( LL -> nops({map2(op,1,LL)[]})=4, L );

[4 = 4, 3 = 4, 3 = 4, 3 = 4, 4 = 4, 3 = 4, 3 = 4, 4 = 4, 3 = 4, 2 = 4]

Now use those equations as boolean valued tests,
in order to select with this action.

select(LL->nops({map2(op,1,LL)[]})=4,L);

[[F[1], F[2], F[3], F[4]], [F[1], F[2], F[3], M[4]], [F[1], F[2], F[4], M[3]]]

Similarly, but without using select.

map( LL -> ifelse(nops({map2(op,1,LL)[]})=4, LL, NULL), L );

[[F[1], F[2], F[3], F[4]], [F[1], F[2], F[3], M[4]], [F[1], F[2], F[4], M[3]]]

I'm guessing that you'd prefer to have the Product call be shown with the assigned name, rather than with the Vector or list to which that name is assigned.

Here is something that gets that, for Vector or list, in Maple 2021.

restart;

kernelopts(version);

`Maple 2021.2, X86 64 LINUX, Nov 23 2021, Build ID 1576349`

with(Statistics):

Dist := proc(N::{posint, name}, alpha::evaln)
  local K;
  uses Statistics;

  K := numelems(eval(alpha));
  
  Distribution( ':-PDF' = (z -> Product(('alpha'[k]+z[k])^N, k=1..K)) )
end proc:

P := Vector(3, [13,2,4]);

Vector(3, {(1) = 13, (2) = 2, (3) = 4})

X := RandomVariable(Dist(N, P)):

res1 := PDF(X, x);

Product((P[k]+x[k])^N, k = 1 .. 3)

eval(res1,1);

Product((P[k]+x[k])^N, k = 1 .. 3)

value(eval(res1,1));

(13+x[1])^N*(2+x[2])^N*(4+x[3])^N

L := [3,17,22];
X2 := RandomVariable(Dist(N, L)):

[3, 17, 22]

res2 := PDF(X2, y);

Product((L[k]+y[k])^N, k = 1 .. 3)

value(eval(res2,1));
value(res2);

(3+y[1])^N*(17+y[2])^N*(22+y[3])^N

(3+y[1])^N*(17+y[2])^N*(22+y[3])^N

eval(res2,1);
res2;

Product((L[k]+y[k])^N, k = 1 .. 3)

Product(([3, 17, 22][k]+y[k])^N, k = 1 .. 3)

V := Vector([1/2,1/3,1/4]):
subs('P'='V', eval(res1,1));
value(eval(%,1));

Product((V[k]+x[k])^N, k = 1 .. 3)

(1/2+x[1])^N*(1/3+x[2])^N*(1/4+x[3])^N

Download Product_error_ac.mw

and a variant on that: Product_error_ac2.mw

Here is something that behaves ok for a list (but not Vector), in Maple 2015: Product_error_ac_2015_list.mw

With a little effort one can guard against collision of the textplots.

restart

L := [sin(x), sin(x)^2, sin(x)^3, sin(x)^4, sin(x)^5, sin(x)^6, surd(sin(x), 2), surd(sin(x), 3), surd(sin(x), 4), surd(sin(x), 5), surd(sin(x), 6)]

Typesetting:-mrow(Typesetting:-mi("clist", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("plots", italic = "true", mathvariant = "italic"), Typesetting:-mo(":-", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("setcolors", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("Niagara"), Typesetting:-mi("")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-ms("Black"), Typesetting:-mi("")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(":", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("not", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("nops", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("L", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo("&leq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("nops", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("clist", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("then", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("error", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-ms("add more colors to clist"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"))

plots:-animate(proc (T) local i, j, TL; TL := []; for i to nops(L) do if 0.5e-1 < min(100, seq(eval(abs(L[i]-rhs(TL[j])), x = T), j = 1 .. nops(TL))) then TL := [TL[], i = L[i]] end if end do; plots:-display(plot(L, x = 0 .. T, ':-thickness' = 2.5, ':-color' = clist), ifelse(0.1e-2 < T and T < Pi-0.1e-2, seq(plots:-textplot([T, eval(rhs(TL[i]), x = T), rhs(TL[i])], ':-align' = ':-right', ':-color' = clist[lhs(TL[i])]), i = 1 .. nops(TL)), NULL), ':-xtickmarks' = ':-piticks') end proc, [x], x = 0 .. Pi, frames = 100, size = [800, 500])

NULL

Download Animation_Trigo_ac.mw

Your curves don't change much for such small changes in E1, it seems.

AGM_method_single_line_plot_ac.mw

There's quite a bit of duplicated effort in your approaches (which I didn't try to improve, though I showed a couple or alternative syntax blobs).

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