Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi Everyone,

I intend to find the invariants of a 2nd-order Tensor using the representation of the rotational group as an Infinitesimal generator. However, maple does not seem to find the correct invariants $\tr \mathbf{a}$, $\tr \mathbf{a}^2$, $\tr \mathbf{a}^3$. Maple only returns an empty set. I can't seem to figure out why that is the case.

Here is my code

NULL

restart

with(PDETools)

assume(r >= 0)

interface(showassumed = 0)

X_z2 := (-a__21-a__12)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(a__12+a__21)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32)) = 0

(-a__21-a__12)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(a__12+a__21)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32)) = 0

(1)

X_y2 := (-a__31-a__13)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__13+a__31)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

(-a__31-a__13)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__13+a__31)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

(2)

X_x2 := -a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(-a__32-a__23)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__23+a__32)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

-a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(-a__32-a__23)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__23+a__32)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

(3)

sys := [X_z2, X_y2, X_x2]

sol := pdsolve(sys)

(4)

NULL

Download SO(3)_spherical_2.mw

Any input would be appreciated!

Hello there,

Is the price of 295 USD for unlimited use in time?

Kind regards,

Eduardo

Hello guys,
Can anyone recommend good books on advanced programming and other Maple topics? The books I have only have the basics.
Regards,
Oliveira

Execute the following codes in Maple input (1-D math) in the Standard interface. 

(cat("A".."C"),cat("d".."f"))||'$"G".."I",$"j".."l"'; 

Then an error occurred. But if one copy them into 2-D math (instead of Convert To>2-D Math Input) and execute them directly, everything goes without any error messages.

It says that mixed 1-D and 2-D math inside one command is not supported and not recommended stylistically. However, I just want to understand the reason why an error is raised here. 

restart;

kernelopts(version);

`Maple 2022.2, X86 64 WINDOWS, Oct 23 2022, Build ID 1657361`

(1)

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

(2)

(cat("A".."C"),cat("d".."f"))||'$"G".."I",$"j".."l"';

Error, `||` unexpected

 

cat("A" .. "C"), cat("d" .. "f") || '`$`("G" .. "I"), `$`("j" .. "l")'

"AG", "AH", "AI", "Aj", "Ak", "Al", "BG", "BH", "BI", "Bj", "Bk", "Bl", "CG", "CH", "CI", "Cj", "Ck", "Cl", "dG", "dH", "dI", "dj", "dk", "dl", "eG", "eH", "eI", "ej", "ek", "el", "fG", "fH", "fI", "fj", "fk", "fl"

(3)

NULL

Download unexpectedConcatenation.mws

Hello everyone,

I am having trouble with this a system of 12 differential equations with the respective 12 initial conditions. I try to usen dsolve with the "numeric" parameter but it stays "evaluating" forever. I tried a system of 10 equation and I got the correct answer, although the program stayed calculating for several minutes (more or less 5 minutes). Is the size of this system too much to handle for the program? 

This is the system of differential equations (sys) and the initial conditions (ics) that I am trying to solve:

maple_primes_question.mw

sys := {diff(a[0](t), t)-(diff(a[1](t), t))+diff(a[2](t), t)-(diff(a[3](t), t))+diff(a[4](t), t)-(diff(a[5](t), t)) = 0, diff(b[0](t), t)+diff(b[1](t), t)+diff(b[2](t), t)+diff(b[3](t), t)+diff(b[4](t), t)+diff(b[5](t), t) = 0, diff(a[0](t), t)-.8090169943*(diff(a[1](t), t))+.309016994*(diff(a[2](t), t))-16*a[2](t)+.3090169950*(diff(a[3](t), t))+77.66563145*a[3](t)-.809016994*(diff(a[4](t), t))-187.3312629*a[4](t)+1.000000002*(diff(a[5](t), t))+289.4427191*a[5](t) = 0, diff(a[0](t), t)-.3090169938*(diff(a[1](t), t))-.8090169951*(diff(a[2](t), t))-16*a[2](t)+.8090169933*(diff(a[3](t), t))+29.66563140*a[3](t)+.3090169967*(diff(a[4](t), t))+27.33126306*a[4](t)-1.000000000*(diff(a[5](t), t))-110.5572808*a[5](t) = 0, diff(a[0](t), t)+.3090169938*(diff(a[1](t), t))-.8090169951*(diff(a[2](t), t))-16*a[2](t)-.8090169933*(diff(a[3](t), t))-29.66563140*a[3](t)+.3090169967*(diff(a[4](t), t))+27.33126306*a[4](t)+1.000000000*(diff(a[5](t), t))+110.5572808*a[5](t) = 0, diff(a[0](t), t)+.8090169943*(diff(a[1](t), t))+.309016994*(diff(a[2](t), t))-16*a[2](t)-.3090169950*(diff(a[3](t), t))-77.66563145*a[3](t)-.809016994*(diff(a[4](t), t))-187.3312629*a[4](t)-1.000000002*(diff(a[5](t), t))-289.4427191*a[5](t) = 0, diff(a[1](t), t)+4*(diff(a[2](t), t))+9*(diff(a[3](t), t))+16*(diff(a[4](t), t))+25*(diff(a[5](t), t))-3*(diff(b[1](t), t))+12*(diff(b[2](t), t))-27*(diff(b[3](t), t))+48*(diff(b[4](t), t))-75*(diff(b[5](t), t)) = 0, diff(b[0](t), t)-.8090169943*(diff(b[1](t), t))+.309016994*(diff(b[2](t), t))-48*b[2](t)+.3090169950*(diff(b[3](t), t))+232.9968944*b[3](t)-.809016994*(diff(b[4](t), t))-561.9937886*b[4](t)+1.000000002*(diff(b[5](t), t))+868.3281572*b[5](t) = 0, diff(b[0](t), t)-.3090169938*(diff(b[1](t), t))-.8090169951*(diff(b[2](t), t))-48*b[2](t)+.8090169933*(diff(b[3](t), t))+88.99689421*b[3](t)+.3090169967*(diff(b[4](t), t))+81.99378917*b[4](t)-1.000000000*(diff(b[5](t), t))-331.6718425*b[5](t) = 0, diff(b[0](t), t)+.3090169938*(diff(b[1](t), t))-.8090169951*(diff(b[2](t), t))-48*b[2](t)-.8090169933*(diff(b[3](t), t))-88.99689421*b[3](t)+.3090169967*(diff(b[4](t), t))+81.99378917*b[4](t)+1.000000000*(diff(b[5](t), t))+331.6718425*b[5](t) = 0, diff(b[0](t), t)+.8090169943*(diff(b[1](t), t))+.309016994*(diff(b[2](t), t))-48*b[2](t)-.3090169950*(diff(b[3](t), t))-232.9968944*b[3](t)-.809016994*(diff(b[4](t), t))-561.9937886*b[4](t)-1.000000002*(diff(b[5](t), t))-868.3281572*b[5](t) = 0, diff(a[0](t), t)+diff(a[1](t), t)+diff(a[2](t), t)+diff(a[3](t), t)+diff(a[4](t), t)+diff(a[5](t), t)-(diff(b[0](t), t))+diff(b[1](t), t)-(diff(b[2](t), t))+diff(b[3](t), t)-(diff(b[4](t), t))+diff(b[5](t), t) = 0}

ics := {a[0](0) = 0.7499999990e-1, a[1](0) = .1500000001, a[2](0) = .1500000002, a[3](0) = .1500000000, a[4](0) = .1499999999, a[5](0) = 0.7499999987e-1, b[0](0) = .9750000000, b[1](0) = 0.5000000005e-1, b[2](0) = -0.5000000005e-1, b[3](0) = 0.5000000000e-1, b[4](0) = -0.4999999998e-1, b[5](0) = 0.2499999996e-1}
sols := dsolve(`union`(sys, ics), numeric)

Download maple_primes_question.mw

What am I doing wrong? or is it that the program cannot handle such a large system? In that case, that would be dissappointing since I have to solve a similar system but with up to 22 differential equations and initial conditions so I am stuck...

Anyway, thank you very much for any guidance, and happy new year.

 A:= <x1,y1,z1>:  B:= <x2,y2,z2>:  P :=<x3, y3, z3>:  H:=A+t*(B-A):  solve( (P-H)^+ . (B-A), t ):  'H'=eval(H, t=`%` );

Error, invalid powe, rhow to overcome this mistake ? Thank you.
Typesetting:-mambiguous( AAssign (x1commay1commaz1)colon  BAssign 

  (x2commay2commaz2)colon  P Assign(x3comma y3comma z3)colon  H

  AssignA + tast(Buminus0A)colon  solveApplyFunction( 

  Typesetting:-mambiguous((Puminus0H)circ + , 

  Typesetting:-merror("invalid power")) period (Buminus0A)comma t

   )colon  (H)equalsevalApplyFunction(Hcomma tequals% )semi)

Simple question I cannot remember the solution of.

When I import "executable maple input" from a file, the content is imported as a string and therefore have quotation marks around the code if saved in a variable. It therefore wont execute.

How do you defeat quotation marks around  executable maple code with a command in order to execute the code ?

hello dear maple, in the following code (code attached at the bottom )

I'm curious to know if it's possible to show the product of two matrices  in an unevaluated form, so for instance something like this instead of this 

UnEval_Mat.mw

Thanks in advance

This is about functionality introduced in Maple 2022, which however is still not well known: Integral Vector Calculus and parametrization using symbolic (algebraic) vector notation. Four new commands were added to the Physics:-Vectors package, implementing the parametrization of curves, surfaces and volumes, as well as the computation of path, surface and volume vector integrals. Those are integrals where the integrand is a scalar or vector function. The computation is done from any description (algebraic, parametric, vectorial) of the region of integration - a path, surface or volume.
 
There are three kinds of line or path integrals:

NOTE Jan 1: Updated the worksheet linked below; it runs in Maple 2022.
Download Integral_Vector_Calculus_and_Parametrization.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

hello maple world, in the following code (code attached at the bottom) i wish to select the terms which have the term so i used the "select" command for this task

but as u can see from the results it also selects other terms which is wrong. so what is the mistake here

thanks in advance

Physic_select.mw

Hi everyone,

I have been trying to solve a system of 8 differential equations (1st order) with 8 different initial conditions. The system in question is the following.

sys:={

diff(a[0](t), t) - diff(a[1](t), t) + diff(a[2](t), t) - diff(a[3](t), t) = 0,

diff(b[0](t), t) + diff(b[1](t), t) + diff(b[2](t), t) + diff(b[3](t), t) = 0,

diff(a[0](t), t) + diff(a[1](t), t) + diff(a[2](t), t) + diff(a[3](t), t) - diff(b[0](t), t) + diff(b[1](t), t) - diff(b[2](t), t) + diff(b[3](t), t) = 0,

diff(a[1](t), t) + 4*diff(a[2](t), t) + 9*diff(a[3](t), t) - 3*diff(b[1](t), t) + 12*diff(b[2](t), t) - 27*diff(b[3](t), t) = 0,

diff(a[0](t), t) - diff(a[1](t), t)/2 - diff(a[2](t), t)/2 - 16*a[2](t) + diff(a[3](t), t) + 48*a[3](t) = 0,

diff(a[0](t), t) + diff(a[1](t), t)/2 - diff(a[2](t), t)/2 - 16*a[2](t) - diff(a[3](t), t) - 48*a[3](t) = 0,

diff(b[0](t), t) - diff(b[1](t), t)/2 - diff(b[2](t), t)/2 - 48*b[2](t) + diff(b[3](t), t) + 144*b[3](t) = 0,

diff(b[0](t), t) - diff(b[1](t), t)/2 - diff(b[2](t), t)/2 - 48*b[2](t) + diff(b[3](t), t) + 144*b[3](t) = 0}

and the initial conditions are

ics:={a[0](0) = 1/8, a[1](0) = 1/4, a[2](0) = 1/4, a[3](0) = 1/8, b[0](0) = 23/24, b[1](0) = 1/12, b[2](0) = -1/12, b[3](0) = 1/24}

When I run 

sols := dsolve(sys union ics, numeric)

I get the error message

Error, (in DEtools/convertsys) ODE system is insufficient to determine values for all dependent variables in the system

What is happening?

Thanks for the help.

Hey guys. i recently faced a problem where i needed to substitute the "physics's overloaded product operator" , namely with normal matrice product (`.`), so maple can do the matrice product calculation after my non-commutative physics operator(yellow symbols in the following code) has been replaced with real matrices (for instance, this substitution:)

now in order to substitute  with `.` I have utilized the maple `use` command. but the problem is, it doesn't do the substitution when I utilized `use` command as follows (code file is attached at the bottom) :

so what's the mistake here?

thanks in advance

Physic_subs.mw

Let's say we have a velocity vector v := c _i + d _j, where _i and _j are the i hat and j hat Cartesian basis vectors as present in the Physics[Vectors] package.

When we integrate this velocity vector relative to t, the result in maple is the position vector (c _i + d _j)t.

I guess that is correct.

My question is: is there am in-built way to specify an initial position vector for the integration? Ie, can I specify constants in the integration?

Right now I am just doing 

s0 := sx _i + sy _j

s:= int(v, t) + s0

I've been trying to figure out what i_  means in Maple. In what follows is some experimentation and then my questions.

Just a few initial experiments without loading any packages.

i_

i_

(1)

i_ = i_NULL

_i

_i

(2)

_i = _iNULL

D(_i)

D(_i)

(3)

f := proc (t) options operator, arrow; _i end proc

proc (t) options operator, arrow; _i end proc

(4)

D(f)

0

(5)

f := proc (t) options operator, arrow; t*_i end proc

proc (t) options operator, arrow; t*_i end proc

(6)

D(f)

proc (t) options operator, arrow; _i end proc

(7)

D(t*_i)

D(t)*_i+t*D(_i)

(8)

Impression: _i is treated like an algebraic basis vector when the result of a function; but not in an expression.

NULL

with(Physics)

_i

_i

(9)

_i = _iNULL

D(_i)

D(_i)

(10)

f := proc (t) options operator, arrow; t*_i end proc

proc (t) options operator, arrow; Physics:-`*`(t, _i) end proc

(11)

D(f)

proc (t) options operator, arrow; _i end proc

(12)

Nothing really seemed to change with the Physics package being used. However, if we use the following package

with(Physics[Vectors])

_i

_i

(13)

i_

i_

(14)

_i = _iNULL

i_ = i_NULL

In the middle of v__0 := v__x0*_i = v__x0*_i text. Doesn't work as expected.

In the middle of v__0 = v__x0*_i = v__x0*_i = v__x0*_i text.

 

NULL

My question is: is the symbol _i somehow special by default? Where can I find it in the documentation?

Note the second-to-last line in the Maple document pasted above: "Doesn't work as expected". The difference between this line and the next one is simply the presence of a := instead of an =. The assignment makes the vector notation differ. Is this difference a bug or some feature I am unaware of?

Here is yet another behavior that seems kinda weird to me. Given the function f defined above, D(f) gives us the expected result but D(f(x)) does not. Yet, int(f) gives an error, and we have to use int(f(x))

EDIT: a little more research indicates there is a difference between the operator and the function diff. 

Download PhysicsVectors.mw

Reading another question today I discovered that I can use syntax like

a := 2 _i + 3 _j

b:= _i - _j

a+b  

Maple computes the sum by vector component. This is very useful, and it prompted me to start reading the Multivariate Calculus Study Guide. I am still going through it but haven't seen this particular notation yet. When I check the type of above I get a result that sort of looks like `+` but actually it seems to be tilted to the right (so I guess it is italicized and represents some symbol).

What is this type?

I don't find much searching online, and I did see this page that says 

"Any symbol beginning with an underscore (_) is effectively reserved for use only by library code. It is not available to users. Failure to observe this rule can lead to unexpected results."

Edit: After a bit more looking, looks like my example code is using notation available from the Physics package, which I am now reading a bit about (but it is not clear to my why this package is used since I am not importing it explicitly).

First 9 10 11 12 13 14 15 Last Page 11 of 1984