Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

The following  question I asked a long time ago.

The user Carl Love provided a nice answer regarding the counting of cycles. Back then, I was only interested in the number of cycles, but now I am also interested in finding out these cycles.

 

I noticed sand15's answer where he (or she) attempted to use the cycle basis to find all cycles. This approach is theoretically viable. However, it seems that his (her) implementation had some instances of missing cycles.  (mmcdara‘s answer is also missing some cycles)

So I brought up this question again to draw attention to it. The only distinction is that I may have specifically mentioned the use of a cycle basis method. Additionally, I may give another question:

  • How do we generate all cycles with a specific length (by cycle basis)?

 However, I remain open-minded about alternatives that do not involve a cycle basis. 

The SageMath approach for that can be referred to the link, which is actually why I remembered this question. It feels like the function in linear algebra that generates all elements through a basis would be effective.

g=graphs.OctahedralGraph()
def gen_simple_cycles(G):
    C = [frozenset(tuple(sorted(e[:2])) for e in c) for c in G.cycle_basis(output='edge')]
    for S in Subsets(C):
        T = set()
        for c in S:
            T = T.symmetric_difference(c)
        H = Graph(T, format='list_of_edges')
        if H.is_eulerian() and max(H.degree(),default=0)==2:
            yield H.eulerian_circuit(return_vertices=True)[1]
list(gen_simple_cycles(g))

[[0, 4, 2, 0],
 [0, 4, 3, 0],
 [0, 4, 5, 1, 0],
 [2, 5, 4, 2],
 [3, 5, 4, 3],
 [0, 3, 1, 0],
 [0, 2, 1, 0],
 [0, 3, 4, 2, 0],
 [0, 2, 4, 5, 1, 0],
 [0, 4, 5, 2, 0],
 [0, 4, 2, 1, 0],
 [0, 3, 4, 5, 1, 0],
 [0, 4, 5, 3, 0],
 [0, 4, 3, 1, 0],
 [0, 4, 2, 5, 1, 0],
 [0, 4, 3, 5, 1, 0],
 [0, 4, 5, 1, 3, 0],
 [0, 4, 5, 1, 2, 0],
 [2, 5, 3, 4, 2],
 [0, 3, 1, 2, 0],
 [0, 3, 4, 5, 2, 0],
 [0, 3, 5, 4, 2, 0],
 [0, 2, 4, 3, 1, 0],
 [0, 3, 4, 2, 1, 0],
 [0, 2, 5, 1, 0],
 [0, 2, 4, 3, 5, 1, 0],
 [0, 3, 1, 5, 4, 2, 0],
 [1, 5, 4, 2, 1],
 [0, 4, 3, 5, 2, 0],
 [0, 4, 5, 2, 1, 0],
 [0, 4, 2, 1, 3, 0],
 [0, 3, 4, 2, 5, 1, 0],
 [0, 3, 5, 1, 0],
 [1, 5, 4, 3, 1],
 [0, 3, 4, 5, 1, 2, 0],
 [0, 4, 2, 5, 3, 0],
 [0, 4, 5, 3, 1, 0],
 [0, 4, 3, 1, 2, 0],
 [0, 4, 2, 5, 1, 3, 0],
 [0, 4, 3, 5, 1, 2, 0],
 [0, 3, 5, 2, 0],
 [0, 2, 5, 4, 3, 1, 0],
 [0, 3, 4, 5, 2, 1, 0],
 [0, 2, 4, 5, 3, 1, 0],
 [0, 3, 5, 4, 2, 1, 0],
 [1, 3, 4, 2, 1],
 [0, 3, 1, 5, 2, 0],
 [1, 5, 2, 1],
 [1, 5, 3, 4, 2, 1],
 [0, 4, 3, 5, 2, 1, 0],
 [0, 4, 5, 2, 1, 3, 0],
 [1, 5, 2, 4, 3, 1],
 [1, 5, 3, 1],
 [0, 3, 5, 1, 2, 0],
 [0, 4, 2, 5, 3, 1, 0],
 [0, 4, 5, 3, 1, 2, 0],
 [0, 4, 3, 1, 5, 2, 0],
 [0, 4, 2, 1, 5, 3, 0],
 [0, 2, 5, 3, 1, 0],
 [0, 3, 5, 2, 1, 0],
 [1, 3, 4, 5, 2, 1],
 [1, 3, 5, 4, 2, 1],
 [1, 3, 5, 2, 1]]

Total: 63 cycles.

 

Hi,

I can build my trigonometric circle, but I want to display irrational values ( instead of decimal values) in the tickmarks option. ideas? P.S : My code is quite long, because I wanted to display amplitudes in an optimal way.

 CERCLETEST.mwCERCLETEST.mw

Hi,

I previously wrote and ran a program with Maple 2020, but I deleted Maple 2020 and now I installed 2023, but that program runs with an error.

Download sssss.mw

eta/2*diff(f, eta) + (diff(f, eta, eta) + lambda*diff(g, eta)/g)*g^lambda=0,

g*diff(g, eta) + sigma*eta*diff(g, eta)=0,here lambda,sigma positive parameters initial conditions f'(0)=0,g'(0)=0,f' goes to 1 at eta goes to infinity ,g' goes to 1 at eta goes to infinity

can you solve this coupled nonlinear differential equations  using homotopy analysis method

I need tutoring on some calculus basics.

y(x)

y(x)

(1)

diff(y(x), x)

diff(y(x), x)

(2)

(Int = int)(diff(y(x), x), x)

Int(diff(y(x), x), x) = y(x)

(3)

(Int = int)(diff(y(x), x), x = a .. b)

Int(diff(y(x), x), x = a .. b) = int(diff(y(x), x), x = a .. b)

(4)

The right-hand side below is the desired evaluation.

(`@`(value, rhs))(Int(diff(y(x), x), x = a .. b) = int(diff(y(x), x), x = a .. b)) = eval(int(diff(y(x), x), x), x = b)-(eval(int(diff(y(x), x), x), x = a))

int(diff(y(x), x), x = a .. b) = y(b)-y(a)

(5)

Download Eval_definite_integral.mw

Maple does integrate the indefinite integral but not a definite version of it.

I assume that this is not possible without additional assumptions on y(x).

I tried to assume the properties continuous and differentiable.

Anything else that can be done/assumed to force evaluation the way I want?

Here is an example of how such integrals can come about

B:=5

N:=1

R:=1/2

x = sum(R^g*product(-Br + 1 + Ng, r = 1 .. g - 1)/(B^g*g!), g = 0 .. infinity)

when i press enter it shows this

R := 1/2

1/2

(1)

B := 5

5

(2)

N := 1

1

(3)

x = sum(R^g*(product(-Br+1+Ng, r = 1 .. g-1))/(B^g*factorial(g)), g = 0 .. infinity)

x = 1/((-Br+1+Ng)*exp((1/10)*Br-1/10-(1/10)*Ng))

(4)

``

Download brn.mw

I need him to show it

x=1.090970406879337658

I would like to write this equation:

That is a symbol that I want to be able to use (the S can be added after inserting the symbol). Sometimes, this helps the students to comprehend what they are doing. It could be added the symbols for double and triple integral. So it is some kind of suggestion, but for the moment, it is the actual symbol I would like to have.

I think that I could write it in LaTeX but I don't know if I can do it in Maple and ask him to convert it inside the document.

Thank you in advance for your help.

Hello everyone.

I want to  choose the  numbers among the list A which are for example congruent to 1 mod 3

A = {3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101}

Hi,

I want to create graphical charts, but I'm having trouble with the Tabulate command. Any ideas? Thank you.

FicheGraphique.mw

Hello everyone. 

I have the followinf code but when I try to plot I am receiver an error. Please, someone coulg give me a hint?

A := 20

B := 10.37

P := 60*24*60

omega := 2*Pi/P

alpha := 0.7*10^(-6)

phi := 3.61

Profundidade := 0.1;

ntotal := 1

theta(z, t, k, C) :=A + sum(B*exp(z*sqrt(1/2*omega*m*C/k))*sin(omega*m*t - z*sqrt(1/2*omega*m*C/k) + phi), m = 1 .. 5);

SensibilidadeK := (z, t, k, C) -> diff(theta(z, t, 1, 1), k);
GrafE := plot(eval(SensibilidadeK*(Profundidade, t, k, C), [k = 1, C = 1]), t = 0 .. 86400, color = blue, legend = k, labels = ["Tempo [s]", "Coeficiente de Sensibilidade"], labeldirections = ["horizontal", "vertical"])

this is the error that I received: Warning, expecting only range variable t in expression SensibilidadeK*(.1, t, 1, 1) to be plotted but found name SensibilidadeK

I cannot view 3d graphics with my version of Ubuntu 20.04. I've updated all my computer's graphics card drivers and the problem persists. If I run without hardware acceleration, nothing changes; no visualization and no production possible.
Do you have any ideas for solving this problem? Maple uses OpenGL libraries for 3D production and visualization, and these libraries are installed on my computer. Would installing mesa solve the problem, for example?

Thanks in advance.

I try to understand why Maple throws 2 times an error but on a third attempt (with the same input) output is returned. Is that a new mechanism of suppression of error or warning messages and returning output up to a point where evaluation cannot further be performed.

With -sin instead of cos Maple returns output immediately. Does this mean that there is no information to the user available (yet) for this particular case?

three_times_entering_the_same.mw

I want to get from equation 27 to equation 30?

And then solve equation 30? (by inserting the 31 and 7 relations and the 8 relations)

latt01.docx

A very easy example: 

solve({a > 0, ln(a) + ln(1 + a) >= 0}, a);
 = 
                        /    2         \ 
                        |---------- < a| 
                       <  (1/2)         >
                        |5      + 1    | 
                        \              / 

The output is . Clearly,  is also a solution to this inequality, so the solutions have been lost. But there is no warning message. Why?

Respected fellows, greetings!
I wonder if there is a way to increase the length of the legend in maple? I can easily do it in mathematica but I failed to find a way to do the same in maple. It would be so nice if someone could guide me about that please.

First 188 189 190 191 192 193 194 Last Page 190 of 2217