Maple 2017 Questions and Posts

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

I am trying to put a number of related 2-d plots into a 3-d frame so I can see them stacked up in the third dimension (which follows a parameter) and rotate things around.

The way I once did this successfully was to create the 2-d plots and then use plottools:-transform to move the individual plots in the third dimension, like so:


tr:=plottools:-transform((x,y) -> [x,2,y]); # the "2" gets changed for the other plots (not shown here).


The only effect I can get is that the GUI gets confused and I have to close and reload the sheet to get it back again. I have a (complicated) sheet where this actually works, but I am not able to make it work even in the small example I am posting below.

Any hint of where I am going off trail is appreciated. Incidentally, this problem is what led to the corrupted sheet I had maybe a week ago.


Mac Dude.


I got bit by Maple when I tried to combine a number of 2-d plots into one 3-d plot, using plottools:-transform to space the plots out in the third dimentsion. I have done such things before. This time, the first time I executed the final plot statement the GUI got clobbered and somehow also the whole worksheet (I may have saved it). Now, when I load it nothing shows up and worse, I cannot enter anything in the worksheet, it is completely screwy. I looked at the XML code in Emacs and it validates and I cannot find anything obviously wrong with it, i.e. no dangling tags or similar.

I used Maple 2017. In Maple 2015 the same worksheet overprints itself & makes a big mess on the screen. It is similarly unuseable.

Can one of the experts have a look at this? Although rare I have experienced similar issues on occasion before & would like to know how to get this into a sane state.


Mac Dude

I am having problems when trying to sue de colorscheme opiton. I always get an error message. The example below is from the Maple homepage:

plot3d(sin(x)*cos(y), x = 0 .. 4*Pi, y = 0 .. 4*Pi, view = [default, default, -3 .. 3], colorscheme = ["xgradient", ["Green", "Purple", "Blue"]]);
Error, (in plot3d) unexpected option: colorscheme = ["xgradient", ["Green", "Purple", "Blue"]]

Any hint?

I'm using the differential operator D to differentiate variables and look at the structure of the equations, i.e. turn things like

D[1]u-vt+v^2=0 into


However, it is assumed that this is a commutative operator, i.e. D[1,2]=D[2,1]. Can I use an option to have it not commute, or should I look into using the DETools package?



I am implementing the Extended Euclides Algorithm in Maple for arbitrary domains.

This is my function so far:

    "Extended Euclidean Algorithm"
    "INPUT: an Euclidean Domain ED and two elements from said domain"
    "OUTPUT: r,s,t such that r = gcd(a,b) = s*a + t*b ";
    local r_0, r_1, r_aux, s_0, s_1, s_aux, t_0, t_1, t_aux, q;
    # Domain checks
    # TODO: check that ED is an euclidean domain
    if not ED[Type](a) then error "1st argument must be of type ED" end if;
    if not ED[Type](b) then error "2nd argument must be of type ED" end if;
    # Initialization
    r_0 := a; r_1 := b; # gcd series
    s_0 := 1; s_1 := 0; # 1st cofactor series
    t_0 := 0; t_1 := 1; # 2nd cofactor series

    # Loop
    while r_1 <> 0 do;
        print("All is fine before the Quo");
        print(r_0); print(r_1);
        q := ED[Quo](r_0, r_1);
        print("All is fine after the Quo");
        r_aux := r_0 - q * r_1;
        r_0 := r_1; r_1 := r_aux;
        s_aux := s_0 - q * s_1;
        s_0 := s_1; s_1 := s_aux;

        t_aux := t_0 - q * t_1;
        t_0 := t_1; t_1 := t_aux;

    # Result
    return r_0, s_0, t_0;
    end proc:

Where ED is a Domain object passed as a parameter to the function.

When I call the function with certain arguments, it goes once through the loop and then in the second iteration crashes between the second and third print statement.

Concretely, upon making the call:

with(Domains): GI := Gaussian(Z); a := GI[Input](-87+47*I): b := GI[Input](-90+43*I): r, s, t := EEA(GI, a, b); evalb(a*s+b*t = r)

I get the following output:


        "All is fine before the Quo"
                              -87 + 47 _i
                              -90 + 43 _i
                      "All is fine after the Quo"
                      "All is fine before the Quo"
                              -90 + 43 _i
                                3 + 4 _i
    Error, (in E[Domains:-Rem]) cannot determine if this expression is true or false: 0 <= -90*`domains/Gaussian/badge0`(-87, 47)-43*`domains/Gaussian/badge0`(1, 0)*`domains/Gaussian/badge0`(-90, 43)

From this we should infer that calling `Gaussian(Z)[Quo]` on arguments `-90 + 43 _i` and `3 + 4 _i` should produce this error, right?

Well, think again, because when I try reproducing that from the notebook it decides to stop crashing. Calling:

    with(Domains): GI:=Gaussians(Z): a := GI[Input](-90+43*I); b := GI[Input](3+4*I); GI[Quo](a, b);

Produces the output:

                            a := -90 + 43 _i
                b := 3 + 4 _i
               -4 + 20 _i

What is going on? Why does it crash inside the function but not in the workbook?

My goal is to generate incremental values of a function to plot using dataplot. Why does the first example generate numeric values in the Vector and the second example does not?

fenq := f -> 2.1^(f+1):
pf := Vector(5, fenq)
                             [  4.41   ]
                              [  9.261  ]
                         pf := [ 19.4481 ]
                              [40.84101 ]
fseqn := (Se, f) -> Se^(f+1):
psf := Vector(5, fsenq(2.1, j))

I can plot the first data set using dataplot(pf). I cannot plot the second data set.

The command print placed within a while loop does not produce any printout. How do I  make MAPLE to produce  it?

I am trying to animate two variables in a 3D plot. Basically I would like to combine these two animations into one simultaneous animation:

animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. 2*Pi, y = 0 .. R, coords = spherical, scaling = constrained], R = 0 .. 5)


animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. p, y = 0 .. 5, coords = spherical, scaling = constrained], p = 0 .. 2*Pi)

so that both animations start and end simultaneously. Is this possible?

Thanks in advance.


M := `<,>`(`<|>`(1, 2, 3), `<|>`(4, 5, 6), `<|>`(7, 8, 9))

Matrix(%id = 18446745804653824710)


b := `<|>`(10, 11, 12)

Vector[row](%id = 18446745804653819654)



Error, (in rtable/Sum) invalid input: dimensions do not match: Matrix(1 .. 3, 1 .. 3) cannot be added to Vector[row](1 .. 3)



Of course the above addition will throw an error because M and b have different dimensions. But if broadcasting was allowed, then the row vector b is added to each row in the matrix M. For example, in Python:



Is there a similar feature in Maple?




      I need to compute something involved with the pseudo differential operators.

Specifically, I need to calculate the inverse of a pseudo differential operator, the multiplication of two pseudo differential operators, and the n-th root of a pseudo differential operator. 

I don't know whether Maple could handle these. 


Hi. I hope this question is not a duplicate of my previous question. Fundiff function results in dirac terms in an equation. Are there commands that simply differentiates a term that is a function of (t) in an equation without involving diracs?

How can I compute MatrixInverse, MatrixMultiply and eigenvalues(eigenvectors) faster? are there any procedures or commands that can be used instead of those three command mentioned before to speed up calculations?

In the above document, digits must be 30.

Say I have three (3d if it matters) plot objects, which I will call A,B,C.

I need to plot A and B on the same graph and C on a different graph.

To plot objects on different graphs I would normally use an array of plots, and to plot objects on the same graph, I would use a set of plots. So what comes natural to me is this:




However, this results in

Error, (in plots:-display) element 1 of the rtable is not a valid plot structure

 The problem is in the first element V[1] - Maple wants a plot, and not a set of plots, as each element of the array.

Another attempt which fails is the following:


Here Maple will only plot {A,B} and ignore C.

I have had limited success with

display({A,B}), display(C)

which in fact works for the purpose stated above - it will produce the plots of {A,B} and C side by side.

However, when I try to put the above command within a procedure depending on some parameter, and use the Explore parameter to visualize the plots in dependence of the parameter, this does not work anymore. Maple will not produce any plot and will produce a wall of text within the Explore display.


For istance, 

with(plots); with(plottools)
display(circle([0, 0], 1)), display(circle([0, 0], 1))

Will produce the pictures side by side as desired. But:

P := proc (a)
display(circle([0, 0], 1)), display(circle([0, a], 1))
end proc:
Explore(P(a), parameters = [a = -1 .. 1])

Will result in a wall of text within the Explore window that begins like this:



So, is there a way to produce the plots I need which is compatible with the Explore command for a procedure? Ideally I need the two graphs ({A,B} and C) side by side within the same Explore window so that when I vary the parameters, both plots change accordingly. 

Thanks in advance.

Hi. I have an equation that consists lots of sines and cosines but I'm not sure how to differentiate it with respect to time. Whenever I do, I get zero. How do I communicate to Maple that theta changes with time so that it can perform the operation?

Is there any way to transfer the equation to MATLAB and perform it there by any chance? I don't know MATLAB though.

Thanks in advance.

Y = (-2*k^3+6*k^2+sqrt(k^8-12*k^7+64*k^6-198*k^5+448*k^4-636*k^3+369*k^2)-7*k-15)/((k^3-3*k^2+5*k-15)*(1+k))

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