MaplePrimes Questions

How do I convert an equation into a vectorial form in Maple?

Say you hav f_1(v)=-1/2*C*p*v*V

where V=[vx, vy] and v=|V|.


v=46m/s^2, A=18m^2, p=1,1


Important Question
Anyone figured out how to upload a worksheet since the revamp? Big green up-arrow appears no longer functional

Less important question
Mapleprimes input window can no longer be stretched horizontally - is this deliberate?

Trying to write a generat purpose procedure insteat of having 3 or 4 different named procceduers.

Need to determine the input types of say A,B,C


1) A,B,C could be for the form 3/2 , 5x-7 , x^2-sqrt(x+3)  i.e numbers or formulas

2) A,B,C could be 2 elenent lists [2,3]  , [5x-6y,8x+2] ,[2,sqrt(3)]  i.e 2D points

3) A,B,C could be 3 element lists as above    i.e 3D points

4) A,B,C could be 2D vectors

5) A,B,C could be 3D vectors

A, B, C will not be of mixed types but would be good to check A, B, C for consistency and if not retrun an error

Looking to calculate output based on

If type 1) ......

elif type 2).....



elif type 5)...

end if


end proc



> restart;
> with(plots);
> pr := .72; p := 0; n := 1; s := 1; a := [-0.5,0.0,0.5]; b := 1;
> R1 := 2*n/(n+1);
> R2 := 2*p/(n+1);
> for j to nops(a) do R1 := 2*n/(n+1); R2 := 2*p/(n+1); sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))+R1*(1-(diff(f(eta), eta))^2) = 0, diff(diff(theta(eta), eta), eta)+pr*s^f(eta)*(diff(theta(eta), eta))+R2*pr*s*(diff(f(eta), eta))*theta(eta)+2*(a[j]*(diff(f(eta), eta))+b*theta(eta))/(n+1) = 0, f(-.5) = 0, (D(f))(0) = 1+b*((D@@2)(f))(0), (D(f))(5) = 0, theta(-.5) = 1+s*(D(theta))(0), theta(5) = 0], numeric, method = bvp); fplt[j] := plots[odeplot](sol1, [eta, diff(diff(f(eta), eta), eta)], color = ["blue", "black", "orange"]); tplt[j] := plots[odeplot](sol1, [eta, theta(eta)], color = setcolors(["red", "Coral"])) end do;
Error, (in dsolve/numeric/process_input) boundary conditions specified at too many points: {0, 5, -1/2}, can only solve two-point boundary value problems
> plots:-display([seq(fplt[j], j = 1 .. nops(a))], color = [green, red]);

> plots:-display([seq(tplt[j], j = 1 .. nops(a))], color = [green, red]);


Dear sir,

In this program i m not getting the solution for decimal values and i do not have idea about the how to set different color for multiple lines(i tried for different set of colors but it shows that only for first color )


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


2 3 4 5 6 7 8 Last Page 4 of 1372