MaplePrimes Questions

What is the command to stopat and showstat the proc  DEtools:-odeadvisor ?

I tried

ode:=y(x)*(2*x^2*y(x)^3+3)+x*(x^2*y(x)^3-1)*diff(y(x),x)=0;
DEtools:-odeadvisor(ode);

showstat(`DEtools/odeadvisor`);

showstat(`ODEtools/odeadvisor`);

And few other variations. It works on other proc's  such as

stopat(`ODEtools/symtest`); 
stopat(`ODEtools/test`); 
stopat(`ODEtools/normal/expanded`); 
stopat(`ODEtools/odepde`); 

But I was never able to figure the name for `DEtools:-odeadvisor`

Is there a general method to determine the correct name to use for printing or stopping at Maple command code to see it?

For me, it seems like trial and error process. For example DEtools:-command   becmes ODEtools:-command to stop at. Notice the extra O needed for tracing or printing. Do not know why extra O is needed. But showstat(`DEtools/symtest`); gives error, and showstat(`ODEtools/symtest`); works even though the command itself has no O.

So my question is, what would be the command to stop at DEtools:-odeadvisor? Is there a place to read more about how to find the correct path to give so do not have to guess?

Maple 2024

Context of My Code:

I want to determine the SU(2) field strength tensor for a specific field configuration(later the equations of motion). I have managed to implement the covariant derivative and the gauge field, but now I am encountering problems with the field strength tensor. When substituting the definitions of my gauge field (7) and my covariant derivative (13) into my field strength tensor (14), the following problems occur:

  1. The derivatives do not act on f(r) or r (r should be the radial component of my coordinate system).
  2. The unit vectors are not explicitly multiplied together. Mixed terms should vanish and quadratic terms should result in one.

I am not even sure if I can properly form F[]^2 due to my definition in (4). I have seen in the setup that there are SU(2) indices, but I couldn't find anything helpful on how to handle this. Is it better to use SU(2) indexing?

It would be nice if someone could tell me why my terms are not simplifying or direct me to where I need to look to understand it.

Here is my code: 

SU(2)_Field_Strength.mw

Maple gives type of this first order ode as _homogeneous, `class C`, but it is also dAlembert ode.

When asking it to solve as  dAlembert using the method option, it solves it.

But it returns singular solution which is wrong as it does not satisfy the IC. Singular solution should also satisfy IC like particular solutions do.

Is this a bug or Am I overlooking something?

Should not the solution returned satisfy the IC even though method used is not listed from odeadvisor?
 

29028

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1764 and is the same as the version installed in this computer, created 2024, June 28, 12:19 hours Pacific Time.`

restart;

29028

ode:=diff(y(x), x) = (3*x - y(x) + 1)/(3*y(x) - x + 5);
ic:=y(0)=0;

diff(y(x), x) = (3*x-y(x)+1)/(3*y(x)-x+5)

y(0) = 0

sol:=dsolve([ode,ic],[dAlembert]); #this solution is singular solution.

y(x) = x-1

odetest(sol,[ode,ic]); #notice, solution do not satisfy IC

[0, 1]

sol2:=dsolve([ode,ic]):
odetest(sol2,[ode,ic]); #this is OK since used default method, not dAlembert

[0, 0]

DEtools:-odeadvisor(ode)

[[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

 


 

Download dsolve_dalembert_july_2_2024.mw

 

Dear All,

I have a polynomial in terms of time. I know that based on the nature of the problem, the real function that governs this problem is the sum of exponential functions with a negative power, for example, in the form of alpha[0]+add(alpha[i]*exp(-beta[i]*t), i=1.. 5).

Can you help me if there is a method that can be used to obtain these exponential functions using following polynomial?

The polynomial function is as follow:

f:=0.020399949322360296902872908942 + 0.0261353198432118595103693714851*t^3 + 0.0240968505875842806805439681431*t^4 + 0.0148456155621193706595799212802*t^5 + 0.0239969764160351203722354728376*t^2 + 0.0204278458408370651586217048716*t - 0.00450853634927256388740864146173*t^6 - 0.0355389767483113696513996149731*t^7 - 0.0766669789661906882315038416910*t^8 - 0.120843030849135239578151569663*t^9 - 0.153280689906711146639066606024*t^10 - 0.150288711858517536713273977277*t^11 - 0.0808171080937786380164380347445*t^12 + 0.0872390654213369913348407061899*t^13 + 0.373992140377042586618283139889*t^14 + 0.766807288928470485618700282187*t^15 + 1.19339994493571167326973251788*t^16 + 1.49476369302534328383069681700*t^17 + 1.41015598591182237492637420929*t^18 + 0.593451797299651247527539427688*t^19 - 1.31434443870999971750661332301*t^20;

Best wishes

I have the following problem, I want to define my own covariant derivative. This mixes my gauge fields with the Pauli matrices. My Setup() looks like this:   

restart;
with(Physics);
Setup(spacetimeindices = greek, spaceindices = lowercaselatin_ah);
Setup(signature = `-++ +`);
Setup(coordinates = spherical);

 

And this is my covariant derivative: 

Define(D[mu] = d_[mu] + 1/2*ig*Psigma[a]*A[mu, a])

If I output the tensor, MAPLE should automatically perform a summation over the spatial indices a, right? It looks like this in my case: 

I find the indexing a bit strange. When I look at the first entry, for example. Why does a in A[mu,a] go from 1-3 and the a of Psigma[a] from 2-4? They should both be spatial indices, right? Can I change the indexing in Setup() or am I doing something wrong here?  

What maple command returns the condition number of a matrix?

I have this problem with this system of equations, when I solve the 13x13 system it does not give me any solution, neither giving seed values ​​nor placing full digits. The exercise is solved and I tried to assume close values ​​and it doesn't work for me, it leaves everything expressed with the fsolve command.

Download p1.mw

I want to simplify the attached expression by applying the relation \( k_1 + k_2 + k_3 = 0 \).

For instance, the terms \( k_3 + k_1 - k_2 \) become \(-2k_2\) and \( k_1 + k_2 - k_3 \) become \(-2k_3\), etc.

Instead of manually changing each term, I am looking for a systematic method to apply this relation to simplify the given expression.

aabb.mw

How to simplify the expression where each vectors k_i and q has real components, i.e., etc

Only W_i, U_i,j, V_i,j are complex numbers, so conjugate (bar) is applicable for them. How to make declaration, so that all other bars are removed and simplify the expression.

aa.mw

while running my code i am not able to edit it. when i close my file and re open it then it is edit able but only once after that to re edit i have to run it again.
one more query i am facing is that i have made whole code now i just want to change pde and exact solution of that pde to get different solutions of pde although my code is working for one pde but while changing pde it is giving me error why?
and some times it takes alot of time to evaluate is there any error in the code or should i change my laptop?

kindly help me with all these queries.

Sq := proc(n::integer)
local aS, oS, aC, oC, s, dr, pc, u;
aS := -i/n;
oS := sum(1/s, s = 1 .. n);
aC := 1/2*aS;
oC := oS - 1/2*1/((n + 1)*n);
point(S, aS, oS); point(C, aC, oC);
MakeSquare(K, [S, 'center' = C]);
u := (x, i) -> sum(exp(-x*k)/k, k = 1 .. i);
pc := plot(u(x, n), x = 0 .. 4, color = green);
dr := draw([K]);
display({dr, pc});
end ;Sq(1);
Error, (in geometry:-draw) non-numeric coordinate encountered, cannot determine plot view
How to correct this procedure ?

I have used alias for various reasons inside a pagkage. It is useful for coupling old command names to modern ones.

I am trying now to get this to work inside a sub package but no success. Can this be done?

restart

 

pkg:=module()
option package;
export   Sqr, UHG;
alias(XX=Sqr);
#alias(eparm=CirclePramUHG);
Sqr:=proc(x)
   return x^2;
end proc;

 UHG:=module()
          option package;
         
          export
               CircleParmUHG;

alias(eparm=CirclePramUHG);

     CircleParmUHG := proc(T::algebraic, U::algebraic)
       local t, u, P, cp;
         #  P := point;
             t := T*denom(T)*denom(U);
             u := U*denom(T)*denom(U);
         # if P <> NullPoint then
         #   P := 'NullLine';
         #end if;
        if t::numeric and u::numeric and t<>0 and u<>0 then
             cp:=  <u^2 - t^2| 2*u*t| u^2 + t^2>/gcd(gcd(u^2 - t^2, 2*u*t), u^2 + t^2);
          else
             cp:=  <u^2 - t^2| 2*u*t| u^2 + t^2>;
        end if;
        return cp
      end proc;
    end module;
end module;

_m2044017012448

(1)

with(pkg)

[Sqr, UHG]

(2)

Sqr(4)

16

(3)

UHG:-CircleParmUHG(t,u)

[`?`]

(4)

UHG:-eparm(t,u)

Error, eparm is not a command in the pkg:-UHG package

 

with(UHG)

[CircleParmUHG]

(5)

CircleParmUHG(2,7)

Vector[row]([45, 28, 53])

(6)

eparm(2,7)

eparm(2, 7)

(7)

 

XX(3)

9

(8)
 

 

Download 2024-06-29_use_alias_in_a_Sub_Package.mw

Maple formats output depending on typesetting options "extened" and "standard" for the GUI (or interface). An example taken from

restart;
ts_standard:=proc(k::anything)
     interface(typesetting=standard):
     print(k);
     interface(typesetting=extended): 
     NULL;
end proc:
k:=3/8*ln(55/52)+sin(x)+3/4*exp(x);
                    3   /55\            3       
               k := - ln|--| + sin(x) + - exp(x)
                    8   \52/            4       

ts_standard(k);
                               

Why is the input two times returned and why one time as a list?
Somehow the first interface statement is responsible for that.

I am only interested in the reformated input inside the list.
Is it possible to fix the code?

Other observation with typesetting=standard:

restart;
interface(typesetting=standard);
expr:=cos(x)^2;
((x->x)=combine[trig])(expr);
                      

((x->x)=combine[trig])(expr);#subsequent call
                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

(with Maple 2024.1 this only accurs in Math-1D)
but

restart;
expr:=cos(x)^2;
interface(typesetting=standard);
((x->x)=combine[trig])(expr);
                                      2
                        expr := cos(x) 

                            extended

                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

I need to check inside typeset to see is something evaluates to 1. I can find if something contains 1 and have been using that. But got caught out last night because I forgot my work around. e.g. 1+H contains 1 and my work around is `1+H` so the check doesn't see the 1. The typeset is always the first item in the list.

restart

 

 

foo:=proc(a,{S::list:=[]})
local i,perp::boolean;
if S<>NULL then
  if (S[1])=1 or S[1]::function and has(`or`(seq (op(S[1]),i=1..nops([op(S[1])]))),1)  then
   #if (S[1])=1 or S[1]::function and `or`(seq (is(op(S[1][i]),1),i=1..nops([op(S[1])])))  then  ;#  not working
   
     perp:=true;print(perp);
    else
     perp:=false;print(perp);
  end if;
end if;
end proc:

foo(6,S=["cat"]);

 

false

(1)

foo(6,S=[1]);

true

(2)

foo(6,S=[typeset("cat=",H/H),align={above,left},color=green]); #good

true

(3)

foo(6,S=[typeset("cat=",H),align={above,left}])

false

(4)

foo(6,S=[typeset("cat=",1+H)],align={above,left},color=green);#want to fix this

 

 

true

(5)

foo(6,S=[typeset("cat=",`1+H`)]); #work around

false

(6)

foo(6,S=[typeset("cat=",`B/(H+1)`)]); #work around

false

(7)

foo(6,S=[typeset("cat=",`B/(H+1)`,"  height =",1)]); #correct

true

(8)

foo(6,S=[typeset("cat=",H^2/((2*H-H)*H),"  height =",`B/(H+1)`)]); #correct

true

(9)

op(typeset("cat=",B/(H+1)));# this would be false

 

"cat=", B/(1+H)

(10)

op(typeset("cat=",H^2/((2*H-H)*H),"  height =",`B/(H+1)`)) ;  # this would be true

 

 

"cat=", 1, "  height =", `B/(H+1)`

(11)
 

 

Download 2024-06-27_Q_check_inside_typeset.mw

When the limit approaches from left, the result must be zero. What cause the wrong? Will introducing an extra parameter M affect the result in W1?

W := -1/2+(1/2)*tanh(3.6*(tan(Pi*(r-2.1)/(2*7.9))-.6^2/tan(Pi*(r-2.1)/(2*7.9)))/Pi)

-1/2+(1/2)*tanh(1.145915590*tan(.1988349781*r-.4175534540)-.4125296124/tan(.1988349781*r-.4175534540))

(1)

limit(W, r = 10, left)

-1.000000000

(2)

W1 := -1/2+(1/2)*tanh(3.6*(tan(Pi*(r-2.1*M)/((2*7.9)*M))-.6^2/tan(Pi*(r-2.1*M)/((2*7.9)*M)))/Pi)

-1/2+(1/2)*tanh(1.145915590*tan(.1988349781*(r-2.1*M)/M)-.4125296124/tan(.1988349781*(r-2.1*M)/M))

(3)

limit(W1, r = 10*M, left)

-1.000000000

(4)

NULL

Download limit.mwlimit.mw

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