Maple 2022 Questions and Posts

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

Hi all, any one help  me to find the values of constants by using given condition and then how to varify that the goiven condition varify the expression. I have found manually but want to varify through maple.

help.mw

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

 

Using the SingularValues command with any output type specified causes this error

Error, (in sanity) invalid input: LinearAlgebra:-SingularValues expects value for keyword parameter output to be of type {list(identical(U,S,Vt,list)), identical(U,S,Vt,list)}, but received [U, S, Vt]

Below is a minimal example to trigger the error. Is there something wrong about how I am calling the function?

restart:
with(LinearAlgebra):

sanity := proc()
  local A,U,S,Vt;
  A :=RandomMatrix(3,10);
  U,S,Vt := SingularValues(A, output=['U','S','Vt']);
end proc:

sanity();

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

 

 

Why is Maple not calculating 'sqrt' and continuously showing 'Evaluating'?


 

restart

with(LinearAlgebra); with(PDEtools); with(DifferentialGeometry)

with(plots)

with(Physics)

q := (31.00000000*exp(-4.976*t+2.*x)*exp((-2.488+.8336000001*I)*t+(1.+.2*I)*x)-3.000000000*exp(-4.976*t+2.*x)*exp((2.488+.8336000001*I)*t+(-1.+.2*I)*x)+(94.0*I)*exp(I*(.8336*t+.2000*x))*exp(-4.976*t+2.*x))/((11.50000000*I)*exp(-2.488*t+x)+132.44*exp(-4.976*t+2.*x)-(104.5000000*I)*exp(-7.464*t+3.*x)-5.25*exp(-9.952*t+4.*x)+.25)

(31.00000000*exp(-4.976*t+2.*x)*exp((-2.488+.8336000001*I)*t+(1.+.2*I)*x)-3.000000000*exp(-4.976*t+2.*x)*exp((2.488+.8336000001*I)*t+(-1.+.2*I)*x)+(94.0*I)*exp(I*(.8336*t+.2000*x))*exp(-4.976*t+2.*x))/((11.50000000*I)*exp(-2.488*t+x)+132.44*exp(-4.976*t+2.*x)-(104.5000000*I)*exp(-7.464*t+3.*x)-5.25*exp(-9.952*t+4.*x)+.25)

(1)

assume(x::real); assume(t::real)

q1 := simplify(subs({I = -I}, q))

(-(94.*I)*exp(-I*(.8336*t+.2000*x))+31.*exp((-2.488-.8336000001*I)*t+(1.-.2*I)*x)-3.*exp((2.488-.8336000001*I)*t+(-1.-.2*I)*x))*exp(-4.976*t+2.*x)/(-(11.50000000*I)*exp(-2.488*t+x)+132.44*exp(-4.976*t+2.*x)+(104.5000000*I)*exp(-7.464*t+3.*x)-5.25*exp(-9.952*t+4.*x)+.25)

(2)

q2 := simplify(sqrt(q*q1))

NULL

NULL


 

Download q_sqrt.mw

Hi.

When trying to open my document it says:
''There were problems during the loading process, Your worksheet may become incomplete.''

Would you mind helping me?
I saw some scripts on how to fix it, but simply can't solve it myself.

Regards Samuel

Basismat_2_noter.mw

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

Hi, I am completely new to Maple and I keep getting this message:

Error, invalid input: rhs received 19715.18184, which is not valid for its 1st argument, expr

my code is:

sqq:=Vector(n):
for i from 1 by 1 to n do


pom:=eval(sigma[qq],[K=0.5,Fred=0,Phi[a]=0.8,Phi[p]=0.2,camax=300000,Kmin=0.5,co=11230,c11=6120,c12=12710,c21=14.17,c22=6.61,c13=9270,c23=16.16,c14=9270,c24=16.16,g=0.745430443,R=0.00652,H=0.00081,l=2,P=Pload[i],lambda[Q]=lQres1[i], lambda[Z]=lZres1[i]]):

sqq[i]:=rhs(pom):

end do:

I am trying to get a vector sqq solving the equation sigma[qq] using the constants and vectors written there. Can anybody help me please?

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

 

 

Hi,

I am working on an optimization problem, where i want to Maximize numerically a function (it is too complex to have a deriviatve) here a pseudo code:

Maximize(f(x,y,z), initialpoint = {x=1,y=1,z=1},iterationlimit = 9999);

Now i have a constraint on (x,y,z) where I want the maximum of another function be smaller than a threshold. Problem is, that the constraints function does not put it the corresponding x,y,z tupel and therefore the maximization regarding f does not come to a solution.

Maximize(f(x,y,z), {Maximize(g(x,y,z,f),{0<f<1})[1]<Thres},initialpoint = {x=1,y=1,z=1},iterationlimit = 9999);

Maybe you guys have an idea how to solve this.

Best

 

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

 

 

I am creating a Maple document mode worksheet in which I use the Units package. I was doing a calculation and I noticed a discrepancy when I repeated the calculation slightly more manually (but still expecting the same result). 

Here is a link to the worksheet: Units.mw

(Unfortunately, it is hit or miss for me when I try to use the option to show the contents of the worksheet here directly)

Here is a screenshot of the issue

All I am doing in the second calculation is doing some of the unit conversions myself. 

I came across this while solving a chemistry problem, and I know the answer in the book agrees with the second calculation. 

So the question is why doesn't the first calculation, which uses more of Maple's library to do the calculation, agree with the second calculation?

Hi,

So I've just installed the 2022 version of Maple and I wanted to make a new document.

But when I'm trying to make a variable with a subscript that includes a comma, I get wrong output.

For example; I want to make the variable Ab,c as 2D input and then it shows 'Ab,c' as output.

Why are those apostrophs showing up?

Thanks for the help

I’m on a Mac running Ventura 13.4.1 and Maple 2022. 

My plots now have axes and labels that are tiny. It seems like that possibly happened with one of the recent OS updates
Below is a graph of
with(plots): implicitplot3d(3x+2y+4z=2);

It renders the same if I use 
implicitplot3d(3x+2y+4z=2, axesfont=["TimesNewRoman", 12], labelfont = ["TimesNewRoman", 12]);

I can to change the 12 to much larger to see them. But I never used to have to do that before. Does anyone know if this is an OS issue? Is there a global setting I can change? 

 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.

First 9 10 11 12 13 14 15 Last Page 11 of 40