Maple 12 Questions and Posts

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

Archimedes supposedlly, was asked to determine whether a crown made for the king consisted of pure gold. According to 

legend, he solved this problem by weighing the crown first in air and then in water. Suppose the scale read 7.84 N when the 

crown was in the air and 6.84 N when it was in water.


What should Archimedes have told the king ?


A concho-spiral is a curve C that has a parametrization :





where a, b, mu, are constants.

  1. Show that C lies on the cone a^2*z^2=b^2*(x^2+y^2).
  2. Sketch C for a = b = 4 and mu=-1.
  3. Find the length of C corresponding to the t-interval [0,infinity].

I got a problem with a difficult ode,the commands are below.

sys := 1.*(diff(x(t), t, t)) = piecewise(b(t) = 1, 0, 1003.0-1000.*x(t)-30.*(diff(x(t), t))-25.*signum(diff(x(t), t)-.1)-.3*signum(diff(x(t), t))*exp(-2*abs(diff(x(t), t)))), x(0) = 1, (D(x))(0) = 0;
mu := 100;
stick := [diff(x(t), t) = .1, b(t) = piecewise((1000.-1000.*x(t))^2 < 10000, 1, 0)];
slip := [[0, 10000 < (1000.-1000.*x(t))^2], b(t) = 0];

any advice is appreciated.

Q[1] := (e^(-n*T*s)-e^(-(n+1)*T*s)+(-exp(-Z[1]*n*T)*(s-Z[1])*exp(-n*T*(s-Z[1]))+exp(-Z[2]*n*T)*(s-Z[2])*exp(-n*T*(s-Z[2])))/(Z[1]-Z[2])+2*exp(-n*T*s)*(-1+Heaviside(-n*T)))/c+Z[1]*Z[2]*exp(-n*T*(s-Z[1]))/((s-Z[1])*exp(Z[1]*n*T)*(Z[1]-Z[2])*c)-Z[2]*Z[1]*exp(-n*T*(s-Z[2]))/((s-Z[2])*exp(Z[2]*n*T)*(Z[1]-Z[2])*c); 1; Q[2] := ((s-Z[1])*exp(-n*T*(s-Z[1]))*exp(-Z[1]*n*T)/(Z[2]-Z[1])+exp(-n*T*s)*(-1+Heaviside(-n*T)))/c+Z[1]*Z[2]*exp(-n*T*(s-Z[1]))/((s-Z[1])*exp(Z[1]*n*T)*(Z[1]-Z[2])*c)+(exp(-Z[2]*n*T)*(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2] = (2*Heaviside(-n*T)-1)*exp(-n*T*s)/c+Z[1]*Z[2]*exp(-n*T*s)/((s-Z[1])*(Z[1]-Z[2])*c)-Z[2]*Z[1]*exp(-n*T*s)/((s-Z[2])*(Z[1]-Z[2])*c)+(e^(-n*T*s)-e^(-T*s)*e^(-n*T*s))/c



Can anyone explain the false return on the last line?  MAPLE seems to recognize the simplified expression on the next to last line, but when substituted into the expression for Q2 MAPLE does not seem to recognize the simplification.

Hi, i'm trying to make a function to create 2 polygons with the same number of sides, the same center but different radius. These 2 polygons have to be on the same draw. I tried by doing this function but its not working..

 If anyone could help me it would be great and sorry for my bad english i'm from France.


I would like a plot of the solution of this differential equation : diff(phi(x),x,x)=phi(x)*(Ep(x)-E) with for example Ep(x)=(1-exp-(x-2))^2 and E=0.5


So :

>restart;with(plots); xith(DEtools);




but nothing appear in the plot except axes

Thanks for answer

x: =Matrix([[a1,a2],[a3,a4]])

after some calculation,


a1 etc have value,

how to make a1,a2,a3,a4 back to variable in maple 12?


  I have an expression as p in the following. I would like to extract the coeffient with x^n*y^m and x^(n+2)*y^(m+2), however, coeff comand does not work...





gives me


n m (n + 2) (m + 2) (n + 2) (m + 2)
3 x y + 4 x y + k x y
/ n m (n + 2) (m + 2) (n + 2) (m + 2) \
coeff\3 x y + 4 x y + k x y , x, n/



What is the correct command to get the coefficients? Thank you very much

I learned about this problem from Aser's post   See  page of tasks still without  Maple implementation. 

The procedure  game24  solves the problem. In the procedure Acer's  procedure  MyHandler is  used, which prevents the program to stop in case of 0 in the denominator.



local MyHandler,It, K, M, i, P;

uses StringTools, combinat;

 MyHandler := proc(operator,operands,default_value)

      NumericStatus( division_by_zero = false );

      return infinity;

   end proc;



local i, j, L;


for i in L1 do

for j in L2 do

L:=[op(L), op([Substitute(Substitute("( i + j )","i",convert(i,string)),"j",convert(j,string)),Substitute(Substitute("( i - j )","i",convert(i,string)),"j",convert(j,string)),Substitute(Substitute("( i * j )","i",convert(i,string)),"j",convert(j,string)),Substitute(Substitute("( i / j )","i",convert(i,string)),"j",convert(j,string))])];

od; od;


end proc; 



for i in P do

K:=[op(K),op(It(It(It([i[1]],[i[2]]),[i[3]]),[i[4]])), op(It(It([i[1]],It([i[2]],[i[3]])),[i[4]])), op(It([i[1]],It(It([i[2]],[i[3]]),[i[4]]))), op(It([i[1]],It([i[2]],It([i[3]],[i[4]])))), op(It(It([i[1]],[i[2]]),It([i[3]],[i[4]])))];



for i in K do

if parse(i)=24 then M:=[op(M), i] fi;


if nops(M)=0 then return `No solutions` else

for i in M do


od; fi; 

end proc:


Two examples:




        No solutions





> local `+`;
Error, unable to parse


meet difficulty running script in maple 12

restart;  local `+`;  `+`:=proc(a,b) :-`+`(a^`~2`,b^`~2`) end proc;

how gr operators work?

I tried to run example given there but it is not working,

where can I get more examples to understand working of Gr operators work?

specially for raychaudhuri equations.

I'm using Maple 12 to solve a system of differential equations numerically. I first define my system as "sys1" and then use the command:

sol1 := dsolve(sys1, numeric, output = listprocedure, range = 0 .. 2000)

I'm using output=listprocedure because that's what the Maple's Help says if I want to use individual solutions. So my differential equation system has 8 solutions, and I label them a1(t) through a8(t). Now after solving the system I want to be able to evaluate, e.g., a1(t) at t=100.

I then follow the Maple's Help by defining:


But then if I do:


I don't get the expected numerical value. Instead I get a1(100) as the result.

What I managed to do however was to plot f1(t) with the following command:


So it seems that I did it partially right. However according to the Maple's Help I should be able to extract numerical values with f1(100). 

I'd appreciate any suggestions!

How can I solve raychaudhuri equations numerically using GRtensor?


how can I solve a set of first order, coupled, non-linear and inhomogeneous differential equations using MAPLE 12.

How can I solve a differential equation set of the type,

dy(x)/dx +y^2 =P(x); dP(x)/dx = R(P) numerically

5 6 7 8 9 10 11 Last Page 7 of 20