Maple 2015 Questions and Posts

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




r1 := Vector([0, 0, 1]);

r2 := Vector([sin(theta1), 0, cos(theta1)]);

r3 := Vector([VectorCalculus:-`*`(sin(theta2), cos(phi2)), VectorCalculus:-`*`(sin(theta2), sin(phi2)), cos(theta2)]);

M := Matrix([r1, r2, r3]); ex := `assuming`([simplify(VectorCalculus:-`*`(Determinant(M), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(1, DotProduct(r1, r2)), DotProduct(r1, r3)), DotProduct(r2, r3))))], [theta1 > 0, theta2 > 0, phi2 > 0]);

dex := eval(simplify(diff(arctan(ex), phi2)), phi2 = t);

VectorCalculus:-`*`(2, Int(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Int(dex, t = 0 .. phi2)), 1/VectorCalculus:-`*`(4, Pi)), VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Pi), sin(theta1)), sin(theta2)), 1/VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(4, Pi), 4), Pi))), [phi2 = 0 .. Pi, theta2 = 0 .. Pi, theta1 = 0 .. Pi], method = _CubaCuhre, epsilon = 0.5e-2));




Ok I deleted my other question, since there was a mistake. I actually want to integrate the following expression. The arctan is not every positive in my integral there, so I needed to go this way to make it continuous. The problem here is the nested integral inside Int(...,t=0..phi2) which leads to maple not being able to evaluate.

How can you get maple to evaluate i^i?

when i type in

i just get


and similarly when i raise numbers to complex powers i get results like 2^(2I+6)


help me


Hi Users!

Hope you all are fine here. I want to draw a graphs like this





Please help me how to make this for x when y(x) on x-axis and y(x-0.8) on y-axis. I am waiting your positive response. 



How can I quickly construct a lower triangular matrix?

I tried the following:


n := 4;

M1 := Matrix(Vector([seq(k, k = 1 .. n)]), shape = diagonal);

M2 := Matrix(Vector([seq(1, k = 1 .. n-1)]), shape = diagonal);

M := Matrix([M1, M2], shape = triangular[lower])




In this case the diagonal has value 1,2,3,4 while the line below 1,1,1.


edit: Actually I managed with

M := Matrix([[1], seq([seq(0, i = 1 .. k-2), 1, k], k = 2 .. n)], shape = triangular[lower])




but I was wondering if it is also possible to use Matrices to fill parts of a bigger matrix?

Is it possible to use the diff(f,x) operator together with @@ ??

So as in


-> (x*diff(f,x))@@2 which is of course wrong, but I guess you know what I mean.

In the first case maple evaluates ((x*D)@@1)(x) to x(x)*D(x), but of course x(x) is nonsense here, as x is the variable, so x(anything)=x and D(x) should also be reduced to 1. Is it not possible to tell D that x is the differentiation variable?


Probably I could make rules like


but that seems rather cumbersome.

Much simpler would it be to tell maple in the first place how D and x precisely act.

These are the timings for various algorithms, using different starting points deriving surfaces of dimension 5, 4, 3, 2, 1

times3:=[[], [.140], [1.344, .891], [1.578, 1.312, 1.375, 1.437, 1.922, 2.625, 6.406], [2.188, 2.312, 1.687, 2.110, 2.047, 1.578, 8.953, 1.891, 1.875, 9.344, 2.203, 55.969, 2.266, 2.531, 81.078, 2.172, 50.641, 2.500, 3.141, 61.656, 3.406, 3.375]]

times1:=[[.718], [.766, 4.703], [.750, .797, 7.594, 3.938], [6.594, 7.718, 11.969, 8.485, 11.391, 130.583, 548.284, 974.435], [7.281, 8.515, 65.569, 7.016, 8.312, 9.500, 8.562, 9.766, 10.641, 12.609, 13.281, 17.453, 18.640, 1763.860, 2659.990, 7812.89, 8189.139]]

So far i can get a boxplot of either:

but what I'd like is a boxplot like this but i can't work out how to do this.

I recently corresponded with maplesoft on whether the program Groebner:-Basis always produces reduced Groebner bases or not. They say it does. This mw appears to show it producing a non reduced Groebner Basis for a set of polynomials.

More specifically, the coefficient of the lead term of the first polynomial generated is not 1.

I'd like to be shown wrong here, but I am struggling to see what i could be doing wrong.


I'm new into Maple and I need some serious help. I'm supposed to read numbers from file (teploty.txt) and according to value assign some text to them and write it in other file (barvy.txt). I think I've done it right (propably not, I learn it for like half a year), but Maple keeps writing "Error, cannot determine if this expression is true or false: value < 20".

Can anybody help me, please?

Thank a lot!

Is there a way to put the 2 following animations together and synchronize them?

Maplesoft Help has an example of how to create the animation.  See last example on

but I couldn't get it to work on my Maple version 2015.

plots[animate](plot, [[cos(t), sin(t), t = 0 .. A]], A = 0 .. 2*Pi, scaling = constrained, frames = 50)

BACK := plot(sin(x), x = 0 .. 2*Pi);
oneFrame := proc (t) options operator, arrow; pointplot([t, sin(t)], color = blue, symbol = circle, symbolsize = 18) end proc;
animate(oneFrame, [t], t = 0 .. 2*Pi, background = BACK);

I have this expression which I want to integrate numerically, but it is exponentially slow. I tried methods like _d01ajc but it does not help.



f2 := proc (m) options operator, arrow;

evalf(Int(exp(-(2*m-4)*exp(t)+t*(m+1))*(t-2*exp(t)), t = 0 .. infinity))

end proc;


plot([f2], 3 .. 10)

I have an expression involving a sqrt, and i'd like to simplify it, but simplify(expression,sqrt) doesn't seem to fully help.

Eq1 := [(1/2)*(R[b]*kh[a2]+R[m]*kh[a2]-Rh[m]*kh[a2]+sqrt(R[b]^2*kh[a2]^2+2*R[b]*R[m]*kh[a2]^2-2*R[b]*Rh[m]*kh[a2]^2+R[m]^2*kh[a2]^2-2*R[m]*Rh[m]*kh[a2]^2+Rh[m]^2*kh[a2]^2))/kh[a2] = 0, 0 = 0, -(1/2)*(R[b]*kh[a2]+R[m]*kh[a2]-Rh[m]*kh[a2]+sqrt(R[b]^2*kh[a2]^2+2*R[b]*R[m]*kh[a2]^2-2*R[b]*Rh[m]*kh[a2]^2+R[m]^2*kh[a2]^2-2*R[m]*Rh[m]*kh[a2]^2+Rh[m]^2*kh[a2]^2))/kh[a2] = 0]

simplify(Eq1, sqrt)


[(1/2)*(R[b]*kh[a2]+R[m]*kh[a2]-Rh[m]*kh[a2]+sqrt(kh[a2]^2*(R[b]+R[m]-Rh[m])^2))/kh[a2] = 0, 0 = 0, -(1/2)*(R[b]*kh[a2]+R[m]*kh[a2]-Rh[m]*kh[a2]+sqrt(kh[a2]^2*(R[b]+R[m]-Rh[m])^2))/kh[a2] = 0]

which on paper simplifies to:


is there a way to get maple to show this?

[In part I am trying to better understand how to manipulate sqrt expressions in maple]

I have a complicated expression which includes RootOf( a quadratic ) but holds for all x what i'd like to do is turn it into a polynomial in x[1], x[2], x[3] so i can start looking at the monomial coefficients.

k[a1]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]-x[1]-2*x[2])/((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]+k[m])-k[d1]*x[1]-k[a2]*x[1]*(R[b]-x[1]-2*x[2])+2*k[d2]*x[2] = (-R[b]*k[a2]+2*k[a2]*x[1]+2*k[a2]*x[2])*(k[a1]*kh[m]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])/(k[m]*((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]*kh[m]/k[m]+kh[m]))-k[d1]*x[1]-kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])+2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])+(-2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])+2*k[a2]*x[1]+2*k[d2]-2*kh[d2])*(kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])-2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])

If this were something like q(x)=p1(x)/sqrt(p2(x)) where p1 and p2 are polynomials and q is a quotient- this would be as simple as making sqrt(p2(x)) the subject and squaring both sides, and then movinbg everything onto one and multiplying out denominators. However RootOf is something I'm not used to manipulating.

Is there anyway of converting this expression to a polynomial using maple commands?

I am working on a problem that involves finding a map lambda(x) which maple stores using RootOf:

LambdaMap := [lambda[1] = RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2]), lambda[2] = x[2], lambda[3] = x[1]+x[3]-RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])]

(as an aside, after a few years of using maple and reading the help page I find RootOf confusing, and I think this is the root of this question, I'd love to get some recomended reading on it in the answers)

I want to use the restriction lambda(0,0,0)=(0,0,0) to find relationships between the parameters (kh,k,Rh,R etc)

I tried:

`~`[`=`](`~`[rhs](subs([x[1] = 0, x[2] = 0, x[3] = 0], LambdaMap)), [0, 0, 0]);

which returned:
[RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2])*_Z) = 0, 0 = 0, -RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2])*_Z) = 0]
{R[b] = R[b], R[m] = R[m], Rh[m] = Rh[m]}

which seems wrong (both the first and third equations are quadratics sharing roots, the first root is _Z=0, and the second is _Z=-R[b]-R[m]+Rh[m]- i'm not sure how either result in this solve)

Is this the right way to do this? i.e. do solve and subs, work intuitively with RootOf expressions.

I am doing some calculus on lambda next - is there anything i should be mindful of when calculating its Jacobean or using diff?

I have this sum which should be equal to argument(GAMMA(I*x)) with x>0.


`assuming`([x*ln(n)-(1/2)*Pi-(sum(arctan(x/k), k = 1 .. n))], [x > 1]);

aG := `assuming`([limit(%, n = infinity)], [x > 1]);

`~`[evalf](eval([aG, argument(GAMMA(I*x))], x = 1))


However this limit evaluation is somehow broken in as it always gives some order symbol O(1) etc..

What is happening here?

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