Maple 2019 Questions and Posts

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

Refers to yMaple 2019.1

The command alias(X(s)=laplace(x(t),s,t)) will not be executed in the  code following it. It seems that the 'funny font' L used instead of the word 'laplace' ist not recognized. Maple 2018.2.1 works fine, since it doesn't use the 'L" but works with 'laplace'. Is there a fix ?

The ideas here are to allow 3D plotting commands such as plot3d to handle a `size` option similarly to how 2D plotting commands do so, and for the plots:-display command to also handle it for 3D plots.

The size denotes the dimensions of the inlined plotting window, and not the relative lengths of the three axes.

I'd be interested in any new problems introduced with this, eg. export, etc.


# Using ToInert/FromInert
# This might go in an initialzation file.
  if __ver>=18.0 and __ver<=2019.2 then
    if :-has(:-op([5,2,2,2,1],__KK),:-_Inert_PARAM(__NN)) then
      :-print("3D size patch done");
      :-print("3D size patch not appropriate; possibly already done");
    end if;
    :-print(sprintf("3D size patch not appropriate for version %a"),__ver);
  end if;
  :-print("3D size patch failed");
end try:

"3D size patch done"


P := plot3d(sin(x)*y^2, x=-Pi..Pi, y=-1..1, size=[150,150],
            font=[Times,5], labels=["","",""]):

plots:-display(P, size=[300,300], font=[Times,10]);

# inherited from the contourplot3d (the plot3d is unset).
  plots:-contourplot3d(sin(x)*y^2, x=-Pi..Pi, y=-1..1,
                       thickness=3, contours=20, size=[800,800]),
  plot3d(sin(x)*y^2, x=-Pi..Pi, y=-1..1, color="Gray",
         transparency=0.1, style=surface)

# Some options should still act as 2D-plot-specific.
try plot3d(sin(x)*y^2, x=-Pi..Pi, y=-1..1, legend="Q");
    print("Not OK");
if StringTools:-FormatMessage(lastexception[2..-1])
   ="the legend option is not available for 3-D plots"
then print("OK"); else print("Not OK"); error; end if; end try;




If this works fine then it might be a candidate for inclusion in an initialization file, so that it's
automatically available.

I want to solve the following ode: 

ode := diff(x(t), t) = k*(a - x(t))*(b - 2*x(t))^2

k, a and b are positive real numbers and I want to add the condition that a-x(t) >= 0 and b-2x(t) >=0, in addition to x(0)=0

how to I do that?


I have been making a 3d graph of the level sets of a function. Here is the code for the 3d graph:

display(seq(seq(plot3d([i/sin(u), u, j], u = 0 .. 3/2, t = 0 .. 10, view = [0 .. 10, 0 .. Pi/2, 0 .. 10], color = i*j), i = 1 .. 10), j = 1 .. 10))

Each curve is a different level set- and I'd liketo colour them all individually -so people can tell tham appart. Any variation of the code I've made makes each of the curves black.


Is it possible to create the operator command : |x| so that it passes x to the VectorCalculus Norm function so that if I write:

>  | < 3, 0, 4> |

the result is 5?

I have a Maple program and i need to call a python script with a specified input (10 integers). The script returns a number that I would like to use in my Maple program afterwards. This is what I would do in shell:


result=`python 1 2 3 4 5 6 7 8 9 10`
echo $result


Is there a way to get the `result` using Maple? I checked the documentation for Maple and it is not very clear so I appreciate any help on this. Thanks!


From a previous calculation, I got the following nested sum:

Sum(Sum(f[n]*g[q-n]*exp(2*i*Pi*q*x),q = -infinity .. infinity),n = -infinity ..


However, to keep on the calculus, It is more convenient to have:

Sum(Sum(f[n]*g[q - n]*exp(2*i*Pi*q*x), n = -infinity .. infinity), q = -infinity .. infinity)


That is, permute the summation precedence.

Is there a way to automatically transform the first expression into the second one?

Hi everyone,

When my cursor is on an output, the paragraph style changes to 2D Output, as it most likely should. When I then go to a new executable line, it takes forever for all of my expressions to "light up" (meaning that it takes a while for me to be able to use them), and it takes forever for the paragraph to go from 2D Output to 2D Math.

I sadly don't remember when this happened, or what might have caused it, but if any of have any suggestions or answers, I'd greatly appreciate it.


Thanks for listening,

A confused highschool student.


I discovered that the option legend, when used in plots:-inequal, returns an empty graphic.
Is it a bug or a deliberate choice?

Anyways, is it possible to insert a legend in a simple way (that is without using textplot for instance)?


Application of MapleSim in Science and Engineering: a simulationbased approach

In this research work I show the methods of embedded components together with modeling and simulation carried out with Maple and MapleSim for the main areas of science and engineering (mathematics, physics, civil, mechanical etc); These two latest scientific softwares belonging to the company Maplesoft. Designed to be generated and used by teachers of education, as well as by university teachers and engineers; the results are highly optimal since the times saved in calculations are invested in analyzes and interpretations; among other benefits; in this way we can use our applications in the cloud since web technology supports Maple code with procedural and component syntax.


Lenin AC

Ambassador of Maple

I'm fairly new to using Maple and am having a bit of a hard time calculating the following inner product. Firstly, I define the tensors (which to this end I'm not certain they are correctly defined), 




ds2 := - dt^2 + a(t)^2 /( 1-k*r^2)*dr^2 + a(t)^2*r^2*dtheta^2 + a(t)^2*r^2*sin(theta)^2*dphi^2;
Setup(coordinates = spherical, metric = ds2);

e[mu, `~nu`] = Matrix(4, {(1,1)= a(t)/sqrt(1-k*r^2), (2,2)=a(t)*r, (3,3)=a(t)*r*sin(theta), (4,4)=1}, fill=0); (15) 
f[`~mu`, nu] = Matrix(4, {(1,1)=sqrt(1-k*r^2)/(a(t)), (2,2)= 1/(a(t)*r), (3,3)=1/(a(t)*r*sin(theta)), (4,4)=1}, fill=0); (28)

Thus, I defined two mixed tensors e[mu, `~nu`] (one covariant and one contravariant index ) and f[`~mu`, nu] (one contravariant and one covariant index).

Then, I try to take the following inner product between the two mixed tensors and the Christoffel symbols of the second kind, namely,

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel [`~nu`, sigma, mu];

where I used the Physics['.'] command . However, when I try taking this inner product, it returns unevaluated.


Did I define the mixed tensors incorrectly? Does it matter how you define the indices when you're gonna take the inner product? Because taking the inner product of simply e[mu, `~nu`].f[`~mu`, nu] also returns unevaluated. Also, I should mention that  e[mu, `~nu`] and f[`~mu`, nu] are inverses of each other, is there any way to define one and get the other, since, simply changing the way in which the indices are raised and lowered doesn't take the reciprocal of the components. 

Do you agree this solution given by Maple is not correct?

pde := diff(u(x,t),t)+diff(u(x,t),x)=0;
bc  := D[1](u)(0,t)=0;
ic  := u(x,0)=exp(-x^2);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming x>0,t>0;

Result of pdetest should be zero.

I think the PDE itself is not well posed (I copied it from different forum to see what Maple does with it). But still the solution clearly does not satisfy the PDE itself for x not zero. 

Maple 2019.2.1 with Physics version 573

I am not sure why I cannot do: plot3d([f(x,y,'g(x, y)')], x=0..1,y=0..1).

And the use of single quote in Maple 2019 and 2017 are giving different results. that is, the plot (note, not plot3d) results in the attched script by Maple 2017 and 2019 are different...


Comment écrire les composantes d'un vecteur contravariant avec des indices numériques ? Ce vecteur n'est pas un spacetimevector.

Par exemple : <x^1, x^2,x^3> avec cette écriture maple interprète ces indices comme des nombres et non comme des symboles

Merci pour vore retour

I do a calculation o a simple integral


      int(cosh(cos(2*t)), t = 0 .. 2*Pi)


and get the answer 0 (zero), which I know is incorrect. The cosh function of a real argument is always positive.


If I represent the cosh function as a sum of two exponentials

(1/2)*(int(cosh(cos(2*t)), t = 0 .. 2*Pi) + int(cosh(-cos(2*t)), t = 0 .. 2*Pi))


I get    

2*Pi*BesselI(0, 1)

which looks much better.


What's the matter? Why Maple yields two different results? Victor.



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