MaplePrimes Questions

Hi everyone!

Is it possible to evaluate int(diff(u(x,y,t),x)*v(x,y,t)+diff(v(x,y,t),x)*u(x,y,t),x) directly as u(x,y,t)*v(x,y,t) in Maple?

Thanks.

hi, do you know how to use discont in this plot? (is it even possible?)

restart;
with(plots);
animate(implicitplot, [y^2 = x^3/(2*a - x), x = -5 .. 5, y = -5 .. 5], a = -5 .. 5);
 

  restart:
  ODES := (1+E)*(diff(f(eta), eta, eta, eta))+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2-E*delta*(diff(f(eta), eta, eta))^2*(diff(f(eta), eta, eta, eta))+M*(diff(f(eta), eta)-1)+Upsilon*(1-(diff(f(eta), eta))^2) = 0,
          diff(theta(eta), eta, eta)+(3/4)*R*(diff((1+(B-1)*theta(eta))^3*(diff(theta(eta), eta)), eta))+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))*(diff(theta(eta), eta))+Pr*Df*(diff(phi(eta), eta, eta))+Pr*Ec*(diff(f(eta), eta, eta))^2+Q*theta(eta) = 0,
           diff(phi(eta), eta, eta)+Sc*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb-Sc*kappa*phi(eta)+Sc*Sr*(diff(theta(eta), eta, eta)) = 0:
  bcs:= f(0) = 0,
        D(f)(0) = 1,
        D(f)(10) = 0,
       
        
        (D(theta))(0) = -.2*(1-theta(0)),
        theta(10) = 0,
        phi(0) = 1,
        phi(10) = 0:
  params:=[E=EV,Nb = 3.9, lambda = .01, Sc = 1, Nt = .5, delta = 0.9, Pr = 7., M = mv, R =5., B = 6., Df = 1., Ec  =5., kappa = 1., Sr = 3., Upsilon =- 3., Q = 3.]:
  EVals:=[-1, -3, -7]:
  Mvals:= [3, 5, 7]:
  ans:=Matrix( numelems(Mvals)*numelems(EVals)+1, 5):
  ans[1,..]:= < 'M' | 'E' | expr1 | expr2 |expr3>:
  for k from 1 by 1 to 3 do
      mv:= Mvals[k]:
      for j from 1 by 1 to 3 do
          EV:=EVals[j]:
          sol:=dsolve( eval([ODES, bcs], params), numeric, output=listprocedure);
          ans[3*(k-1)+j+1,..]:= `<|>`([ mv,
                                        EV,
                                        R__e^(-0.5)*sh= eval( -diff(phi(eta), eta),
                                                              [sol[], params[]]
                                                            )(0),
                                        R__e^(-0.5)*NU= eval( -diff(theta(eta), eta),
                                                              [sol[], params[]]
                                                            )(0),
                                        R__e^(0.5)*C__f=eval( (1+0.5)*(diff(f(eta), eta,eta)-1/3*diff(f(eta), eta)^3),[sol[], params[]])(0)]);od:od:ans;
Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging
               Matrix(%id = 18446744074195107958)
 for k from 1 by 1 to 3 do
      plot( [ seq( [ seq( [ans[j,1], rhs(ans[j,2+k]) ], j=i..10,3 ) ], i=2..4 ) ],
            color=[red, green, blue],
            labels=[typeset(M), typeset( lhs(ans[2,2+k]) )],
            labelfont=[times, bold, 20],
            legend=[typeset(E=0.01),typeset(E=0.1),typeset(E=0.2)],
            legendstyle=[font=[times, bold, 20]],
            title=typeset( ans[1,2+k], " versus ", M, " parameterized by ", E),
            titlefont=[times, bold, 24]
          )
 od;
Error, invalid input: rhs received 0, which is not valid for its 1st argument, expr


 

I trying to display factorials in a matrix as e.g 6!4!/5! not 144.
 

restart

with(InertForm)

[ConvertToString, Display, FromMathContainer, MakeInert, NoSimpl, Parse, SameStructure, ToMathContainer, ToMathML, Typeset, Value]

(1)

M := Matrix(4, 4); for m from 0 to 4 do for n from 0 to 4 do M(m+1, n+1) := factorial(NoSimpl(2*m+3*n))/(factorial(NoSimpl(m+2*n+1))*factorial(NoSimpl(m))*factorial(NoSimpl(n))) end do end do; M

Matrix(%id = 36893490820101234804)

(2)

NULL


 

Download How_to_display_factorial_unevaluated.mw

Dear Users!

For a given piecewise function S(x)

I want to generate the following functions phi[1], phi[2],... for n = 9

I shall be very thankful for your positive response. Please take care and thanks in advance.

I am not familiar with mathematica syntax. I have this code which is written .np and I would like to translate it efficiently to Maple syntax.I tried FromMmaNotebook but it is not helpful for me. I would be grateful if you would give me a little help me translate the code. I attached the code as diagon.txt (you can change .txt with .nb)

Thank you in advance!diagon.txt

 

Hi everyone

I wonder if the following elliptic PDEs system can be caculated by Maple 2018.

The PDEs system is

where

Maple sketched solutions of the above system, but unfortunately main portions (sine portion) of all the solutions seemed to overlap together.

Is it possible to output all the solutions filling the target region (or at least not overlapping) by revising the code?

I am not the sure if the overlap is caused by the boundary conditions(BC) or caused by the elliptic PDEs system??

Particularly, I do not understand how (D[2](x))(xi, 0) = 0 and (D[2](y))(xi, 0) = 0  work in the BCs. Is there any paper or textbook explaining this setup??

Thanks in advance.

The code is as follows (or the code can be downloaded from attatched mw QUESTION_20210423_001.mw):

restart;
with(plots);


alpha04 := (diff(x(xi, eta), eta))^2+(diff(y(xi, eta), eta))^2;

beta04 := (diff(x(xi, eta), xi))*(diff(x(xi, eta), eta))+(diff(y(xi, eta), xi))*(diff(y(xi, eta), eta));

gamma04 := (diff(x(xi, eta), xi))^2+(diff(y(xi, eta), xi))^2;

PDE04 := {alpha04*(diff(x(xi, eta), xi, xi))-2*beta04*(diff(x(xi, eta), xi, eta))+gamma04*(diff(x(xi, eta), eta, eta)) = 0, alpha04*(diff(y(xi, eta), xi, xi))-2*beta04*(diff(y(xi, eta), xi, eta))+gamma04*(diff(y(xi, eta), eta, eta)) = 0};


IBC04 := {x(0, eta) = eta, x(1, eta) = eta, x(xi, 0) = sin((2.0*Pi)*xi), y(0, eta) = eta, y(1, eta) = eta, y(xi, 0) = 100*xi, (D[2](x))(xi, 0) = 0, (D[2](y))(xi, 0) = 0};

pds04 := pdsolve(PDE04, IBC04, numeric, spacestep = 1/50);


xCurve04 := plots[display]([seq(pds04:-plot(x, eta = i), i = 0 .. 10)]);

yCurve04 := plots[display]([seq(pds04:-plot(y, eta = (1/10)*i), i = 0 .. 10)]);

 

How can maple be trusted app when window 10 device guard enabled?

hi I want to map these two phase portraits on sphere according.

Upper hemisphere:

Lower hemisphere:

I used code from this post

https://www.mapleprimes.com/posts/136598-Images-On-Surfaces

but I can't figure out how to delete this black half and add next part:

I found this idea in Elias Wegert's book Visual Complex Functions. Thanks in advance.

n := 3;
Digits := 10;
R_const := 8.314;
currentdir();
const := [1, 1, 1];
b := 20;
W := readdata("data20.txt", 2);
W := [seq([W[i, 2], W[i, 1]], i = 1 .. nops(W))];
Tempset := seq(W[i, 1], i = 1 .. nops(W));
Rateset := seq(W[i, 2], i = 1 .. nops(W));
Temp := [seq(W[i, 1], i = 1 .. nops(W))];
pdata := plots[pointplot](W, color = red);
pdata;

h[5] := 1;
h[4] := 8.5733287401;
h[3] := 18.059016973;
h[2] := 8.6347608925;
h[1] := 0.2677737343;
p[5] := 1;
p[4] := 9.5733223454;
p[3] := 25.6329561486;
p[2] := 21.0996530827;
p[1] := 3.9584969228;
r := x -> local m; exp(-x)*add(h[m]*x^(m - 1), m = 1 .. 5)/(x*add(p[m]*x^(m - 1), m = 1 .. 5));

q := (i, x) -> -Temp[1]*exp(-E_sim[i]/(R_const*Temp[1])) + E_sim[i]*r(E_sim[i]/(R_const*Temp[1]))/R_const + x*exp(-E_sim[i]/(R_const*x)) - E_sim[i]*r(E_sim[i]/(R_const*x))/R_const;

for i to n do
    R[i] := [seq(1 - exp(-A_sim[i]*const[i]*q(i, Temp[j])/b), j = 2 .. nops(Temp))];
end do;
for i to n do
    Der[i] := [seq(c_sim[i]*A_sim[i]*const[i]*exp(-E_sim[i]/(R_const*Temp[j]))*(1 - R[i][j]), j = 1 .. nops(Temp) - 1)];
end do;
Deriv := add(Der[i], i = 1 .. n);
model := [seq([Temp[i], Deriv[i]], i = 1 .. nops(R[1]))];
objective := add((W[i, 2] - model[i, 2])^2, i = 1 .. nops(Temp) - 1);
with(GlobalOptimization);
infolevel[GlobalOptimization] := 3;
Results := GlobalOptimization[GlobalSolve](objective, {add(c_sim[i], i = 1 .. 3) <= 1}, c_sim[1] = 0.05 .. 0.06, c_sim[2] = 0.85 .. 0.88, c_sim[3] = 0.05 .. 0.6, E_sim[1] = 33880 .. 33890, E_sim[2] = 40220 .. 41230, E_sim[3] = 23230 .. 23235, A_sim[1] = 2453 .. 2455, A_sim[2] = 190 .. 192, A_sim[3] = 1830 .. 1832, timelimit = 7200);
          [GetLastSolution, GlobalSolve, Interactive]

Results := [Float(undefined), [A_sim[1] = 2454.85789978944, 

  A_sim[2] = 190.143107633747, A_sim[3] = 1831.19959951461, 

  E_sim[1] = 33883.8826959700, E_sim[2] = 40796.6139830241, 

  E_sim[3] = 23230.4022199775, c_sim[1] = 0.0558944062681716, 

  c_sim[2] = 0.851532317382881, c_sim[3] = 0.0845465106500359]]


DEV_perc := 100*sqrt(Results[1]/(nops(Temp) - 3*n))/max(Rateset);
       DEV_perc := Float(undefined) + Float(undefined) 

Unsolved for Maple?

Thanks for reading.

I am just evaluating Maple 2021 under Windows 10 and I have something strange happening when I press F1 for Help or I select Maple Help in Help Menu. The first time the help window will appear but if I close it then impossible to view it again by pressing F1 or by selecting it in the Help menu. Also the same for other choices in the help menu like

Maple Help F1
Maple Portal
Study Guides
What's New

But any choices inside On the web will always work.

I am using Windows 10 latest release in french and the keyboard layout in ENG I don't think it is related but just in case someone ask me.

Have you notice the same problem ?

I have used the open source maxima quite a bit, and variable replacement was easy. For example:

3x+2y,x=20,y=5

3x+2y,x=3m-4p,y=(a+b)^2

I could combine very easily, like:

a=3x+2y             (%1)

4a-2b,%1

%1,x=5,y=7

and so on...I use variable replacement in equations VERY regularly, and so far, all I have found is having to use a mouse and select "Evaluate at a point". I'm not even sure I could put other equations in there if I wanted to. Even if it does work, the more complicated scenarios that I did routinely in maxima would still be virtually impossible this way.

Thus, the question is, is there doc somewhere on how to make various variable replacements, and equation combining like this easy?

When I use piecewise like this

W :=piecewise(beta>=-Pi/2 and beta<=-Pi/2+Pi/200,1+eps/sin(Pi/200)+eps*cos(Pi/200)/sin(Pi/200)*sin(beta),
     
beta>=-Pi/2+Pi/200 and beta<=Pi/2,1+eps/sin(Pi/200)-eps*cos(Pi/200)/sin(Pi/200)*sin(beta),
      1+eps*(1+cos(beta)));

 

and eval the beta as following,

G:= eval(R,beta=(arctan(diff(f(x,y),y), diff(f(x,y),x))));

the calculation does not run well...because of the undefined

[[-eps sin(t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))),t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))<-Pi/2],[undefined,t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))=-Pi/2],[(eps cos(Pi/200) cos(t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))))/(sin(Pi/200)),t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))<-(99 Pi)/200],[undefined,t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))=-(99 Pi)/200],[-(eps cos(Pi/200) cos(t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))))/(sin(Pi/200)),t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))<Pi/2],[undefined,t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))=Pi/2],[-eps sin(t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))),Pi/2<t_atan2((&PartialD;)/(&PartialD;y) pho(x,y),(&PartialD;)/(&PartialD;x) pho(x,y))]]

Finally, when W is brought into the following formula for calculation, 

R:=   
-M*ElementInt( test(x,y)*((1-co(x,y))*Ha+co(x,y)*Hb))
     +M*ElementInt( test(x,y)*noise)
+M*gamma*(-ElementInt( W^2*( nab(test(x,y))[i] &t nab(f(x,y))[i])))
              +ElementInt( diff(W^2,beta)/2 * ( diff(test(x,y),x)*diff(f(x,y),y)
              -diff(test(x,y),y)*diff(f(x,y),x))):

 

the following error message will appear.

Error: Division by zero at (1)

 

I mentioned a similar problem just recently, but after two days of continuous attempts, I couldn't find a solution.
Look forward to receiving a reply.......

I'm solving this equation:

eq3 := 2*lambda*(q[1]+p[1]*exp(t))*(q[2]+p[2])^2*p[1]*exp(t) = s[1]

eq4 := 2*lambda*(q[1]+p[1])^2*(q[2]+p[2]*exp(u))*p[2]*exp(u) = s[2]

solve({eq3, eq4}, {t, u})

This is what I get:

{t = ln(RootOf(-s[1]+(2*lambda*p[2]*q[1]+2*lambda*q[1]*q[2])*_Z+2*lambda*_Z^2)/((q[2]+p[2])*p[1])), u = ln(RootOf(-s[2]+(2*lambda*p[1]*q[2]+2*lambda*q[1]*q[2])*_Z+2*lambda*_Z^2)/((q[1]+p[1])*p[2]))}

I'm completely new at maple.

I can't find what _Z  and _Z^2 mean. Can anybody help? and how I can solve this _z and _Z^2

Thanks in advance

Hello, 

i would like to continue to work on a code which was done With CodeBuilder some years ago.

i often like to print my code to be able to read without any computer.

Problem : the print function on a worksheet with several coderegion doesn t work well.

1) Do you have some ideas to circumvet this issue ,

2) i m thinking about using a text éditor which can give a nice printing with maple. Emacs is far to much complex for me. Consequently, i havé seen that some of you have testéd Sublime text. I think that it may be a good alternative. Do you have ideas about simple text editor that i can use to edit maple code ?
 

thank you for your help 

First 294 295 296 297 298 299 300 Last Page 296 of 2308