Maple 2017 Questions and Posts

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

update_standings_ELO_draw.mw


This latest question involves ELO, which is used to rate chess players (and other sports).

The difference between the previous (win-loss) system and ELO is the allowance for a third option, a draw. Carl coded the previous rating system, and I have tried to alter it.

See code for ELO procedure.

Adding a D to the third field, gets the result I want.

ELO(Record(rating= 2400),Record(rating= 2000),D)

Adding anything other than D to the third field means the first player defeats the second.

My preference would be to leave nothing in this third field to signify this (but I don't know if this is possible). 

The main problem is getting the bulk processing to work (for a series of matches...)

See Update procedure.

I have this flawed notation:

Games:= [[Tom_C, David_J, D],[David_J, Tom_C]]: #Tom_C drew David_J then David_J defeats Tom_C.

Hope someone can help.

Consider the following expression (omega being the socalled minimal spin connection in the vierbein formalism of general relativity):

with(Physics):
with(Tetrads):
omegaDef := omega[mu,c,d] = 1/2*(
   +e_[~rho,c]*(d_[mu](e_[rho,d]) - d_[rho](e_[mu,d]))
   -e_[~rho,d]*(d_[mu](e_[rho,c]) - d_[rho](e_[mu,c]))
)
-1/2*e_[~a,mu]*e_[~rho,c]*e_[~sigma,d]*(d_[rho](e_[sigma,a]) - d_[sigma](e_[rho,a]));
Define(omegaDef):

The Define command raises "Error, (in Physics:-Define) numeric exception: division by zero" in Schwarschild spacetime (loaded with g_[sc]), but not, say, in Tolman spacetime (loaded with g_[tolman]). Furthermore, if either the first two terms, or the last term, are/is removed in omega, then no error is raised in Schwarzschild spacetime. What is going on?

I entered this function
f:=x->(4*x^2-4)^(4/5);

Then I entered f(0) and got (-4)^(4/5).

When I tried to approximate , I got -2.452480922+1.781831689*I

I am looking for the real number value, which is 3.031433 with my TI-83 calculator and here https://www.desmos.com/calculator/b1soxuhbri

How do I set it in maple so that x is assumed to be real in f(x) and all outputs are real.

Hello! I am trying to make an if statement that is IF a bound is not equal to NULL, it does things, and if it IS equal to NULL, the bounds are set to zero. When a bound is null, they say 

bound1:=()

My first if statement will not work, please help!

 

bound1:=solve(tau(x)=(Intv||j)[1],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2] ;  

bound2:=solve(tau(x)=(Intv||j)[2],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2];

if bound1<>NULL;bound2<>NULL;  then

if bound1<=bound2   then  

lower:=bound1;  upper:=bound2  

else lower:=bound2;   upper:=bound1 end if;

else lower:=0; upper:=0 end if;

I was using the following idea to get the computation time of my computations in Maple;

s:=time():
my computation
print(time()-s);

But it seems if I use

Grid:-Map(m->My computation(m),[some sequence]);

Where the sequence has more than one element, this idea doesn't work! It seems Maple time() remains fixed during this Grid:-Map when the sequence has more than one element. So then how should I check the computation time?

In the following pictures you can see when the sequence has one element, it works normal, but when it has two elements, it doesn't work the same.

Please house, I need help on how to compute a funtion a set of column data imported into maple and subsequently output results in a new column on the table.

I have successfully imported the table data from excel but I needed to write a code to recognize the column/columns I want to use as variables in the function and compute results using the column's data. Data table holds up to 14 x 25 datasets.

Any advice would be well appreciated.

Hello everybody,

I am quiet new to Maple and just have to program a small tool.

I need to show a conculison in a pop-up Window which should contain a matrix and a plot.

I tried different ways but they didn't work.

Thanks in advance

Hello,

it seems that Maple2017 handles the noncommutative product wrongly (while it used to do it properly up to maple 17 afaik). 

 

CODE:

with(Physics);
Setup(noncommutativeprefix={P,Q});
Q^2*P*Q + Q*P*Q^2;
simplify(%);

 

gives a correct result: BUT 

Q(t)^2*P(t)*Q(t) + Q(t)*P(t)*Q(t)^2;
simplify(%)

 

gives the result:

2Q(t)^3*P(t)  (which is wrong).

It used to work fine in Maple 17. I need to differentiate noncommutative polynomials in P(t), Q(t), which was done without problem in Maple 17 but now seems to be broken. 

 

Any explanation/workaround/fix? Is it fixed in Maple 2018?


 

restart

Digits := 4

"phi(x):=16*x^(2)*(1-x)^(2):"

``

a1 := int((diff(phi(x), x, x, x, x))*phi(x), x = 0 .. L)

(6144/5)*L^5-3072*L^4+2048*L^3

(1)

``

a3 := int(phi(x)*phi(x), x = 0 .. L)

(256/9)*L^9-128*L^8+(1536/7)*L^7-(512/3)*L^6+(256/5)*L^5

(2)

``

lambda := 0.170e-1

0.170e-1

(3)

B := 0.223e11

0.223e11

(4)

A := 0.346e11

0.346e11

(5)

k[n] := W*(4*R*G*L^2+pi^2*(2*n-1)^2)/(C*(pi^2*(2*n-1)^2+4*R*L^2*(G+W)))

W*(4*R*G*L^2+pi^2*(2*n-1)^2)/(C*(pi^2*(2*n-1)^2+4*R*L^2*(G+W)))

(6)

b[n] := 4*pi*(2*n-1)/(4*R*G*L^2+pi^2*(2*n-1)^2)

4*pi*(2*n-1)/(4*R*G*L^2+pi^2*(2*n-1)^2)

(7)

U := Heaviside(t)

Heaviside(t)

(8)

w := 1

1

(9)

L := 3.5

3.5

(10)

Ra := 9

9

(11)

Rb := 5

5

(12)

W := 1

1

(13)

G := 0.5e-3

0.5e-3

(14)

R := Ra+Rb

14

(15)

C := 0.2e-1

0.2e-1

(16)

h := 0.250e-1

0.250e-1

(17)

nu := .22

.22

(18)

I1 := (1/3)*w*h^3

0.5207e-5

(19)

E[0] := A+B

0.569e11

(20)

nu1 := (1-nu)/((1+nu)*(1-2*nu))

1.142

(21)

"beta(x,t):=1/(w*h)(W(&sum;)(-(Pi^(3)*b[n]*(2*n-1)^(3))/(k[n]*8*L^(3))*cos(((2*n-1)*Pi)/(2*L)*x)*(exp(-k[n]*t)))+(R*G*(R*G)^(0.5)*sinh((R*G)^(0.5)*(x-L)))/(cosh((R*G)^(0.5)*L))*t+C*U*(R*G*(R*G)^(0.5)*sinh((R*G)^(0.5)*(x-L)))/(cosh((R*G)^(0.5)*L)))*exp(-W/(C)*t)"

proc (x, t) options operator, arrow; (W*(sum(-(1/8)*Pi^3*b[n]*(2*n-1)^3*cos((1/2)*(2*n-1)*Pi*x/L)*exp(-k[n]*t)/(k[n]*L^3), n = 1 .. 8))+R*G*(R*G)^.5*sinh((R*G)^.5*(x-L))*t/cosh((R*G)^.5*L)+C*U*R*G*(R*G)^.5*sinh((R*G)^.5*(x-L))/cosh((R*G)^.5*L))*exp(-W*t/C)/(w*h) end proc

(22)

eq := -nu1*I1*a1*((1/2)*E[0]*q(t)+B*lambda*(int(exp(-lambda*(t-s))*q(s), s = 0 .. t)))+2*w*h^2*beta(x, t)

-0.4603e11*q(t)-0.6134e9*(int(exp(-0.170e-1*t+0.170e-1*s)*q(s), s = 0 .. t))+0.5000e-1*(-0.7235e-2*pi*(pi^2+686.)*cos(.4488*x)*exp(-50.*(.3430+pi^2)*t/(pi^2+686.))/(.3430+pi^2)^2-.5860*pi*(9.*pi^2+686.)*cos(1.346*x)*exp(-50.*(.3430+9.*pi^2)*t/(9.*pi^2+686.))/(.3430+9.*pi^2)^2-4.522*pi*(25.*pi^2+686.)*cos(2.244*x)*exp(-50.*(.3430+25.*pi^2)*t/(25.*pi^2+686.))/(.3430+25.*pi^2)^2-17.37*pi*(49.*pi^2+686.)*cos(3.142*x)*exp(-50.*(.3430+49.*pi^2)*t/(49.*pi^2+686.))/(.3430+49.*pi^2)^2-47.47*pi*(81.*pi^2+686.)*cos(4.039*x)*exp(-50.*(.3430+81.*pi^2)*t/(81.*pi^2+686.))/(.3430+81.*pi^2)^2-105.9*pi*(121.*pi^2+686.)*cos(4.937*x)*exp(-50.*(.3430+121.*pi^2)*t/(121.*pi^2+686.))/(.3430+121.*pi^2)^2-206.6*pi*(169.*pi^2+686.)*cos(5.834*x)*exp(-50.*(.3430+169.*pi^2)*t/(169.*pi^2+686.))/(.3430+169.*pi^2)^2-366.3*pi*(225.*pi^2+686.)*cos(6.732*x)*exp(-50.*(.3430+225.*pi^2)*t/(225.*pi^2+686.))/(.3430+225.*pi^2)^2+0.5616e-3*sinh(0.8367e-1*x-.2928)*t+0.1123e-4*Heaviside(t)*sinh(0.8367e-1*x-.2928))*exp(-50.00*t)

(23)

``


 

Download n-h-ie.mwn-h-ie.mw

Hello everyone,

 

I am currently trying to plot lines from different lists.

I got 3 lists with points and another 3 lists with points (Connect each point from one list with the other), and another list with my x-axis.

 

I tried something like that

(nply in this case is 4)

for i from 1 to nply do

sigma1P1[i] := display(line([grenzeu[i], sigma1unter[i]], [grenzeo[i], sigma1ober[i]])):

sigma2P1[i] := display(line([grenzeu[i], sigma2unter[i]], [grenzeo[i], sigma2ober[i]])): 

tau12P1[i] := display(line([grenzeu[i], tau12unter[i]], [grenzeo[i], tau12ober[i]])):

end do:
plot:-display(sigma1P1,sigma2P1,tau12P1);

The for loop creates 3 tables with 4 line plots, but the plot:-display(sigma1P1,sigma2P1,tau12P1);

gives me this Error message:

Error, `plot` does not evaluate to a module

Have anyone an idea how to get these 3 table with plots in one plots?

Plot_problem.mw

And if yes is it possible to implement this in a EMbedded Plot Window?

 

Many thanks in advance!

 

 

 

Dear all

I want to solve a set of parametric inequalities with constraints but it takes too much time to processing. do you know any faster solution? 
thanks in advance

Dear friends, i want to solve inequalities as follow:

solve({0 < Q, 0 < delta, 0 < t, 0 < E[0], 0 < lambda[1], 0 < (lambda[1]^2*(Q+2*t+4*delta-4*E[0])+lambda[1]*(Q+2*t+3*delta-7*E[0])-3*E[0])/((lambda[1]^2-6*lambda[1]-6)*t), Q < -(3*delta*lambda[1]+2*t*lambda[1]-4*E[0]*lambda[1]+6*delta-3*E[0])/lambda[1], delta < E[0]*(4*lambda[1]+3)/(3*(lambda[1]+2)), t < -(3*delta*lambda[1]-4*E[0]*lambda[1]+6*delta-3*E[0])/(2*lambda[1]), lambda[1] < 1, (lambda[1]^2*(Q+2*t+4*delta-4*E[0])+lambda[1]*(Q+2*t+3*delta-7*E[0])-3*E[0])/((lambda[1]^2-6*lambda[1]-6)*t) < (lambda[1]*(-2*Q-4*t-2*delta+3*E[0])-lambda[1]^2*delta+lambda[1]^2*E[0]+2*E[0]-2*Q-4*t)/((lambda[1]^2-6*lambda[1]-6)*t) and (lambda[1]*(-2*Q-4*t-2*delta+3*E[0])-lambda[1]^2*delta+lambda[1]^2*E[0]+2*E[0]-2*Q-4*t)/((lambda[1]^2-6*lambda[1]-6)*t) < 1})

But, processing is very heavy and takes too much time! is there any alternative solution?

Thank you in advance.

rho := -2*K*(s+K)^2*k[e]*sinh((s+K)*x/d)/(s*d^2*(4*(s+K)^3*cosh((s+K)*h/d)*h/d^2-4*K*(s+K)*cosh((s+K)*h/d)*h/d+4*sinh((s+K)*h/d)*K))

l.mw

All variables are constant except s and x

I just noticed something funny. If I use the left side tool of Maple to define a matrix with zero entries and then change some entries and take determinant, then Maple treats zeros as symbold!!!! If I have to define my matrix completely myself, then what is the use of this tool?

I want to compute the following supremum of the function.

I'll write in Latex code.

I have the following term which I want to estimate:

\delta_1(\epsilon):= \sup_{|x|<100}\sup_{ 0<= t<1/\epsilon} \epsilon \cdot |\int_0^t [ f(x,\cos s , \sin s , p_0(t)+q_0(s))-g(x,t)]ds|

where p_0(t) is an unknown function that depends on t alone.

f(x,y_1,y_2,z):=x+(y_1^2)*z

g(x,t):= \lim_{T\to \infty} 1/T \int_0^T f(x,\cos s , \sin s , p_0(t)+q_0(s))ds

q_0(s):= \exp(-s)(q_0(0)+\int_0^s (h(x_0(0),\cos(r), \sin(r))-p_0(0))dr)

where h(x,y_1,y_2):=y_1^2.

Can someone lend me a hand?

Thanks!

 

First 12 13 14 15 16 17 18 Last Page 14 of 40