385 Reputation

8 Badges

11 years, 114 days

MaplePrimes Activity

These are questions asked by digerdiga


Simple question:

Why does



`assuming`([simplify(%)], [t > 0, t < 2*Pi, q > 0, q < 1])



not simplify to exp(I*t*q)





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.

Is there already a build in sum(), add() procedure where you can supply a condition?

I know the help doesn't say anything about it, but I thought maybe there is something else.

Say I want to add the coefficients a(n) up to N, but only if n divides N, so

add(a(n),n=1..N,conditioner: mod(N,n)=0)


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.

4 5 6 7 8 9 10 Last Page 6 of 25