## get term from table...

have table like table(symmetric, [() = x]) from other code not mine, strange syntax

how to extract x from table thanks

## Write output of for loop to .txt file with additio...

I have the following code. I want to do the modify it so that:

1. The outputs of each for loop are merged in such a way that the outputs from the first loop (Es) that are also outputs of the second loop (Fs) are removed from the outputs of (Es).

2. The resulting outputs G= .... are saved to a text file, one to each line.

3. In between each output, I want to add 5 lines of text and a blank line, say

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

so that in the text file, the format is (e.g.)

G={{1,2}};

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

G={{1,2},{1,3}};

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

etc.

What is the easiest way to accomplish this?

```restart;

with(GraphTheory):
n:= 4:
L:= NonIsomorphicGraphs
( n,
output=iterator,
outputform=graph):
Es:= Array
( [ seq
(  Edges( L() ),
j=1..NonIsomorphicGraphs
( n,
output=count
)
)
]
):

M:= NonIsomorphicGraphs
( n-1,
output=iterator,
outputform=graph):
Fs:= Array
( [ seq
(  Edges( M() ),
j=1..NonIsomorphicGraphs
( n-1,
output=count
)
)
]
):
;

numelems(Es):
for i from 1 to numelems(Es) do G:=Es[i]:  od;

numelems(Fs):
for i to numelems(Fs) do G := Fs[i]; od;

```

## How to get the analytical function from a piecewis...

Hey everyone !

I want to get the analytical function from a piecewise differential equation defined on 6 intervals but Maple returns me a numerical result... I think it hides a Runge Kutta method.. However, it returned me an analytical function for a similar piecewise differential equation defined on 3 intervals.

Do you know how I could get the analytical function defined on the 6 intervals ?

Thank you very much for your time !

Alex

 >
 (1)
 >
 >
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 >
 (7)
 >
 (8)
 >
 (9)
 >

## Plot the integral of a discrete function...

 >
 (1)
 >
 (2)
 >
 >
 >
 >
 (3)
 >
 (4)
 >
 (5)
 >
 >

Hey everyone!

I would like to plot the integral of a discrete function. For simplicity, I choose the function sin(x) between –Pi and Pi, which has as an integral -cos(x). I tried to implement that in Maple using the Trapezoidal rule, but the result is simply wrong. Any help would be much appreciated!

## Use of the Attractor function...

I have the following Maplesoft code:

with(ImageTools);

with(IterativeMaps):
Crystal, xrange, yrange := Attractor([x, y], [[1/2 - y/2, x/2], [y/2 + 1/2, 1/2 - x/2], [x/2 + 1/4, y/2 + 1/2]], height = 400, width = 400, xmin = -1, xmax = 2, ymin = -1, ymax = 1, fixview = true, [0, 0], [0.33, 0.33, 0.33], greenexpression = 1 - 1/(1/(1 - G) + 1), iterations = 2500000);
xrange, yrange;
-1 .. 2, -1 .. 1

ColouringProcedures:-HueToRGB(Crystal);
0.

Embed(Crystal);

which yields the following image:

However, I should be seeing the following image:

Any help would be appreciated. Thanks!

## Hox to justify a Basis of R¨2 vectorial space...

Justify that 2 vectors (1,1) and (1,2) are an R² base; How to write calculations correctly ?
<x, y> = lambda*<1, 1> + mu*<1, 2>:
solve({lambda+mu=x,lambda+2*mu=y},{lambda,mu}):
<x, y> := (2*x - y)*<1, 1> + (-x + y)*<1, 2>:
Thank you.

## Error in ODE solver...

I get this error when I try to use the ODE numeric solver, can anybody help me figure out what Im doing wrong?

## how product Riemann tensor to itself...

hi guys,

I have a question about computing reimann tensor in general relativity.

suppose we have schwarzschidl metric: ds^2=-(1-2*m*(r^-1))*dt^2+(1-2*m*(r^-1))^(-1)*dr^2+r^2*dtheta^2+r^2*sin^2(theta)*dphi^2.

I want to caclulate R[alpha,beta,mu,nu]*R[~alpha,~beta,~mu,~nu] where R[alpha,beta,mu,nu] is covariant form of Reimann tensor and also R[~alpha,~beta,~mu,~nu] is the contravariant form of Riemann tensor. I also want to calculate same thing for weyl tensor. please guide me.

with best regards.

## Suggestion: improvement of help pages in future...

by: Maple

A simple suggestion...

I would appreciate being able to open multiple help pages simultaneously instead of just one.
This seems to me particularly interesting when you have to browse back and forth between several related items.

## How to rebuild commutators...

How to reconstruct commutators like for example in Drinfeld associators (see (4.5) in https://arxiv.org/pdf/1310.3259.pdf)?

We have as computed in Drinfieldstuff_display.mw (note to run this it requires loading HyperInt package https://arxiv.org/pdf/1403.3385.pdf):

H[2] := a^2*(e[0]*e[1] - e[1]*e[0])*zeta[2]

H[3] := zeta[3]*a^3*(((e[0]*e[1]^2 + e[0]^2*e[1] - (2*e[1])*e[0]*e[1]) + e[1]^2*e[0]) - (2*e[0])*e[1]*e[0] + e[1]*e[0]^2)

H[4] := zeta[2]^2*a^4*((((((4*e[0])*e[1]^3 + (12*e[0])*e[1]*e[0]^2 - (5*e[1])*e[0]^2*e[1] - (4*e[1])*e[0]^3) - (4*e[1]^3)*e[0]) + (7*e[1])*e[0]*e[1]*e[0] + (12*e[1]^2)*e[0]*e[1] + (3*e[0])*e[1]*e[0]*e[1] - (12*e[0]^2)*e[1]*e[0] - (5*e[0])*e[1]^2*e[0] + e[0]^2*e[1]^2 - (12*e[1])*e[0]*e[1]^2) - e[1]^2*e[0]^2) + (4*e[0]^3)*e[1])/10

And we want maple rebuild them as  commutators as below ([x,y]=xy-yx). Correspondingly:

H[2] :=zeta[2] [e[0] , e[1] ]

H[3] :=zeta[ 3] ( [e[0] , [e[0], e[1] ]] − [e[1] , [e[0] , e[1] ]] )

H[4] :=zeta[4] [e[0] , [e[0], [e[0] , e[1]]]] −1/4* [e[0] , [e[1] , [e[0] ,e[1] ]]] + [e[1] , [e[1] , [e[0] , e[1] ]]] + 5/4*[e[0], e[1]] ^2

Does anyone know how to do it?

## Waterfall Chart

Maple

In the plotting guide I didn't see a waterfall chart so I created a procedure.
If anyone has a more efficent, better or alternate way please feel free to add.

 (1)

## unable to convert to an explicit first-order syste...

Hi

I got the error like this unable to convert to an explicit first-order system

please anyone can help me to solve this

I am attaching the worksheet

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 >