MaplePrimes Questions


I want to find the inverse of a 11x11 matrix which I imported from excel using the import data tool. When I try to find the the inverse it gives me this error:


K:=ExcelTools:-Import("C:\\Assignment 2.xlsx", "Q2", "V7:AF17");

K := Vector(4, {(1) = ` 1..11 x 1..11 `*Array, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

kkk:=convert(K, matrix):

Error, (in MatrixInverse) MatrixInverse expects its 1st argument, M, to be of type {Matrix, [Matrix(square)], [Vector, Matrix(square)], [Matrix(square), Matrix(square), Matrix(square)]} but received kkk


Can someone please help me out??? Thank you

Hi there,

I have a big polynomial expression involving powers of x and y, that comes from expanding a function in powers of x and y in polynomial form (I use series(convert(series(a,x=0,10),polynom),y=0,10) ). I want to multiply each of the terms by the factorial of the power of x and y it has. How can I do this?
I tried using Physics[Coefficient](a,x) but I get the error: it cannot compute the degree of the expression.
I tried using a double for with a double coeff to get each of the coefficients and the maybe be able to multiply them but I get the error "unable to compute coeff".

Is it because as expanding the series I have the term +O(y^11) that it cannot compute it?

I managed to substitute the x terms using subs(x^3=3!*x^3,x^5=5!*x^5,a). Obviously this is not very efficient since I need to write the substitution for each term, and since the ploynom is grouped in powers of y, this does not work for y (neither does algusbs).

[Edit 2]:

an example of it would be:

restart; z:=1/2*log((1+y+x)/(1+y-x)): a:=diff(z,x)*h: i:=int(series(convert(series(a,x=0,12),polynom),y=0,12),x);
with result 
i := -(1/6)*x^3-(1/8)*x^5-(11/112)*x^7-(31/384)*x^9-(193/2816)*x^11+(x+(2/3)*x^3+(7/10)*x^5+(41/56)*x^7+(109/144)*x^9+(1093/1408)*x^11)*y

And I want the coefficients for each x and y power to be multiplied by the factorial of those powers.


Thank you!



Does anyone no how to normalize wavefunctions such that the plot on the right looks like the one on the left.

Here's my code:-

schro := {diff(psi(x), x, x)-(alpha*x^4+x^2-energy)*psi(x) = 0};

ic := {psi(3) = 0, (D(psi))(3) = 1};

Ic := [{psi(3) = 0, (D(psi))(3) = -1}, %$2];

E := [1.06538, 3.306, 5.74796];

schro1 := [seq(subs(energy = e, alpha = .1, schro), e = E)];

soln1 := [seq(dsolve(schro1[i] union Ic[i], {psi(x)}, type = numeric), i = 1 .. nops(E))]; with(plots);

display(seq(odeplot(soln1[i], [x, psi(x)], -3 .. 3, color = [red, blue, green][i]), i = 1 .. nops(E)))


Thanks in advance

Dear All

For six parameters, I have corresponding list of their values and there are eight values for every parameter. I need to put these values in a formula to obtain a list of output values. There are two formulas one for 'P' and next is for 'RL'. I have used value of 'P' to calculate value of 'RL'. There are some complex number too, for which I have used modulus and final value is calculated by using 'evalf', but this command is not returning proper values for list as required. But this command works fine when I use single value from every list to calculate RL.

The Maple sheet attached herewith.



I was playing around with the example "Simple Inverse Kinematic Problem" and found somethings to be odd:

the angular motion seems to be calculated from between pi and negative pi and this has some effects when using position block to move a joint.

the original angular displacement is graph below

the angular displacement after ik calculations have been performed:

if you run the simulation it seems to copy and mirror the input pendulum, however if you disable one of the IK solutions you see that infact its motion isn't like the input.

this becomes more prevailant when you use a position block to force rotation on a joint instead of using the 'prescribed rotation' blocks that comes with the example.

My question then:
why does this happen?
how do I work around this?

the importance that the motion is follow precisely becomes more prevailent when we want to extract other values such as vel, accel, torque. they are incorrect and very jumpy. Also simply put the angular displacement is wrong, how do I fix it?

(side note: I'm thinking  it has to do with the way arctan is calculated in maple limits it to stay in range -pi to pi
"For real arguments x, y, the two-argument function arctan(y, x), computes the principal value of the argument of the complex number x+Iy, so −π < arctan(y,x) ≤ π." from


Hello people in mapleprimes,

I want to simplify the next expression which has 1/k as its exponent,

especially, I want to collect for T. I hope you will teach me how to do it.


If I do as


the output is


But, as all variables has 1/k as its exponent, I want to collect it to (...)^(1/k).

Is this possible?


i would like to plot a cube with the color given by a 3 variables functions (a way to plot in R^4)

in this way the cube is the domain of the functions, its color is the value of the function, i would like to put in evidence the max min of such function

but the command that i tried to use does not work:

plots[display](plotools([cuboid]([0,0,0],[1,1,1]),trasparency=.7,colorscheme["xyzcoloring",proc(x,y,z) option operator , arrow; x^2 + y^2 - z^2 end(proc)])

thanks for your help, anna rita

f=sum((2*q*cos(2* i*x)*(-1)^(i)*(-1)^((2*i-1)))/(i*Pi),i=1.3.5...35)

I want to write this series but getting error

the result is


can anybody help 

Hi guys! 

I have a PDE system. The mayority of the equations are equal to zero, but two of them are:


where a, b, c, d are CONSTANT parameters. I know that if a=b=d=c=1 the system is inconsistent. But I also know that if a=-1, b=d=0 and c=1 the system is consistent and exist the solution. I wanna know if there's a way to ask maple to find another selections of my parameter that make my PDE consistent and what it's the solution for that selection of a,b,c,d. 

Here's my PDE system (sys2).

thank you so much for your time! 


It is possible to display something like:

4 + 3 = x - 1

without Maple actually adding the 4 and 3 and putting that as a 7?


Same idea with sqrt. Is it possible to write sqrt(9) in a worksheet and actually seeing it as square root of 9 rather than a 3. Maple automatically simplifies everything so it's kinda hard to show a step by step process. Is there a way to solve this problem?

To be clear, I am talking about typing this into an active worsheet line. I know I can do a lot of this if I just do text becuase text lines obviously don't execute. They just display text. The reason I need to have this working is becuase sometimes I would have a command line where I want some of it to be excuted and some of it not so I can't just use text.

Thank you


Consider a simple differential equation:

f1 := t -> sin(t);
f2 := t -> cos(t);
dsys := {diff(x(t), t) = x(t)*f1(t)+f2(t), x(0) = 3};
solution_procedure := dsolve(dsys, type = numeric, output = listprocedure);

If initial condition is given like this: x(0)=3, then it compiles. But if I define x(0)=f1(3) then it gives an error:

Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got HFloat(3.0) = sin(3)

How can I handle this?

How can I ask Maple to wake me up after running the code?

It takes a long time to finish the job. So it would be helpful to play a beep or something to inform me the answer is ready.

Thank you in advance for your help.

Help me, please!

If i have boundary conditions with D(psi), i have no problem. But if i have condition with psi(infinity) (which i need), Maple says "too few boundary conditions". Maybe i make stupid mistakes, but i don't see.


assume(r, nonnegative);
ic_Re := `&psi;Re`(0) = 0, (D(`&psi;Re`))(0) = 0;
ic_Im := `&psi;Im`(0) = 0, (D(`&psi;Im`))(0) = 0;
V0 := 2.5; ERe := 1.5; EIm := 1.2; `&hbar;` := 6.582; mu := 938.27*(1/2); Q0 := 1.5; Rq := 4.5; Rv := 2.5;
Q := proc (r) options operator, arrow; -Q0*exp(-r/Rq) end proc;
V := proc (r) options operator, arrow; -V0*exp(-r/Rv) end proc;
`Eqn_&psi;Re` := -`&hbar;`^2*(diff(`&psi;Re`(r), r, r)+2*(diff(`&psi;Re`(r), r))/r)/(2*mu)-ERe*`&psi;Re`(r)+V(r)+EIm*`&psi;Re`(r) = Q(r);
`Eqn_&psi;Im` := -`&hbar;`^2*(diff(`&psi;Im`(r), r, r)+2*(diff(`&psi;Im`(r), r))/r)/(2*mu)-EIm*`&psi;Re`(r)-ERe*`&psi;Im`(r) = 0;
F := dsolve({ic_Im, ic_Re, `Eqn_&psi;Im`, `Eqn_&psi;Re`}, numeric);
plots[odeplot](F, [r, `&psi;Re`(r)], r = 0 .. 20, numpoints = 500);

plots[odeplot](F, [r, `&psi;Re`(r)], r = 0 .. 20, numpoints = 500);

assume(r, nonnegative);
ic_Re := `&psi;Re`(0) = 0, `&psi;Re`(infinity) = 0;
ic_Im := `&psi;Im`(0) = 0, `&psi;Im`(infinity) = 0;
V0 := 2.5; ERe := 1.5; EIm := 1.2; `&hbar;` := 6.582; mu := 938.27*(1/2); Q0 := 1.5; Rq := 4.5; Rv := 2.5;
Q := proc (r) options operator, arrow; -Q0*exp(-r/Rq) end proc;
V := proc (r) options operator, arrow; -V0*exp(-r/Rv) end proc;
`Eqn_&psi;Re` := -`&hbar;`^2*(diff(`&psi;Re`(r), r, r)+2*(diff(`&psi;Re`(r), r))/r)/(2*mu)-ERe*`&psi;Re`(r)+V(r)+EIm*`&psi;Re`(r) = Q(r);
`Eqn_&psi;Im` := -`&hbar;`^2*(diff(`&psi;Im`(r), r, r)+2*(diff(`&psi;Im`(r), r))/r)/(2*mu)-EIm*`&psi;Re`(r)-ERe*`&psi;Im`(r) = 0;
F := dsolve({ic_Im, ic_Re, `Eqn_&psi;Im`, `Eqn_&psi;Re`}, numeric);
Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 5, got 4

Hi, I have been trying to solve the Schrodinger equation for harmonic oscillators using dsolve and plot the the wavefunctions for the different energy levels. However I am struggling to plot all the different wavefuntions on the same plot. I also want to normalize the wavefunctions to help compare their shapes and values. Here's my code:- schro := {diff(psi(x), x, x)-(alpha*x^4+x^2-energy)*psi(x) = 0}; // d / d \\ / 4 2 \ \ { |--- |--- psi(x)|| - \alpha x + x - energy/ psi(x) = 0 } \\ dx \ dx // / ic := {psi(3) = 0, (D(psi))(3) = 1}; {psi(3) = 0, D(psi)(3) = 1} schro1 := subs(energy = 3.30687, alpha = .1, schro); soln1 := dsolve(schro1 union ic, {psi(x)}, type = numeric); // d / d \\ / 4 2 \ \ { |--- |--- psi(x)|| - \0.1 x + x - 3.30687/ psi(x) = 0 } \\ dx \ dx // / proc(x_rkf45) ... end; with(plots); [animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot] odeplot(soln1, [x, psi(x)], -3 .. 3); Thank in advance


Is there any way to generate a subplot in Maple2016?

I want to show many plots in one table at once.

I appreciate any idea you may have.


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