Maple 12 Questions and Posts Maple 12 Questions and Posts Feed

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

A major-league pitcher releases a ball at a point 6 feet above the ground and 58 feet from home plate at a speed of 100 mi/hr ,  

If gravity had no effect, the ball would travel along a line and cross home plate 4 feet off the ground. Find the drop D caused by gravity.                                                                                                                                                      

 

NB: in this problem the angle alpha is the angle between the horizontal and the direction of the released ball. Since the ball is dropping, alpha will be negative.

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 :

x=a(e)^mu(t)*cos(t)

y=a(e)^mu(t)*sin(t)

z=b(e)^mu(t)

t>=0

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.

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

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*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*(s-Z[2])*exp(-n*T*(s-Z[2]))/(Z[1]-Z[2])+exp(-n*T*s)*(-1+Heaviside(-n*T)))/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
"(->)"true
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+(exp(-Z[2]*n*T)*(s-Z[2])*exp(-n*T*(s-Z[2]))/(Z[1]-Z[2])+exp(-n*T*s)*(-1+Heaviside(-n*T)))/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
"(->)"true"(->)"true``

((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+(exp(-Z[2]*n*T)*(s-Z[2])*exp(-n*T*(s-Z[2]))/(Z[1]-Z[2])+exp(-n*T*s)*(-1+Heaviside(-n*T)))/c = (2*Heaviside(-n*T)-1)*exp(-n*T*s)/c
"(->)"true"(->)"true"(->)"true

Q[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
"(->)"false"(->)"false"(->)"false

``


Download inexplicable.mw

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.

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

Thanks for answer

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?

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

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.

 

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

 

 

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

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!

How can I solve raychaudhuri equations numerically using GRtensor?

Hi,

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

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