## EUREKA ! (shouted Archimedes)...

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 ...

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

y=

where a, b, , 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 =-1.
3. Find the length of C corresponding to the t-interval [0,].

## dsolve with some difficult ode...

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

restart;
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];
sol:=dsolve({sys,b(0)=0},numeric,discrete_variables=[b(t)::float],events=[stick,slip],event_maxiter=1000000,output=listprocedure,maxfun=0,range=0..8);

## Inexplicable FALSE return...

 (1)

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.

## Create 2 "concentrics" polygons...

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.

## problem in plotting differential equation type shr...

Hi,

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);

>Ep:=x->(1-exp-(x-2))^2;E:=0.5;

>sol:=dsolve({eq,phi(o)=0,D(phi)(0)=0},type=numeric,range=0..10);

>odeplot(sol);

but nothing appear in the plot except axes

## how to refresh a variable back to a variable after...

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

after some calculation,

assign(%)

a1 etc have value,

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

## extract coefficient in multivariate case...

Hi,

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...

***

p:=3*x^n*y^m+4*x^(n+2)*y^(m+2)+k*x^(n+2)*y^(m+2);
coeff(p,x,n);

***

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

## Maple implementation of "24" game

by: Maple 12

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.

game24:=proc(a,b,c,d)

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;

NumericEventHandler(division_by_zero=MyHandler);

It:=proc(L1,L2)

local i, j, L;

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;

L;

end proc;

P:=permute([a,b,c,d]);

K:=[];

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]])))];

od;

M:=[];

for i in K do

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

od;

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

for i in M do

print(SubString(i,2..length(i)-1));

od; fi;

end proc:

Two examples:

game24(2,3,8,9);

game24(2,3,3,4);

No solutions

24.mws

## unable to parse local in maple 12...

> local `+`;
Error, unable to parse

meet difficulty running script in maple 12

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

## operators in GRTENSORII...

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.

## How to use individual solutions in "dsolve, numeri...

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:

f1(t):=eval(a1(t),sol1)

But then if I do:

f1(100)

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:

plot(f1(t),0..2000)

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!

## numerical solution of raychaudhuri equations...

How can I solve raychaudhuri equations numerically using GRtensor?

## numeric solution of coupled inhomogeneous differen...

Hi,

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