MaplePrimes Questions

Hi,

Here is the code I would like to complete:

with(plots):
theta:= s -> -2*Pi*n*s/ell;
v:=s->piecewise(And(0<=s,s<=ell/2), c*s, ell/2<s, c*(ell-s));
ell:=1;
c:=1;
n:=2;
spacecurve([cos(theta(s)),v(s),sin(theta(s))],s=0..ell,colorscheme = ["valuesplit",???????]);

What to put in place of the question marks so that the color of the curve is, for example, red if s is between 0 and ell/2, and green if s is between ell/2 and ell?

Thanks.

Dear all

I have a code that compute the elements of the sigma algebra generated by C in the domain X 
If X is a discrete set and C is also a discrete set 

I get a good results 

But in change X to be an interval and C will be set of three elements

No result obtained 

sigma_algebra.mw

Thank you

Where do you think label="dontexpand" is coming from in the following? I never seen this before. Is this a bug?

When using PDEtools:-Solve no such error shows up. Worksheet below

998948

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1462 and is the same as the version installed in this computer, created 2023, June 10, 2:26 hours Pacific Time.`

restart;

998948

sol:=sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0;
solve(sol,y(x))

sum((-2*_R^2+1)*ln(y(x)/x-_R)/(6*_R^2+4*_R-1), _R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0

Error, (in solve) cannot solve expressions with sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1,label = "dontexpand")) for y(x)

PDEtools:-Solve(sol,y(x))

y(x) = exp(-c[1])+_R*x

 

Download dontexpand_june_10_2023.mw

Maple has a myriad of kernel functions for doing different kinds of symbolic replacements to whole expressions: subs, eval, algsubs, applyrule, `simplify/siderels`, `simpl/eval`,  Physics:-Substitute, MTM:-subs, MmaTranslator:-Mma:-ReplaceRepeated, PDEtools:-dsubs, liesymm:-wsubs, student:-powsubs, etc. But if I need to apply transformation rules over and over again until the result no longer changes within  iterations in a singular clean built-in command (so, without explicit while / until / MmaTranslator:-Mma:-FixedPoint) elegantly, only four can be called: eval['recurse']algsubs, applyrule, MmaTranslator['Mma']['ReplaceRepeated']. The difference between applyrule and algsubs has been elucidated in this help page:

applyrule … does not do mathematical transformations as algsubs does.

However, I cannot find any explanation for the potential distinctions between eval['recurse'] and MmaTranslator['Mma']['ReplaceRepeated'] in their documentation. Does anyone know?

Besides, is it possible to use an "operator" form (like ) instead of a "functional" form (like ) to perform (single or repeated) substitutions in Maple?

 Why is the (solve or dsolve command) not executed?

Sam.mw

How to solve ordinary differemtial equation system with initial conditions and boundary conditions. Here, some initial conditions are unknown variables. So how to find these  values of parameters.

eq1 := diff(f(x), x, x, x)+(1/2)*cos(alpha)*x*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x)) = 0;

eq2 := diff(g(x), x, x)+diff(g(x), x)+(diff(g(x), x))*(diff(h(x), x))+cos(alpha)*x*(diff(g(x), x))+sin(alpha)*f(x)*g(x) = 0;

eq3 := diff(g(x), x, x)+diff(h(x), x, x)+1/2*(cos(alpha)*x+sin(alpha)*f(x)) = 0

ics:=f(0)=0, f'(0)=1, f''(0)=a[1], g(0)=1, g'(0)=a[2], h(0)=1, h'(0)=a[3];

bcs:=f(x) , g(x), h(x) tends to 0 ad x tends to infinity

How can one set their own symbols for DynamicSystems continuoustimevar?  If I try to use DynamicSystems:-SystemOptions('continuoustimevar'=x): or DynamicSystems:-SystemOptions('continuoustimevar'=y): Maple complains that these letters are already assigned. Why can not one have their own choice of which letters to use?  Is there a workaround?


 

858904

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=t):

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=x):

Error, (in DynamicSystems:-SystemOptions) cannot assign x to continuoustimevar, already assigned to statevariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=y):

Error, (in DynamicSystems:-SystemOptions) cannot assign y to continuoustimevar, already assigned to outputvariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=XXXXXX):

 


 

Download dynamics_june_9_2023.mw

 

Dear all 

I have a simple equation that can be solved by hand. But, can Maple solve this equation 

cos(x)> a,   with a :  real number.

Can we get all possible solution with different values of a, 

Equation.mw

thank you for your help  

Can one evaluate dirac spinor products using the Standard Model package? How far can I take the evaluation in the package? See maplesheet with commentary.

Evaluating_spinor_products_with_the_standard_model_package.mw

When adding singsol=all to this ode in the first example, dsolve returns nothing. But it should have returned the general solution if it can not find singular solution. This is what it does always as can be seen from the second example given below.

Why did dsolve return nothing in the first example? Is this a bug?

319824

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

319824

ode:=y(x)=x*diff(y(x),x)+ a*diff(y(x),x)/(sqrt(1+diff(y(x),x)^2));
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x),singsol=all);

y(x) = x*(diff(y(x), x))+a*(diff(y(x), x))/(1+(diff(y(x), x))^2)^(1/2)

y(x) = x*c__1+a*c__1/(c__1^2+1)^(1/2)

"sol_2 := "

ode:=diff(y(x),x)^2-(1+2*x*y(x))*diff(y(x),x)+2*x*y(x) = 0;
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x), singsol=all)

(diff(y(x), x))^2-(1+2*y(x)*x)*(diff(y(x), x))+2*y(x)*x = 0

y(x) = c__1*exp(x^2), y(x) = x+c__1

y(x) = c__1*exp(x^2), y(x) = x+c__1

 

Download missing_sol.mw

I have a question regarding the combstruct package, to be more precise, the specification of a combinatorial species as it is described here:

https://www.maplesoft.com/support/help/maple/view.aspx?path=combstruct%2fspecification

Is there any available constructor to generate the functorial composition of two species? For example, a simple graph can be seen as a subset of the set of all 2-element subsets of a given node set. This is nothing else than the functorial composition of E*E with E_2*E, where E denotes the species of sets and E_2 the species of 2-element sets. Thus, the species of subsets can be expressed as E*E and the one of 2-element subsets as E_2*E. Written in the Magma syntax, it should be the functorial composition of Prod(Set(Z),Set(Z)) with Prod(Set(Z,card=2),Set(Z)). Applying the count-function, it should produce the series https://oeis.org/A000088.

How can I achieve that?

How to find series values.I got this error.Please Help.

Maple code for the problem is

TFBE.mw

i have a question. can maple recognize similar expressions in an equation? for example can maple recognize these two silimiar expressions in the picture below and give it ? I want maple itself recognize similar expressions, not i give an input to find similiar results. thnx in advance

A chordal graph is one in which all cycles of four or more vertices have a chord, which is an edge that is not part of the cycle but connects two vertices of the cycle. A perfect elimination ordering in a graph is an ordering of the vertices of the graph such that, for each vertex v, v and the neighbors of v that occur after v in the order form a clique.  A graph is chordal if and only if it has a perfect elimination ordering.

I  use IsChordal  to test whether the lexicographic product of  two graphs g1,g2 is a chordal graph. It returned true and provided a perfect elimination sequence 1, 2, ..., 30. However, vertices of s  are "1:1", "1:2", ..., "10:3", rather than using Arabic numerals. Therefore, it is difficult for me to extract useful information from the perfect elimination sequence.

with(GraphTheory):
g1:=PathGraph(10):
g2:=CycleGraph(3):

s:=LexicographicProduct(g1,g2):

IsChordal(s,eliminationordering=true)

true, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]

(1)

DrawGraph(s)

 

Vertices(s)

["1:1", "1:2", "1:3", "2:1", "2:2", "2:3", "3:1", "3:2", "3:3", "4:1", "4:2", "4:3", "5:1", "5:2", "5:3", "6:1", "6:2", "6:3", "7:1", "7:2", "7:3", "8:1", "8:2", "8:3", "9:1", "9:2", "9:3", "10:1", "10:2", "10:3"]

(2)

Download ischordgraph.mw

Hi senior, i am trying to customize the range for horizontal axis means in my case y axis but got error, also trying to give different color for outcomes. Please help in this regards.

Axis_Help.mw

First 72 73 74 75 76 77 78 Last Page 74 of 2308