MaplePrimes Questions

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

Is it possible to use a vector in the piecewise fuction? I have tried the following and other stuff but the the error below

timestep := <seq(1 .. 100)>;
piecewise(`<`~(30, timestep), 1);
Error, (in PiecewiseTools:-Is) wrong kind of parameters in piecewise
 

I have a time vector and would like to create a u(t), unit step fuction to "turn on" a function at a certain time. e.g.

output(t)=u(t)*f(t)

Where u(t)=1 for t>turn_on_time and 0 otherwise.

TIA for help

  Could you please give maple code for Shooting Method/Kellor box Method or any numerical method except RK Method to this system of Differential Equations.

SMMS.mw

In a recent answer I posted, I had a relation of the form

I*Int(f(x), x) = something - 2*I*Int(f(x), x)

and I wanted to isolate the term Int(f(x), x).
The function isolate failed to do it and I was forced to use some workaround to do the "isolation".

Trying to understand what happened here, it seems that isolate fails when the term to isolate is multiplied by the imaginary unit
Here are a few examples

expr := I*(Int(x^2*ln(-x+sqrt(x^2-1)), x)) = g(x) -(2*I)*(Int(x^2*ln(-x+sqrt(x^2-1)), x))

I*(Int(x^2*ln(-x+(x^2-1)^(1/2)), x)) = g(x)-(2*I)*(Int(x^2*ln(-x+(x^2-1)^(1/2)), x))

(1)

# no isolation

isolate(expr, lhs(expr))

I*(Int(x^2*ln(-x+(x^2-1)^(1/2)), x)) = g(x)-(2*I)*(Int(x^2*ln(-x+(x^2-1)^(1/2)), x))

(2)

# isolation

expr_1 := expand(expr / I)
isolate(expr_1, lhs(expr_1))

Int(x^2*ln(-x+(x^2-1)^(1/2)), x) = -((1/3)*I)*g(x)

(3)

# no isolation neither, so the problem is not related to "Int"

expr := I*diff(h(x), x) = g(x) -2*I*diff(h(x), x):
isolate(expr, lhs(expr))

I*(diff(h(x), x)) = g(x)-(2*I)*(diff(h(x), x))

(4)

# no isolation neither, so the problem comes from "I"

expr := I*A = g(x) -2*I*A:
isolate(expr, lhs(expr))

I*A = g(x)-(2*I)*A

(5)

# isolation (of course)

expr := c*A = g(x) -2*c*A:
isolate(expr, lhs(expr))

c*A = (1/3)*g(x)

(6)

 

Download Isolation.mw

I guess this is a known behavior, but why it is so?
Is there a way to force the "isolation" without using a trick like in result (3)

Thanks in advance

First 192 193 194 195 196 197 198 Last Page 194 of 2428