## Christoffel symbols and Ricci tensor and scalar....

Asked by:

I am a little bit clueless here, about how to use maple to calculate Christoffel symbol and Ricci tensor and scalar?

I read the help, but it got me confused; I have the metric ds^2 = du*dv+F(y,z)du^2+dy^2+dz^2

It's not Minkowski nor Cartesian, so how to use maple to calculate these symbols?

I am sure it's easy, but I didn't quite follow maple's instructions.

## Plotting the free space diagram (Fréchet distance)...

Asked by:

Hello!

I am interested in plot the so-called "free space diagram", please see https://en.wikipedia.org/wiki/Fr%C3%A9chet_distance for a formal definition. Essentially, given two curves (i.e., two polygonal from [0,1] to the plane) the "free space" is the points (s,t) in the square [0,1]x[0,1] such that the distance from P(s) to Q(t) (if P and Q are the parametrizations of the curves) is less or equal than a prefixed epsilon>0. An image can be the following (the free space is, in the image, the area not colored in black):

I have found nothing about this topic in Maple, any suggestion will be welcome!

Thanks!

## One-Liner Crashes Maple 2017...

Asked by:

In Maple 2017, a simple one-liner can crash the current worksheet (in any mode with any text type it seems).

z[x]:=z

z[x]:=z(x)

Note that z and x can be any two letters, and that you can replace z[x] with the equivalent z+(ctrl shift _)+x (which displays as zx)

## Decomposition fields of polynomials and generator ...

Asked by:

Hi all. I have two questions about polynomials over Q.

i) Let f,g be polynomials over Q. How to show (with Maple) that the decomposition field of f is included in the decomposition field of g?

ii) Let f be a polynomial of degree n  over Q with Galois group C_n, the cyclic group of order n. Then, there is a polynomial P with coefficients in Q, of degree n-1, s.t. the iteration: u0=some root of f, u_{k+1}=P(u_k) gives all the roots of f; how to find P (with Maple)?

Thanks in advance.

## plotting x+2y=3. Just 10 points...

Asked by:

How do I plot just 10 points of the equation?

I got ..

with(plots):
a := x+2*y = 3;
implicitplot(a, x = -5 .. 5, y = -5 .. 5, style = point);

but I only need 10 points. How do I do that? Thank you

Asked by:

## Loop appearing before else in an if statement - se...

Asked by:

Does anyone know why the following gives an error of invalid loop statement termination?

if true then
for i from 1 to 2 do
end do
else
end if

while putting a semicolon after `end do' fixes it.

This seems to only occur in if else statements, when end do appears directly before the else

## Double integration and summation. How to speed up?...

Asked by:

Hello.

Regarding to my previous question I'd like to speed up calculations of the expression.

```restart;
tt := -0.689609e-3; T_c := .242731; mu := .365908; k := 1;
R1 := a*tanh((a^2-mu)/(2*T_c))*ln((2*a^2+2*a*q+q^2-2*mu-(I*2)*Pi*N)/(2*a^2-2*a*q+q^2-2*mu-(I*2)*Pi*N))/q-2;
R2 := Int(R1, a = 0 .. 10000);
R3 := q*ln((-q^2-k^2+mu+I*(2*N*Pi*T_c-(2*m+1)*Pi*T_c)+k*q)/(-q^2-k^2+mu+I*(2*N*Pi*T_c-(2*m+1)*Pi*T_c)-k*q))/(k*(tt+R2));
R4 := Sum(R3, N = -100 .. 100);
m := 1;
R5 := Int(R4, q = 0.1e-2 .. 10000);
R6 := evalf(R5);```

Here I have integration procedure inside the expression R3, then the summation over the integer parameter N and then finally the integration again.

Is it possible to speed up calculations of this cumbersome expression? Or actually was I correct to write this simple code?

Thank you in a advance.

## Update standings...

Asked by:

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.

## Problem with Physics:-Define...

Asked by:

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?

## How to get a real number output. ...

Asked by:

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.

## How to code an if statement with a variable not eq...

Asked by:

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;

## How to get the computation time when I use "Grid:-...

Asked by:

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.

## How do I compute a function on imported data table...

Asked by:

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.

## How to show a Matrix and a Plot in a Pop-Up Window...

Asked by:

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

 First 11 12 13 14 15 16 17 Last Page 13 of 40
﻿