Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Currently, a stand-alone or embeddable Python is by default bundled with Maple and is installed silently (namely, without notification) when installing Maple, but why is there no prompt panel asking for Python configuration (just like Why does Maple ask for a Matlab installation when I install it? and Configuring the Maple Kernel for Jupyter)? 
Actually, I am wondering why I am not capable of installing Maple without bundling Python (even if I am able to clear those files in $MAPLE/Python.$SYS later). In my opinion, a bundling Python suite is more or less unnecessary; wouldn't it be better to provide a tooltip asking for approval? If one really need to interact with Python, one may instruct Maple to make use of some available local version of Python from the outset (rather than having to install an additional Python interpreter with numerous extra packages that occupy almost 2 GB!), and if one does not require such a functionality, one can simply skip the Python installation and free up 2GB immediately. So, will installing Python (or another popular external program, if it is going to be integrated or connected with Maple in future releases) be optional during the Maple installation process? 

Ubuntu 22.04.

I have Maple-202[1-3] and an old installation of maplev-mode. maplev-mode fails to work.

In the emacs messages buffer, I see (typed from memory):

loading maple
maple loaded
maple not running

I removed all of maplev from my system.
I tried installing from the downloaded master.zip (RELEASE-=NOTES says 3.0.5).
make install fails:

> pwd
/tmp/maplev-master
> make install
Makefile:27: MapleLisp.mk: No such file or directory
make: *** No rule to make target 'MapleLisp.mk'.  Stop.

I tried installing from the cloud, but, failed. The error message (even run as root)

Error, (in PackageTools:-Install) permission denied

Will maplev-mode work?

Tom Dean

Good day to all of you friends, just asking for your kind help.

I have been trying to get solution of the next integral but didn't have succes. The goal of the code is to perfom a variable change.

Best regards

restart

r := simplify(rhs(isolate(r+(2*M*`r__\`+\``+a*m/sigma)*log[10](r/`r__\`+\``-1)/(`r__\`+\``-`r__-`)-(2*M*`r__-`+a*m/sigma)*log[10](r/`r__-`-1)/(`r__\`+\``-`r__-`) = `r__∗`, r)))

Delta := -2*M*r+a^2+r^2

omega := sqrt(r^2+a^2+a*m/sigma)NULL

F := simplify(Delta*lambda*m__p/(2*m__p^2*omega^2*r^2*sigma+2*lambda^2*omega^2*sigma))

`r__∝` := int(F, `r__∗`)

NULL

Download maple_primes_question.mw

Dear Users!

I hope everyone is fine here. In the attached file I have solved a partial differential equation using the finite difference method for different mesh in spatial directions (i.e., for different Mx). I want to compute the time and memory to compute the solution against each Mx and want to plot it. Kindly help me how to compute the time and memory for each value of Mx.

TIME.mw

I shall be waiting. Thanks in advance. 

I want a maple code to solve the caputo fabrizio differential equations using Runge Kutta method with implicit functions and impulsive conditions in maple. Is there any code structure for that. 

restart;
with(Student[NumericalAnalysis]);
with(plots);
with(DEtools);
f := proc(u, r) local res; res := 1/25*r^2 + (sin(u(r)) + sin(diff(u(r), [r $ 1/5])))/(r^2 + 47); return res; end proc;


RK4 := proc(f, u0, r0, h, n) local u, r, i, k1, k2, k3, k4; u := Vector(n + 1); r := Vector(n + 1); u[1] := u0; r[1] := r0; for i to n do k1 := f(u[i], t[i]); k2 := f(u[i] + 1/2*h*k1, r[i] + 1/2*h); k3 := f(u[i] + 1/2*h*k2, r[i] + 1/2*h); k4 := f(u[i] + h*k3, r[i] + h); u[i + 1] := u[i] + 1/6*h*(k1 + 2*k2 + 2*k3 + k4); r[i + 1] := r[i] + h; end do; return [u, r]; end proc;
RK4 := proc (f, u0, r0, h, n) local u, r, i, k1, k2, k3, k4; u 

   := Vector(n+1); r := Vector(n+1); u[1] := u0; r[1] := r0; 

   for i to n do k1 := f(u[i], t[i]); k2 := f(u[i]+(1/2)*h*k1, 

   r[i]+(1/2)*h); k3 := f(u[i]+(1/2)*h*k2, r[i]+(1/2)*h); k4 := 

   f(u[i]+h*k3, r[i]+h); u[i+1] := u[i]+(1/6)*h*(k1+2*k2+2*k3+k4\

  ); r[i+1] := r[i]+h end do; return [u, r] end proc


u0 := cos(abs(0.9))/15;
                      u0 := 0.04144066455

r0 := 0;
                            r0 := 0

h := 0.1;
                            h := 0.1

n := 100;
                            n := 100

solution := RK4(f, u0, r0, h, n)

u := solution[1];
r := solution[2];
plot(u, r, style = line, color = blue, labels = ["Time (r)", "Solution (u)"]);
 is this correct to solve the implicit fractional differential equations using 4th order Runge-Kutta Method. will fsolve command  solve the fractional differential equations ?

Hello
i am using maple 2023 and the physics package and have the following question:
I want to define a gauge-  plus coordinate covariant derivative i.e.
assuming i,j,k are SO(3) indices and greek indices describe 4-dim space-time (not necessary flat)
i need the following derivative:

D_sigma F_i _rho _lambda = nabla_sigma F_i _rho _lambda + epsilon_i ^j ^k  A_j_sigma  F_k~rho~lambda
with _ meaning lower indices and ^ upper indices and nabla the convenient coordinate covariant derivative of general relativity.
F is a tensor objekt with 2 space time indices and 1 so(3) indices (e.g. Yang Mills field strength) and A is the so(3)gauge potential
How can i define this Differentialoperator with the physics package.
I.e. i want to work with SO(3) Yang-Mills Fields in curved space time and need this generalized Differentialoperator
thanks for helping. I hope its clear from this ascii text in the screen
regards Michael

How should optional input parameters be handled for procedures. The example has three optional inputs 

vars:=[x,y]   ,  clr:="b"   and prnt:="y"  . if one wants to change prnt to"n", vars and clr values must be entered.

{vars:=[x,y]  } , { clr:="b" }  and{ prnt:="y"}  this is a good method because one just enteres prnt="n".  But have to remember the input parameter name prnt.

I have a 3rd option, but it is to complicated and probably unreliable to use in practice.  and with more than 3 optional inputs too difficult to code.

I am wondering  are the other approaches and what is the prefered methodology. I have about 30+ procedures to apply this to in a package.

Edit:-  I can change the prnt to boolean true, false instead of "y" , "n".  That would make the all the optional inputs different types.

In Test1 its should be vars::list:=[x,y] not vars::{list , `string`}:=[x,y]

restart

Geomclr := "b"

"b"

(1)

NULL

NULL

NULL

Test1 := proc (A, B, vars::{list, string} := [x, y], clr::string := Geomclr, prnt::string := "y") if vars::string then clr := vars; vars := [x, y] end if; if clr = "y" or clr = "n" then prnt := clr; clr := Geomclr end if; print(clr); if prnt = "y" then print("good") end if; A*vars[1]+B*vars[2] end proc

NULL

Test1(A, B)

A*x+B*y

(2)

Test1(A, B, [r, s], "n")

Error, (in Test1) invalid left hand side in assignment

 

Test1(A, B, "g")

Error, (in Test1) invalid left hand side in assignment

 

Test1(A, B, "n")

Error, (in Test1) invalid left hand side in assignment

 

Test1(A, B, [x, y], "b", "n")

A*x+B*y

(3)

 

 

NULL

``

NULL

 

NULL

Test2 := proc (A, B, { vars::{list} := [x, y], clr::string := Geomclr, prnt::string := "y" }) print(clr); if prnt = "y" then print("good") end if; A*vars[1]+A*vars[2] end proc

NULL

NULL

Test2(A, B)

A*x+A*y

(4)

Test2(A, B, clr = "r")

A*x+A*y

(5)

Test2(A, B, prnt = "n")

A*x+A*y

(6)

Test2(A, B, prnt = "n")

A*x+A*y

(7)

Test2(A, B, prnt = "n", clr = "green", l = [r, s])

A*x+A*y

(8)

``

 

# 3 This is possible but is a very complicated method of handling the optional inputs and difficult the handle altered sequence on inputs.

NULL

Test3 := proc (A, B, vars::{list, string} := [x, y], clr::string := Geomclr, prnt::string := "y") local varsl, clrl, prntl; global Geomclr; varsl := vars; clrl := clr; prntl := prnt; if vars::string then varsl := [x, y]; if vars = "y" or vars = "n" then prntl := vars; clrl := Geomclr elif vars = "r" or vars = "g" or vars = "b" then clrl := vars end if elif vars::list and clr = "y" or clr = "n" then prntl := clr; clrl := Geomclr end if; if clr = "y" or clr = "n" and vars::string then prntl := clr; clrl := vars end if; print("Colour print out ", clrl); if prntl = "y" then print("This is a test Message") end if; A*varsl[1]+B*varsl[2] end proc

NULL

Test3(A, B)

A*x+B*y

(9)

Test3(A, B, [r, s])

A*r+B*s

(10)

Test3(A, B, [r, s], "n")

A*r+B*s

(11)

Test3(A, B, "n")

A*x+B*y

(12)

Test3(A, B, [r, s], "r", "n")

A*r+B*s

(13)

Test3(A, B, "r", "n")

A*x+B*y

(14)

Test3(A, B, "n", "r")

A*x+B*y

(15)

NULL


 

Download Q_2024-02-25_Test_proc_Args.mw

ow to get plot for the exact solution of a piecewise function and i need the correct plot which has curve started at y-axis (0.5) and goes till 2?

Hello,
I am a beginner on Maple and I am working on approximate solutions of partial differential equations.
After finding the approximate solution I wanted to compare both the plots (The exact solution and the approximate one), is here any tool or command that allows me to do so ?

Thanks in Advance !

Can I link my MapleCloud application to the Application Center?

Several years ago I uploaded an installable workbook application for Clifford Algebra to the public maplecloud following the guidelines and formats set down in maple help. My intention was to make the application available in the application center, but I just noticed that a package uploaded to MapleCloud is not  available for searching in the Application Center. Unfortunately,the Maple Cloud site for public packages is a mess. One cannot readily browse the applications there like in the application center.

The submissions page for the application center is not helpful in this case. It seems to assume submissions will take the form of maple documents/ worksheets rather than applications written in a workbook). I could not navigate to the Maple Cloud to drop a link to my package using the submission form, but it should be possible to link the the package already installed on the MapleCloud to the Cloud? (Because I is easier to update the MapleCloud package and it can be installed by opening from the Cloud).

Applying Maple 2023's dsolve to the ODE shown below yields the solution y(t)=0 which is obviously incorrect.  Maple 2021 and earlier used to give a nonzero (albeit not very useful) answer.

restart;

F := (t-1)*(t-2)/(t^2+1)^3*(Heaviside(t-2)-Heaviside(t-1));

(t-1)*(t-2)*(Heaviside(t-2)-Heaviside(t-1))/(t^2+1)^3

plot(F, t=0..4);

de := diff(y(t),t,t) + diff(y(t),t) = F;

diff(diff(y(t), t), t)+diff(y(t), t) = (t-1)*(t-2)*(Heaviside(t-2)-Heaviside(t-1))/(t^2+1)^3

ic := y(0)=0, D(y)(0)=0;

y(0) = 0, (D(y))(0) = 0

Huh?

dsolve({de,ic}, y(t));

y(t) = 0

Specifying method=laplace will make that work, but how is an

unsuspecting user to know that what's obtained above is incorrect?

Download dsolve-bug.mw

I have a problem. Maple wants to create and a palette, I can add content and icons to the palette, but as soon as I restart Maple, the palette content has disappeared and says that Maple cannot find the added icons.

I have used the method described in Maple Help.

Is there anyone who can help?

Kind regards

Dear sir ,

I have implemented Dsolve method the code was executed, but i need to apply Kellor Box method to solve the ODES 

Please can any one help how to implement? 

because there is no post regarding the Kellor box method. 

restart; with(plots)

``

S := 1; Rd := .1; delta := .1; Hs := 1; Sc := .1; Pr := 6.8; n := 1; Rc := .1; E := .1; M := 1

NULL

 

OdeSys := a1*(diff(f(eta), eta, eta, eta, eta))/a2-S*(3*(diff(f(eta), eta, eta))+eta*(diff(f(eta), eta, eta, eta))+(diff(f(eta), eta))*(diff(f(eta), eta, eta))-f(eta)*(diff(f(eta), eta, eta, eta)))-a5*M*(diff(f(eta), eta, eta))/a2-a1*Kp*(diff(f(eta), eta, eta))/a2 = 0, (a4+4*Rd)*(diff(Theta(eta), eta, eta))+12*Rd*delta*((diff(Theta(eta), eta))*(diff(Theta(eta), eta))+Theta(eta)*(diff(Theta(eta), eta, eta)))+Hs*Theta(eta)-a3*Pr*S*(diff(Theta(eta), eta))*(eta-f(eta)) = 0, diff(Phi(eta), eta, eta)-S*Sc*(diff(Phi(eta), eta))*(eta-f(eta))-Sc*Rc*(1+delta*Theta(eta))^n*Phi(eta)*exp(-E/(1+delta*Theta(eta))) = 0; Cond := f(0) = 0, ((D@@2)(f))(0) = 0, (D(Theta))(0) = 0, (D(Phi))(0) = 0, f(1) = 1, (D(f))(1) = 0, Theta(1) = 1, Phi(1) = 1

   

KpVals := [1, 2, 3, 4]

for j to numelems(KpVals) do Ans[j] := dsolve(eval([OdeSys, Cond], Kp = KpVals[j]), numeric, output = listprocedure) end do

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(f(eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'f(eta)'],labelfont=[TIMES,BOLD,16]
  );
 

with(plots):
  cols := [red, blue, black,green]:

plotB:= display( [ seq( odeplot
        ( Ans[k],[eta,Theta(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

 

with(plots):
  cols := [red, blue, black,green]:

plotC:= display( [ seq( odeplot
        ( Ans[k],[eta,Phi(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(diff(f(eta),eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,"f '(eta)"],labelfont=[TIMES,BOLD,16]
  );

 

 

 

Download kellor_box_method.mw

Is there an equivalent to Pivot Table in Excel?
I'm working on some investing data, and am using Maple to gather information from various sources and using DataFrame to combine all the data. I could export the dataframe and open in Excel or other spreadsheet and use the Pivot table to summarize the data, but is there an easy way to do all of it in Maple?

Thanks

First 11 12 13 14 15 16 17 Last Page 13 of 2143