MaplePrimes Questions

Hello.

I am very new to Maple. Many this are great, but I do not understand how maple deals with, especially, radiological units. In particular regarding joules [J] wich Maple seems to have alt least three types:

1) J - in relation to work

2) J(radiation) in relation to Gy (Gray) J/kg

3) J(dose_equivalent_index) in relation to Sv also J/kg

Why does Maple distinguish between these "joules"? As a phycisist they are all (well maby not entirely for Sv) equal to me. How can I make Maple treat them all at the "same joule"?

I have tried the following first:

with(Units[Standard]) and

with(Units[Natural])

Best,

Carsten

Let S1: x^2 + (y - 2)^2 + (z + 1)^2 = 29 be a sphere and two points A(0, 0, 4), B(6, -2, 6); the line d passing through point C(4, -8, 4) and have direction v=(1, -1, 2). Find the point M such that M lies on the sphere S1, the angle AMB equals to 90 degree and distance from M to the line d is minimum

If I understand correctly, both of 

int(RETURN(is(y::positive)), y = 0 .. x) assuming 0 <= x, x < 1;
int(RETURN(coulditbe(y = 1)), y = 0 .. x) assuming 0 < x, x < 1;

should output `not`(true). However, Maple simply returns true for the second one. 
Isn't this result incorrect? Or am I missing something?

I would like to remove isomorphs from some graphs. That is to filter out non-isomorphic graphs.

graph_list := [GraphTheory:-CompleteGraph(3), GraphTheory:-PathGraph(3),Graph({{a,b},{b,c},{c,a}})]:

# Create a table to store non-isomorphic graphs
non_isomorphic_graphs := table():

# Counter for indexing the table
counter := 1:

# Iterate over each graph and check if it is isomorphic to any of the stored graphs
for g in graph_list do
    is_isomorphic := false:
    for key in indices(non_isomorphic_graphs,'nolist') do
        if GraphTheory:-IsIsomorphic(g, non_isomorphic_graphs[key]) then
            is_isomorphic := true:
            break:
        end if:
    end do:
    if not is_isomorphic then
        non_isomorphic_graphs[counter] := g:
        counter := counter + 1:
    end if:
end do:
op(non_isomorphic_graphs)
DrawGraph~(non_isomorphic_graphs,  layoutoptions = [neutral_color = "pink", initial = spring])

 

A canonical form is a labeled graph Canon(G) that is isomorphic to G, such that every graph that is isomorphic to G has the same canonical form as G. I noticed that Maple has a function called CanonicalGraph. Can this function achieve the effect I want? I can easily achieve this by combining the  canonical form and property of sets  in  Sage.

graph_list = [Graph([(0, "a"), ("a", 2), (2, 0)]),graphs.PathGraph(3), graphs.CompleteGraph(3)]
non_isomorphic_graphs_labels = {g.canonical_label().copy(immutable=True) for g in graph_list}

 

 

An underlying motivation:My collaborators and I designed generation rules (algorithms) for 1-planar 4-trees;see https://arxiv.org/abs/2404.15663. Since the generating process is based on 1-planar embeddings, it will ultimately require filtering non-isomorphic graphs among a list of embeddings. I would be especially delighted to see that someone implement our algorithm in the future. Currently, I am stuck on handling some labeling details. It is somewhat similar to generating Apollonian networks (planar 3-trees). However, since its simplicial vertices are only two, the growth rate will not be too fast as the number of vertices increases.

I need to evaluate a variable inside the function definition in the moment it is defined and not every time it is called. Is there a way around?

a:=3;
f := x-> a*x;
f(t);

a:=4;
f(t);

I want the function "f" to be 3*x even if "a" is modified after the declaration. In Mathematica I am used to the so called immediate assignmet(=) and delayed assignment(:=) for which I cannot find an equivalent command in Maple. 

Any help is appreciated!

im trying to write differential quadrature method i have successfully  generated system of equations using code but now im stuck with rk4 method to solve these equation in a loop kindly give me suggestions or modify the code

restart

with(orthopoly)

N := 5

5

(1)

P := proc (n, x) options operator, arrow; orthopoly[P](n, 2*x-1) end proc

P_N := simplify(P(N, x))

252*x^5-630*x^4+560*x^3-210*x^2+30*x-1

(2)

localroots := fsolve(P_N = 0, x, complex)

HFloat(0.04691007703066799), HFloat(0.23076534494715836), HFloat(0.4999999999999997), HFloat(0.7692346550528439), HFloat(0.9530899229693298)

(3)

for i to N do assign(x[i] = localroots[i]) end do

PRime := diff(P_N, x)

1260*x^4-2520*x^3+1680*x^2-420*x+30

(4)

for i to N do for j to N do if i <> j then a[i, j] := (eval(PRime, x = x[i]))/((x[i]-x[j])*(eval(PRime, x = x[j]))) else a[i, j] := (1-2*x[i])/(2*x[i]*(x[i]-1)) end if end do end do

u := proc (i) local u_x, expr, j; u_x := add(a[i, j]*u[j], j = 1 .. N); expr := -u[i]*u_x+x[i]; expr end proc; odes := [seq(u(i, [seq(u[j], j = 1 .. N)]), i = 1 .. N)]; for i to N do assign(o[i] = odes[i]) end do; for i to N do printf("u_%d = %s\n", i, convert(u(i), string)) end do

u_1 = -u[1]*(-10.1340811913091*u[1]+15.4039041703445*u[2]-8.08708750877537*u[3]+3.92079823166652*u[4]-1.10353370192667*u[5])+.046910077030668
u_2 = -u[2]*(-1.92051204726391*u[1]-1.51670643433575*u[2]+4.80550130432862*u[3]-1.85711605328765*u[4]+.488833230558754*u[5])+.230765344947158
u_3 = -u[3]*(.602336319455661*u[1]-2.87077648466948*u[2]-1.11022302462516e-015*u[3]+2.87077648466942*u[4]-.602336319455684*u[5])+.5
u_4 = -u[4]*(-.488833230558737*u[1]+1.85711605328767*u[2]-4.8055013043286*u[3]+1.51670643433578*u[4]+1.92051204726404*u[5])+.769234655052844
u_5 = -u[5]*(1.1035337019266*u[1]-3.92079823166643*u[2]+8.08708750877511*u[3]-15.4039041703442*u[4]+10.1340811913086*u[5])+.95308992296933

 

initial_conditions := [0.1e-1, 0.2e-1, 0.3e-1, 0.4e-1, 0.5e-1]

for i to N do printf("Initial condition for u_%d: u_%d(0) = %f\n", i, i, initial_conditions[i]) end do

Initial condition for u_1: u_1(0) = 0.010000
Initial condition for u_2: u_2(0) = 0.020000
Initial condition for u_3: u_3(0) = 0.030000
Initial condition for u_4: u_4(0) = 0.040000
Initial condition for u_5: u_5(0) = 0.050000

 

dt := .1

tf := 1

"local o_old;  o_old := Vector(n);    #` Loop to initialize o[i]old values`  for i from 1 to n do      o_old[i] := initial_conditions[i];      printf("Initial condition for u_%d: u_%d(0) = %f\\n", i, i, initial_conditions[i]);  end do:    time := t0;  while time < tf do  for i from 1 to n do      k[1, i] := dt * o[i](time,o_old[i]);   for i from 1 to n do  k[2,i]:=dt*o[i](time + dt/(2), o_old[i]+   (k[1, i])/(2));  end do:  for i from 1 to n do  k[3,i]:=dt*o[i](time+ o_old[i]+ (  k[1, i])/(2));  end do:  for i from 1 to n do  k[4,i]:=dt*o[i](time+dt,o_old[i]+k[1,i]);  end do:  for i from 1 to n do    0 _new[i]:=o_old[i]+(k[1,i]+2 *k[2,i]+2*k[3,i]+k[4,i]);  end do:  time := time + dt;     end do;      "

Error, illegal use of an object as a name

"local o_old;  o_old := Vector(n);    #` Loop to initialize o[i]old values`  for i from 1 to n do   o_old[i] := initial_conditions[i];   printf("Initial condition for u_%d: u_%d(0) = %f\\n", i, i, initial_conditions[i]);  end do:    time := t0;  while time < tf do  for i from 1 to n do   k[1, i] := dt * o[i](time,o_old[i]);  end do:  for i from 1 to n do  k[2,i]:=dt*o[i](time + dt/2, o_old[i]+ (k[1, i])/2);  end do:  for i from 1 to n do  k[3,i]:=dt*o[i](time+ o_old[i]+ (  k[1, i])/2);  end do:  for i from 1 to n do  k[4,i]:=dt*o[i](time+dt,o_old[i]+k[1,i]);  end do:  for i from 1 to n do  0 _new[i]:=o_old[i]+(k[1,i]+2 *k[2,i]+2*k[3,i]+k[4,i]);  end do:  time := time + dt;   end do;      "

 
 

NULL

Download dq_code.mw

I have a Prime Version Abo. On my iPhone works everyrhing fine. But on IPad there is a Limit of 5 step by step solutions. Same AppleID. What's the Problem?

Can the display of an object o in Maple, i.e.
> o;
                                                      display of the object
be controlled in a standard Maple worksheet, e.g. with Typesetting or something similar?

Hello, 

I have come across a problem in Maple, when I try plotting af slope field from my differential equation. 

I have tried different ways of defining the ODE, but when I use it in the command of "linjeelementer" (Danish for line elements - It's a command that's part of a package called "With (Gym)" in Maple, it gives me the error: Error, (in DEtools/DEplot/CheckDE) - Derivatives must be given explicitly. 

I don't understand what derivatives I must "give explicitly"?

Translation of the relevant sentences if anyone needs it when looking at the screenshot:

"I need to draw a slope field for the differential equation along with the solution curve for the population growth in India after 1960.

I define the differential equation:
ODE := -0.000032229*y^2 + 0.065843*y - 15.103"

"I am drawing the slope field for the differential equation along with the solution curve for the population growth in India after 1960, i.e., the solution curve that passes through the point (0,449):I am drawing a slope field for the differential equation along with the solution curve for the population growth in India after 1960, i.e., the solution curve that passes through the point (0,449):
linjeelementer(ODE, y(t), t = 0 .. 350, y = 0 .. 2000)"

Is there a way to change the font on the help pages?               

restart;
with(geometry);
with(plots);
_EnvHorizomtalName = 'x';
_EnvVerticalName = 'y';
_local(D);
line(delta, y = 1/3*x - 2, [x, y]);
line(deltap, y = (-1)/4*x + 1, [x, y]);
line(D, y = 3*x - 5, [x, y]);
point(S, 3, 0);
omega := Pi/3;
intersection(P, delta, D);
intersection(Pp, deltap, D);
projection(H, S, delta);
projection(K, S, deltap);
projection(M, S, D);
circle(c1, [H, K, M], 'centername' = O1);
display*[textplot*([[coordinates(S)[], "S"], [coordinates(P)[], "P"], [coordinates(H)[], "H"], [coordinates(K)[], "K"], [coordinates(M)[], "M"]], font = [times, bold, 16], align = [above, right]), draw*([delta(color = blue), deltap(color = blue), D(color = red), c1(color = black), S(color = black, symbol = solidcircle, symbolsize = 16), P(color = black, symbol = solidcircle, symbolsize = 16)], scaling = constrained, axes = none, view = [-15 .. 15, -15 .. 15])];
               [                /[             [9  -13     ]  
plots:-display [plots:-textplot |[[3, 0, "S"], [-, ---, "P"], 
               [                \[             [8   8      ]  

  [33  -9     ]  [52  4      ]  [9  2     ]]  
  [--, --, "H"], [--, --, "K"], [-, -, "M"]], 
  [10  10     ]  [17  17     ]  [5  5     ]]  

                                                  \              
  font = [times, bold, 16], align = [above, right]|, geometry:-d\
                                                  /              

  raw ([delta(color = blue), deltap(color = blue), 

  D(color = red), c1(color = black), 

  S(color = black, symbol = solidcircle, symbolsize = 16), 

  P(color = black, symbol = solidcircle, symbolsize = 16)], 

  scaling = constrained, axes = none, view = [-15 .. 15, -15 .. 15])];
  display*[textplot*([[3, 0, "S"], [9/8, -13/8, "P"], [33/10, -9/10, "H"], [52/17, 4/17, "K"], [9/5, 2/5, "M"]], font = [times, bold, 16], align = [above, right]), draw*([delta(color = blue), deltap(color = blue), D(color = red), c1(color = black), S(color = black, symbol = solidcircle, symbolsize = 16), P(color = black, symbol = solidcircle, symbolsize = 16)], scaling = constrained, axes = none, view = [-15 .. 15, -15 .. 15])]
Why the program will not run; Thank tou.

Hello, 

This morning when i tried to open my Maple file, it didn't work and instead wrote "There were problems during the loading process. Your worksheet may be incomplete". Is there anyone that can help me save the document? 

I read in here that i may be due to something in the file but i do not know how to remove it? 

I caught aome serious errors with Maple 22 calculating the Ricci tensor not only wrong for known metrics, but also producing garbage entries in the Ricci tensor e.g. bare thetas where only trigonometric functions of angles are expected. Completely wrong.

That aside,

I need to replace the built in Ricci tensor calculation in Maple and therefore need maple to contract the Christoffel Symbols.

d_[alpha](Christoffel[~alpha, mu, nu]) - d_[nu](Christoffel[~alpha, mu, alpha]) + Christoffel[~beta, mu, nu]*Christoffel[~alpha, beta, alpha] - Christoffel[~beta, mu, alpha]*Christoffel[~alpha, nu, beta]

How do I tell Maple to contract thae alpha and beta indices in above expression, without crudely having to set up Summing.?

Hi,

I'm trying out the 2024 version of Maple and I'm getting the following warning message:

Warning, not a built-in function (`rtable_alias`)

which I didn´t get for the 2023 version. I have no clue where it is coming from since it happens even when I start a new worksheet:

 

 

I've also attached print outs of the same worksheets (from Maple help examples and from Maple Portal), one using Maple 2023 version and the other one using Maple 2024 version so youcould see the warning and some other problems.

I really appreciate if someone would have an idea of what is going on here. Thanks very much in advance.

interpolation_2023.pdf

interpolation_2024.pdf

optimization_2023.pdf

optimization_2024.pdf

Download Ode_New_TWO_phase.mw

I want like this plots here two phase are there boundary is -2 to0 and 0 to 2

f(±2)=0,g(±2)=0,f(0)=1,h(±2)=1,H(±2)=1

First 93 94 95 96 97 98 99 Last Page 95 of 2416