Maple 17 Questions and Posts

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

Hello everyone, i've a problem working with Maple because i have a really big system of equations and for everything that i have to do with them, for example, collect terms, coefficients, take a lot of time from me. The problem it is when, for example, i wait 30 minutes to take the coefficients from a equation and in the next command Maple might stop, then i have to close and start all over again... My question it is if have anyway to save my file in a way that if i close and re open i dont have to compile all again. Maybe this is pretty obvious but i really dont know how to do it, because if i close my work and open again, i have to compile everything again.

I need to build this model:
We consider a population of female salmon, they live 4 years. Survival for first three years respectively: 0.5%,7%,15%. Each salmon has female kids only in 4 year and produces 5000 female offspring


If 0 occurs in the first element, I want to remove the list containing zero and the associated number.


p := [[[0, 5], [3, 10], [1, 20], [0, 50]], [[2, 5], [0, 10], [2, 20], [0, 50]]]

after processing:

[[[3, 10], [1, 20]], [[2, 5], [2, 20]]]

I tried in vain...

select(i -> (subs(p,p[1,i,1])>0), [$1..nops(p)]);


Do not have a working activation code for Maple17.  Have these 2, but neither works.



I am running Ubuntu 18 (linux).


Tom Vawter

(John Vawter)


We produce only one rotation of the cube by the angle Pi/2, and then repeat it at the following points, changing the colors of the faces in turn. And so the illusion is created that the cube is rolling along a straight line without slipping.
(Just a picture without any sense.)


I am trying to plot 2 equations divided in 3 intervals (, tr..te, te..tfin1), but when i try to solve the first equation it appears:

"Warning, cannot evaluate the solution further left of .66099564e18, probably a singularity"

Is it possible avoid this point?

About the second equation, when i try to solve between "te and tr" the program says that the argument is invalid.

Can someone help me?

Here is the program:


Digits := 20;

M := 0.122e20*0.152e25;
kappa := evalf(sqrt(8*Pi/M^2));
rrhoCC := 0.769e-41*(0.1e-28*0.561e24)*0.152e25^4;

rrhoM0 := 0.1e51;
rrhoR0 := 0;
rrhoM := proc (t) options operator, arrow; rrhoM0/a(t)^3 end proc;
rrhoR := proc (t) options operator, arrow; rrhoR0/a(t)^4 end proc;
pM := proc (t) options operator, arrow; 0 end proc;
eq1 := diff(a(t), t) = a(t)*kappa*sqrt(rrhoM(t)+rrhoCC)/sqrt(3);
eq2 := 2*(diff(a(t), t, t)) = -(1/3)*kappa^2*(rrhoM(t)+3*pM(t)-2*rrhoCC)*a(t);
tini := 0.1e19;
sys1 := {eq1, a(tini) = 1.0};
sys2 := {eq2, a(tini) = 1.0, (D(a))(tini) = 0.284e-17};
tfin1 := 0;
te := 10^(-32);
tr := 10^12;
singularities(eq1, a(t));
singularities(eq2, a(t));
p1a := dsolve(sys1, type = numeric, abserr = 10^(-15), relerr = 10^(-15), range = tini .. tr);
p1b := dsolve(sys1, type = numeric, abserr = 10^(-10), relerr = 10^(-10), range = tr .. te);
p1c := dsolve(sys1, type = numeric, abserr = 10^(-10), relerr = 10^(-10), range = te .. tfin1);
fig1a := odeplot(p1a, [t, a(t)]);
fig1b := odeplot(p1b, [t, a(t)]);
fig1c := odeplot(p1c, [t, a(t)], color = red);
display(fig1a, fig1b, fig1c);
p2a := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), range = tfin1 .. te);
p2b := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), te .. tr);
p2c := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), range = tr .. tini);
fig2a := odeplot(p2a, [t, a(t)], color = green);
fig2b := odeplot(p2b, [t, a(t)], color = green);
fig2c := odeplot(p2c, [t, a(t)], color = green);
display(fig2a, fig2b, fig2c);




It post can be called a continuation of the theme “Determination of the angles of the manipulator with the help of its mathematical model. Inverse  problem”.
Consider  the use of manipulators as multi-axis CNC machines.
Three-link manipulator with 5 degrees of freedom. In these examples  one of the restrictions on the movement of the manipulator links is that the position of the last link coincides with the normal to the surface along the entire trajectory of the working point movement.
That is, we, as it were, mathematically transform a system with many degrees of freedom to an analog of a lever mechanism with one degree of freedom, so that we can do the necessary work in a convenient to us way.
It seems that this approach is fully applicable directly to multi-axis CNC machines.

(In the texts of the programs, the normalization is carried out with respect to the coordinates of the last point, in order that the lengths of the integration interval coincide with the path length.)

I am trying to use Monte Carlo integration example given at:

After coding the procedure, the statement approxint(x^2, x = 1 .. 3)

gives error: Error, (in approxint) invalid input: `if` expects 3 arguments, but received 1

But I have used in exactly the same way as given in the page. What is the problem


Realted to this post I am trying to solve the following inequalities in the variable "t"




Cosenos := proc (m, x) local C, x1, x2, y, x0, i, j, j0, k, K0, Kaux, K1, L, R, S, t1, t2, t, r1, r2, d; C := NULL; K0 := NULL; Kaux := NULL; K1 := NULL; L := NULL; R := NULL; S := NULL; d := nops(x); for k to d-1 do if evalf(x[k]) = 1 then j0 := m else j0 := 1+floor(x[k]*m) end if; K0 := K0, [(j0-1)/m, j0/m] end do; K0 := [K0]; S := K0[1][1] <= t, t <= K0[1][2]; for k from 2 to d-1 do S := S, K0[k][1] <= 1/2-(1/2)*cos(Pi*m^(k-1)*t), 1/2-(1/2)*cos(Pi*m^(k-1)*t) <= K0[k][2] end do; K1 := solve({S}, t) end proc


However, this run very very slow....For instance, for Cosenos(50, [.3225, .25877, .325, 1])


we interrupt the opertion after more than 10 minutes...I am doing something wrong?

Many thanks for your comments and suggestions. 




I've asked Maple to solve an equation, and the result is difficult to read because it is separating single variables into multiple multiplicative instances of that variable raised to different powers. Is there a way to tell Maple to combine all instances of a variable into one instance raised to the appropriate power?

I've already tried simplify.

For example:

pceq := (2/3)*Pi*G*rho^2*R^2:
pnonreleq := (1/5)*(3*Pi^2)^(2/3)*hbar^2*n^(5/3)/m:
rhocomposition := rho = m/((4/3)*Pi*R^3), n = Z*rho/(A*m_p):
obj := subs(rhocomposition, rhocomposition, pceq = pnonreleq):
req := R = simplify(solve(obj, R)[1]);

The above code produces 

In the first place, I can't see why Maple would show what should be (Z/A)^(5/3) as z^3 / (A * [A*Z^2]^(2/3)), but I'd like to somehow tell it to not break up the variables like this.

Is this possible? Thanks for the help.

I want to use Burr distribution and hence I am creating custom probability distribution. The pdf of Burr is not piecewise. It gives error.


burrpdf := alpha*k*((x-gamma)/beta)^(alpha-1)/beta(1+((x-gamma)/beta)^alpha)^(k+1)

burr_distribution := Statistics[Distribution](PDF = (alpha > 0, beta > 0, gamma > 0, k > 0), burrpdf)


Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution;

I am unable to compute integral, it displays the function itself.

burrpdf := alpha*k*((x-gamma)/beta)^(alpha-1)/beta(1+((x-gamma)/beta)^alpha)^(k+1)


mean_burr_temp := simplify(x*burrpdf)


int(mean_burr_temp, x = gamma .. t)


Looking the Maple's help, I see that the command "isolve"  tries to solve an equations   over the integers. Then, given m>1 and t in the interval [0,1], How can used this command to find an integer j>=1 such that (j-1)/m<=t<j/m. That is, fin j such that t belongs to the interval [(j-1)/m,j/m].


Thanks in advance for your comments and help.

Let G be a permutation group like S3. I have a loop in which x runs over the elements of this group.

When I ask the cycle type of x or the number of orbits of x, Maple gives an incorrect result in some cases. This is because when x=(12), for example, Maple considers x to be an element of the permutation group S2 instead of S3, i.e. it fails to understand that (12) should really be (12)(3) in this case.

Is there a way I can instruct Maple to consider the permutation (12) as a member of S3 instead of S2? 

I am posting the code as requested. Something like this:


for x in Elements(S3) do print(x, numelems(Orbits(PermutationGroup(x)))) end do;

(I don't know how to format this, sorry)

This code is simply asking how many orbits exist in the action of each element of S3. The result will be 1 for x=(12), however, because Maple will assume that (12) is acting on the set {1,2}, even though I am considering (12) as an element of S3. I want it to consider (12)=(12)(3) and let it act on the set {1,2,3}, thereby producing 2 orbits, not 1.

How to draw the following function containing an imaginary number


u := proc (x, t) options operator, arrow; 1/2+I*sqrt(2)/(exp(x-t)+2*exp(-x+t))+(1/2)*(exp(x-t)-2*exp(-x+t))/(exp(x-t)+2*exp(-x+t)) end proc

proc (x, t) options operator, arrow; 1/2+I*sqrt(2)/(exp(x-t)+2*exp(-x+t))+(1/2)*(exp(x-t)-2*exp(-x+t))/(exp(x-t)+2*exp(-x+t)) end proc



















Download plot33.mwDownload

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