Maple 2022 Questions and Posts

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

Since C2=D1.D1inv should be equal to I. But return is just an expression (see attached). Further, how to obtain residue for a function C2?

residue.mw

For some of the users with eye problems like me, the white canvas is burning eyes out of sockets as the monitor needs to be close up. Even turning down the intensity do not work especially since all other applications on Linux can be configured to have a dark-theme, but NOT Maple it seems.

What is the reason for this resistance from Maple Developers to just ram this white canvas down our throats verion after version.

Users have been asking since about Maple 11 to change  this.

I mean, Maple is not exactly cheap, which would have been an excuse, and is formidable intellectual software, so "ability" should not be a problem

However am I to believe that just changing the canvas color, turns out to be  a serious intellectual challenge for developers ?

Google yields such custom canvas request spanning more than a decade, but users arrive at crickets and a dead end.

Please be kind and give us a customizable canvas or any DARK theme of your choice for users with visual challenges and the lots of normal users who also want a custom canvas color or dark theme. It is overdue.

At the moment I use the cumbersome table-solution with a gray background, which helps some, but it is clunky and no alternative for long term use as the window and bars itself are still white and distracts and defeats the objective somewhat.

HPM.mw

  • Please help me
  • How do I write Homotopy Perturbation method for a partial differential equation for this question in Maple?

Download HPM.mw

 

Good day all,

please I am new Maple user, i used the same code to solve boundary layer flow. Itried to use the same code in solving nanofluid but the solution is not coverging at some point. But the author i want to compared my results with had solution at those points.

Is there any way i can get solution of this model at this with these values?. Please i need your help. Thank you in advance

secod_code.mw

NULL

restart

with*plots; ode1 := (1+1/bet)*(diff(f(eta), eta, eta, eta))-(diff(f(eta), eta))^2+f(eta)*(diff(f(eta), eta, eta))+Gr*(theta(eta)+lambda1*theta(eta)^2)+Gc*(phi(eta)+lambda2*phi(eta)^2)-M*(diff(f(eta), eta)) = 0

(1+1/bet)*(diff(diff(diff(f(eta), eta), eta), eta))-(diff(f(eta), eta))^2+f(eta)*(diff(diff(f(eta), eta), eta))+Gr*(theta(eta)+lambda1*theta(eta)^2)+Gc*(phi(eta)+lambda2*phi(eta)^2)-M*(diff(f(eta), eta)) = 0

(1)

ode2 := (diff(theta(eta), eta, eta))*(1+(4*R*(1/3))*(theta(eta)+CT)^3)/Pr+4*R*(theta(eta)+CT)^2*(diff(theta(eta), eta))^2+f(eta)*(diff(theta(eta), eta))+Nb*(diff(phi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))^2-de*(f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))+f(eta)^2*(diff(theta(eta), eta, eta))) = 0

(diff(diff(theta(eta), eta), eta))*(1+(4/3)*R*(theta(eta)+CT)^3)/Pr+4*R*(theta(eta)+CT)^2*(diff(theta(eta), eta))^2+f(eta)*(diff(theta(eta), eta))+Nb*(diff(phi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))^2-de*(f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))+f(eta)^2*(diff(diff(theta(eta), eta), eta))) = 0

(2)

ode3 := diff(phi(eta), eta, eta)+Pr*Le*(diff(phi(eta), eta))*f(eta)+Nt*(diff(theta(eta), eta, eta))/Nb-Pr*Le*dc*(f(eta)*(diff(f(eta), eta))*(diff(phi(eta), eta))+f(eta)^2*(diff(phi(eta), eta, eta))) = 0

diff(diff(phi(eta), eta), eta)+Pr*Le*(diff(phi(eta), eta))*f(eta)+Nt*(diff(diff(theta(eta), eta), eta))/Nb-Pr*Le*dc*(f(eta)*(diff(f(eta), eta))*(diff(phi(eta), eta))+f(eta)^2*(diff(diff(phi(eta), eta), eta))) = 0

(3)

bcs1 := f(0) = 0, (D(f))(0) = 1+xi*((D^2)(f))(0), (D(f))(6) = 0, theta(6) = 0, phi(0) = 1+`ς`*(D(phi))(0), theta(0) = 1+Zeta*(D(theta))(0), phi(6) = 0

f(0) = 0, (D(f))(0) = 1+xi*(D(f))(0)^2, (D(f))(6) = 0, theta(6) = 0, phi(0) = 1+varsigma*(D(phi))(0), theta(0) = 1+Zeta*(D(theta))(0), phi(6) = 0

(4)

NULL

 

L := [0., .1, .4, 1]

[0., .1, .4, 1]

(5)

 
  

NULL


  for k to 10 do
      sol_All := dsolve
                 ( eval
                   ( {bcs1, ode1, ode2,ode3},
                     [xi= L[k],R=1, CT=0.2, Gr=0.5, Gc=0.5, lambda1=0.2, lambda2=0.2, Pr=0.72, Nb=0.5,  Le=1, dc=0.2, de=0.2, Nt=0.5, Zeta=0.5, varsigma=0.5, M=1.5, bet=1.5]
                   ),
                   [f(eta), theta(eta),phi(eta)],
                   numeric,
                   output = listprocedure
                 );
      Y_sol || k := rhs(sol_All[5]);
      YP_sol || k := -rhs(sol_All[6]);

feta || k := rhs(sol_All[4]);
      fpeta || k := rhs(sol_All[3]);

phieta || k := rhs(sol_All[8]);
      phipeta || k := rhs(sol_All[7])
  end do:

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

for k to 10 do L[k], [(Y_sol || k)(0), (YP_sol || k)(0)] end do

0., [Y_sol1(0), YP_sol1(0)]

 

.1, [Y_sol2(0), YP_sol2(0)]

 

.4, [Y_sol3(0), YP_sol3(0)]

 

1, [Y_sol4(0), YP_sol4(0)]

 

Error, invalid subscript selector

 

for k to 10 do L[k], [(feta || k)(0)] end do

0., [feta1(0)]

 

.1, [feta2(0)]

 

.4, [feta3(0)]

 

1, [feta4(0)]

 

Error, invalid subscript selector

 

NULL

Error, mismatched or missing bracket/operator

"for k  from 1 to  10 do L[k], ([phieta ||k(0),phipeta||k(0)]); od; "

 

NULL

  plot( [ seq((Y_sol||j)(eta), j = 1..6)],
         eta = 0 .. 6,
         labels = [eta, theta(eta)],
         axes = boxed
      );
plot( [ seq((YP_sol||j)(eta), j = 1..6)],
         eta = 0 .. 8,
         labels = [eta, thetaprime(eta)],
         axes = boxed
      );

 plot( [ seq((feta||j)(eta), j = 1..6)],
         eta = 0 .. 8,
         labels = [eta, f(eta)],
         axes = boxed
      );
  plot( [ seq((fpeta||j)(eta), j = 1..6)],
         eta = 0 .. 5,
         labels = [eta, fprime(eta)],
         axes = boxed
      );
plot( [ seq((phipeta||j)(eta), j = 1..6)],
         eta = 0 .. 5,
         labels = [eta, phiprime(eta)],
         axes = boxed
      );

plot( [ seq((phieta||j)(eta), j = 1..6)],
         eta = 0 .. 5,
         labels = [eta, phi(eta)],
         axes = boxed
      );

Warning, expecting only range variable eta in expression Y_sol1(eta) to be plotted but found name Y_sol1

 

 

Warning, expecting only range variable eta in expression YP_sol1(eta) to be plotted but found name YP_sol1

 

 

Warning, expecting only range variable eta in expression feta1(eta) to be plotted but found name feta1

 

 

Warning, expecting only range variable eta in expression fpeta1(eta) to be plotted but found name fpeta1

 

 

Warning, expecting only range variable eta in expression phipeta1(eta) to be plotted but found name phipeta1

 

 

Warning, expecting only range variable eta in expression phieta1(eta) to be plotted but found name phieta1

 

 

I am slightly confused as I can't apply the seemingly correct function to a sequence. It seems like modp does not like my inverse. But I am not aware of any other way of finding the modular inverse.  

a := i -> (1025 - 2^(10 - 2^i))^(-1) mod (1025 - 2^(10 - 2*2^i));

proc (i) options operator, arrow; `mod`(1/(1025-2^(10-2^i)), 1025-2^(10-2*2^i)) end proc

(1)

a(1);

5

(2)

a(2);

17

(3)

map(i -> i + 1, {seq(1 .. 4)});

{2, 3, 4, 5}

(4)

map(i -> 1/(1025 - 2^(10 - 2^i)) mod (1025 - 2^(10 - 2*2^i)), {seq(1 .. 4)});

Error, invalid input: modp received 65599/64, which is not valid for its 2nd argument, m

 

map(a, {seq(1 .. 4)});

Error, invalid input: modp received 65599/64, which is not valid for its 2nd argument, m

 

NULL

NULL

Download example.mw

how I can plot phi[2] as a contour like attached figure?

tez-1.mw


 

restart

``

beta := 2.5; lambda := 0.1e-1; b := Pi; a := Pi; alpha := 1; y[1] := 1.5; y[2] := 1.5; x[1] := -1; x[2] := 1; Q[1] := 40; Q[2] := 35

2.5

 

0.1e-1

 

Pi

 

Pi

 

1

 

1.5

 

1.5

 

-1

 

1

 

40

 

35

(1)

NULL

NULL

v := (2*n-1)*Pi/(2*b)

n-1/2

(2)

Delta := exp(2*v*a)*(alpha*v+beta)*(1+lambda)-(1-lambda)*(alpha*v-beta)

1.01*exp(2*(n-1/2)*Pi)*(n+2.000000000)-.99*n+2.970000000

(3)

g[22] := ((alpha*v+beta)*((1+lambda)*exp(-v*abs(x-xi))+(-1+lambda)*exp(-v*(x+xi)))*exp(2*v*a)+(alpha*v-beta)*((1+lambda)*exp(-v*(x+xi))+(-1+lambda)*exp(-v*abs(x-xi))))/(2*v*Delta)

g[21] := ((alpha*v+beta)*exp(v*(2*a+xi))+(alpha*v-beta)*exp(-v*xi))*exp(-v*x)/(v*Delta)

NULL

u[2] := int(2*g[21]*Q[1]*Dirac(xi-x[1])*sin(n*Pi*y[1]/b)/b, xi = -a .. 0)+int(2*g[22]*Q[2]*Dirac(xi-x[2])*sin(n*Pi*y[2]/b)/b, xi = 0 .. infinity)

NULL

phi[2] := sum(u[2](x)*sin(v*y), n = 1 .. 30)

NULL

``

plot3d(phi[2], x = 0 .. 5, y = 0 .. b)

 

NULL


 

Download tez-1.mw


 

restart

``

beta := 2.5; lambda := 0.1e-1; b := Pi; a := Pi; alpha := 1; y[1] := 1.5; y[2] := 1.5; x[1] := -1; x[2] := 1; Q[1] := 40; Q[2] := 35

2.5

 

0.1e-1

 

Pi

 

Pi

 

1

 

1.5

 

1.5

 

-1

 

1

 

40

 

35

(1)

NULL

NULL

v := (2*n-1)*Pi/(2*b)

n-1/2

(2)

Delta := exp(2*v*a)*(alpha*v+beta)*(1+lambda)-(1-lambda)*(alpha*v-beta)

1.01*exp(2*(n-1/2)*Pi)*(n+2.000000000)-.99*n+2.970000000

(3)

g[22] := ((alpha*v+beta)*((1+lambda)*exp(-v*abs(x-xi))+(-1+lambda)*exp(-v*(x+xi)))*exp(2*v*a)+(alpha*v-beta)*((1+lambda)*exp(-v*(x+xi))+(-1+lambda)*exp(-v*abs(x-xi))))/(2*v*Delta)

g[21] := ((alpha*v+beta)*exp(v*(2*a+xi))+(alpha*v-beta)*exp(-v*xi))*exp(-v*x)/(v*Delta)

NULL

u[2] := int(2*g[21]*Q[1]*Dirac(xi-x[1])*sin(n*Pi*y[1]/b)/b, xi = -a .. 0)+int(2*g[22]*Q[2]*Dirac(xi-x[2])*sin(n*Pi*y[2]/b)/b, xi = 0 .. infinity)

NULL

phi[2] := sum(u[2](x)*sin(v*y), n = 1 .. 30)

NULL

``

plot3d(phi[2], x = 0 .. 5, y = 0 .. b)

 

NULL


 

Download tez-1.mw

 

 

How to get same graph from maple with finite difference method for differential equations 

I m new here how to plot this i have seen related posts no where given clear idea for FDM method

plase help me to get the results Thank you

 

 

 For the command LieAlgebras[RootSpaceDecomposition] I don't understand what the command return, I read the help and see the examples but still not understanding.

 

for example it returns:

RSD := RootSpaceDecomposition(CSA);

RSD := table([[-2, -1] = E31, [2, 1] = E13, [1, 2] = E23, [1, -1] = E12, [-1, 1] = E21, [-1, -2] = E32])

I don't understand what means [-2, -1] even they said that is the root but I know that a root is in h* so it must be only a number not a vector.

I found another big problem. 

In 2022, I get Error, (in SolveTools:-Polynomial) too many levels of recursion when using alias(seq(c[k] = _C||k, k = 0..10)); at the top of my code and the solution to the ode has c[2],c[3] etc.. as constants of integration.

This solution was given by Kitonum in this answer

I had this for years in the code (i.e. the alias) code.

In Maple 2022 the following gives the above exception error from odetest. I am using 2022, because in 2023 it just hangs on the same code.  

If I remove the alias code, no error shows. (solution is wrong, but that is different story). 

Also, If I remove the alias code, 2023 no long hangs!  

restart;

#kernelopts('assertlevel'=2):

alias(seq(c[k] = _C||k, k = 0..10));

c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10]

ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+12*y(x) = 80*sin(2*x);
sol:=y(x) = -10*exp(-1/2*2^(1/2)*arctan(sin(2*2^(1/2)*x)/cos(2*2^(1/2)*x)))*(c[3]*cos(2*2^(1/2)*x)+c[2]*sin(2*2^(1/2)*x))*((-1/10*exp(4*I*2^(1/2)*x)+1/10)*c[2]-1/10*I*c[3]*exp(4*I*2^(1/2)*x)-1/10*I*c[3])/((exp(4*I*2^(1/2)*x)-1)*c[2]+I*c[3]*exp(4*I*2^(1/2)*x)+I*c[3])*c[1]-10*I*exp(-1/2*2^(1/2)*arctan(sin(2*2^(1/2)*x)/cos(2*2^(1/2)*x)))*(c[3]*cos(2*2^(1/2)*x)+c[2]*sin(2*2^(1/2)*x))*(cos(2*x)-sin(2*x))*exp(2*I*2^(1/2)*x)*exp(2*I*2^(1/2)*x)^(-1/2*I*2^(1/2))/((exp(4*I*2^(1/2)*x)-1)*c[2]+I*c[3]*exp(4*I*2^(1/2)*x)+I*c[3]);

odetest(sol,ode);

diff(diff(y(x), x), x)+4*(diff(y(x), x))+12*y(x) = 80*sin(2*x)

y(x) = -10*exp(-(1/2)*2^(1/2)*arctan(sin(2*2^(1/2)*x)/cos(2*2^(1/2)*x)))*(c[3]*cos(2*2^(1/2)*x)+c[2]*sin(2*2^(1/2)*x))*((-(1/10)*exp((4*I)*2^(1/2)*x)+1/10)*c[2]-((1/10)*I)*c[3]*exp((4*I)*2^(1/2)*x)-((1/10)*I)*c[3])*c[1]/((exp((4*I)*2^(1/2)*x)-1)*c[2]+I*c[3]*exp((4*I)*2^(1/2)*x)+I*c[3])-(10*I)*exp(-(1/2)*2^(1/2)*arctan(sin(2*2^(1/2)*x)/cos(2*2^(1/2)*x)))*(c[3]*cos(2*2^(1/2)*x)+c[2]*sin(2*2^(1/2)*x))*(cos(2*x)-sin(2*x))*exp((2*I)*2^(1/2)*x)*(exp((2*I)*2^(1/2)*x))^(-((1/2)*I)*2^(1/2))/((exp((4*I)*2^(1/2)*x)-1)*c[2]+I*c[3]*exp((4*I)*2^(1/2)*x)+I*c[3])

Error, (in SolveTools:-Polynomial) too many levels of recursion

 

Download odetest_error_june_15_2023.mw

Why using the alias line above causes this error?  If you remove the alias line, you will see it completes with no error.

But it hangs in 2023. I am no longer using 2023 but went back to 2022 due to too many hangs in 2023. I wonder now if it because of this alias line I had there all the time.  I will remove now and see if this solves some of the hangs I had in 2023.

Anyone can shed some more light on what is going on?

Windows 10.

I want to plot phase portrait for 4 dimension. help me

4_equation_phase_portrait.mw

thank youvery much

 I run the attached code, but after waiting for a few minutes, there is no response, does anyone know the reason?

 It only shows Evaluating!!!!

 sy01.mw

120523_problem_parallel.mw

Last execution block is not producing any output. Why?

The 3x3 nonlinear system I am trying to solve is already a stylized version of my problem, as I already:

  1. Calibrated my equations before attempting to solve for them (search for "Calib_1" in my script)
  2. Split the original 6x6 system into two 3x3 sub-systems (since 3 out of 6 variables only appear in 3 out of 6 equations) and solved for one sub-system

What else can you think of? Should I instead use the parallel solver on the whole 6x6 system rather than just the unsolved 3x3 sub-system?

How to find, if exist, singular solutions? That is, some valuation of some parameters that will yield a solution that cannot be obtained by applying the same valuation to a general solution. Carl Love (who I cannot tag) once mentioned: "The parameter valuations that lead to singular solutions can often be guessed by using valuations that would produce zeros in denominators in the general solution. A singular solution can't be expressed as any instantiation of a generic symbolic solution. By instantiation I mean an assigment of numeric values to some parameters. Here's an example:"

#2x2 matrix and 2x1 vector. 5 parameters (a, b, d, x, y). The 2 decision variables are
#unseen and unnamed in this pure matrix-vector form. Their values are the two entries 
#in the solution vectors S0 and S1.

A:= <a, b; 0, d>;  B:= <x, y>;

#Get a generic solution:
S0:= LinearAlgebra:-LinearSolve(A, B);

#Instantiate 3 parameters (a, d, y) to 0 and solve again:
S1:= LinearAlgebra:-LinearSolve(eval([A, B], [a, d, y]=~ 0)[]);

#Note that no possible instantiation of S0 can produce S1.

Thank you!

I have this tedious looking function that I want to write in terms of the other expression but the command i usually use does not work here because the expressions are not polynomials. I am wondering if there is an alternative to doing this manually.
Temp.mw

Hi everyone
how can i overcome this error to solve this ODE ? tnx in advanced.

restart

U := 1:L := 10:k := 1:Dea := 0.00001:CA0 := 10:Pe := U*L/Dea:Da := k*CA0^2/Dea:

Eq1 := diff(CA(x), x, x) - Pe*diff(CA(x), x)/L = Da*L*CA(x)^2/CA0;

diff(diff(CA(x), x), x)-100000.0000*(diff(CA(x), x)) = 10000000.00*CA(x)^2

(1)

BCs := CA(0) = CA0, D(CA)(L) = 0

CA(0) = 10, (D(CA))(10) = 0

(2)

ans := dsolve([Eq1, BCs], numeric);

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

 

Download Hw.mw

Please check: Finding_Chi_Version1.mw

My end goal is to find the following three expressions:

chi_1 := collect(X_A,[nnu[1],nnu[2]]);

chi_2 := collect(X_B,[nnu[1],nnu[2]]);

chi_3 := collect(X_C,[nnu[1],nnu[2]]);

I expect these three expressions to be linear combinations of random variables nu[1] (nnu[1]) and nu[2] (nnu[2]).

While calling solve(), I encounter this error:

Error, (in assuming) when calling 'SolveTools:-Engine:-Dispatch'. Received: 'badly formed input to solve: not fully algebraic'

What is exactly the issue here? If it can help you answer my doubt, that argmin expression I defined is composed by conditional means and variances which I computed as in here: conditional_distributions_Version1.mw

The two formulas I am trying to implement in Maple are conditional distribution of a multivariate normal distributionAm I already doing any mistake in conditional_distributions_Version1.mw? An alternative interpretation of mine for these two formulas is: conditional_distributions_Version2.mw. Please check the light-blue-highlighted differences in the conditional variance calculation. This alternative interpretation leads to Finding_Chi_Version2.mw, which I also can't solve() (solver stuck in "evaluating") but at least I don't get the error mentioned above...

I am a bit lost to be honest: Is Finding_Chi_Version1 or Finding_Chi_Version2 the correct interpretation? 

Thanks!

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