MaplePrimes Questions

Maple's infolevel is very nice feature, good for learning.

But I'd like to see more steps/info sometimes. Using infolevel set to max 5, does not show everything I like to see. Is there a way to print more info?

This is what I am   interested in. dsolve goes into Kovacic algorithm to solve second oder ODE. This algorithm is general algorithm to solve second oder linear ODE. 

https://www.sciencedirect.com/science/article/pii/S0747717186800104

restart;
infolevel[dsolve]:=5;
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(x^2-1/4)*y(x)=0;
dsolve(ode)

Changing printlevel to high value, does not really help here. It just prints lots of stuff I am not interested in.

What othere options are there to show more information about flow of logic, like the above?

I do not even know how to trace Kovacic code in Maple, since do not know what function/proc it is in without having to step though dsolve, which could take very long time to reach this specfic proc.

Is it possible to have Maple print the name of each proc it enter and leaves as it runs? That will be very useful addition added to printlevel. 

 

I have set of assumptions. The set happend to be empty at  time I used it. I forgot to change the set to list when calling assuming. This cased 'numeric exception: division by zero'
 

Is this normal and expected?

restart;
u1:=-ln(csc(x)-cot(x));
the_assumptions_on_x:={};
`assuming`([simplify(u1)],[the_assumptions_on_x])

Error, (in assuming) when calling 'signum'. Received: 'numeric exception: division by zero'
 

I fixed my code to use list at time of the call and the error went away

restart;
u1:=-ln(csc(x)-cot(x));
the_assumptions_on_x:={};
`assuming`([simplify(u1)],convert(the_assumptions_on_x,list))

The question is, why passing {} caused division by zero? 

Maple 2020.1

 

Hi,

I just wondering if I could write a variable as y' since when I try it, it will automatically diffrentiate the subject.

 

Thank you.

 

.................................................................................................................

I'm trying to use what is essentially a vector of lists within and expression, using a range variable as one of the indexes, and it doesn’t seem to calculate any result.  Just looking for help or pointers, and I included an example of what I'm talking about in the attached maple doc.  I can convert it into a matrix and get it to calculate the result, however I’m suspecting there must be some way to use the Vector directly but I couldn’t see how to do it.

vector_of_lists_example.mw

thanks,

Brian

Hi all,

I've launched a maple program (.mpl) :

nohup maple -F 5_grobner.mpl > 5grobner.out 2>&1 &

on a server to whom I've access through a ssh tunnel.

my code are here :

==========================BEGIN===========================

restart;

with(LinearAlgebra);

F0:=(w*f00+v*f01)/(v+w);

F1:=(u*f10+w*f11)/(w+u);

F2:=(v*f20+u*f21)/(u+v);

T:=(u)^(3)*p0+(v)^(3)*p1+(w)^(3)*p2 + 3*u*v*(u+v)*(u*e01+v*e10) + 3*v*w*(v+w)*(v*e11+w*e20) + 3*w*u*(w+u)*(w*e21+u*e00) + 12*u*v*w*(u*F0+v*F1+w*F2);

coefList:=[p0,p1,p2,e00,e01,e10,e11,e20,e21,f00,f01,f10,f11,f20,f21];

nops(coefList);

for i from 1 to nops(coefList) do

 ind:=coefList[i];

 BF||ind:=subs(w=1-u-v, factor(coeff(T,coefList[i],1)));

end do;

for i from 1 to nops(coefList) do

 ind:=coefList[i];

 DDBF||ind:=factor(diff(BF||ind,u,v));

end do;

QR:=x-> t1*subs(u=u1,v=v1,x) + t2*subs(u=u2,v=v2,x) + t3*subs(u=u3,v=v3,x) + (t4)*subs(u=u4,v=v4,x)+t5*subs(u=u5,v=v5,x);

for i from 1 to nops(coefList) do

 ind:=coefList[i];

 eq[i]:=numer(simplify(int(DDBF||ind, u=0..1-v, v=0..1) - QR(DDBF||ind)));

end do;

sys := [seq(eq[i],i=1..nops(coefList))];

with(Groebner);

res:=Basis(sys,plex(u1,v1,t1,u2,v2,t2,u3,v3,t3,t4,t5,u5,v5));

==========================END===========================

After the program ended, the output file ends with:

......Some outputs of the program....

memory used=1047901.6MB, alloc=32244.7MB, time=147379.36

memory used=1049539.5MB, alloc=32276.7MB, time=147732.14

memory used=1051177.5MB, alloc=32308.7MB, time=148081.18

memory used=1052815.4MB, alloc=32340.7MB, time=148473.81

maple: fatal error, lost connection to kernel

===============================================

I saw some explanations about this message here https://faq.maplesoft.com/hc/en-us/articles/360019491492--Kernel-connection-has-been-lost-error-in-Maple

I guess the reason of my program is " Maple was consuming too much of the RAM or CPU during a calculation;"

But I'm not sure.

Or "Maple sensed that some loop will not terminate,"

So it means there's no solution for my program?

 

Does someone know what this error means?

Or how can I know the right reason that I got this message?

 

Thanks!

jun

 

 

Hello Everyone

I am working on an itteraative scheme. Durring this i am solving system of algebric equation using fsolve command. In the first itteration all is ok but in second itteration it also produce some extra thing which create problems. Anybode can see this please. I am much worried about it. Thanks i advance.

u=a-(4*i*b)*(a*sinh(c)-2*i*b)/(a+2*i*b*sinh(c)), where b is a complex parameter, a is a real constant and, c=\sqrt(a^2-4*b^2)*(x+t/(2*b^2)), then how to calculate |u|^{2} on maple?

In my worksheet today my intention was to compare the least squares linear regression for three datasets as indicated, but when I right click on the output as seen in the bottom line to select the plot type, all options state there to be independant variables K[0] and K[1], where as the output displays only the variable K as I intended, which part of my code is creating this confusion for maple?

 

 

 

Worksheet Specific Investigation Content

 

S[0] := proc (N, K) options operator, arrow; map(simplify, {seq(seq(seq(piecewise((a^`ϕ`(b))^(1/(c+1))-floor((a^`ϕ`(b))^(1/(c+1))) = 0, [a, b, c], NULL), a = 1 .. N), b = 1 .. N), c = 1 .. K)}, 'radical') end proc

T := proc (N, K) options operator, arrow; {seq(seq(seq([a, b, c], a = 1 .. N), b = 1 .. N), c = 1 .. K)} end proc:

S[1] := proc (N, K) options operator, arrow; `minus`(T(N, K), S[0](N, K)) end proc:

CardRatio := proc (N, K) options operator, arrow; nops(S[0](N, K))/nops(S[1](N, K)) end proc:

{CurveFitting[LeastSquares]([seq([k, CardRatio(2, k)], k = 1 .. 10)], K), CurveFitting[LeastSquares]([seq([k, CardRatio(3, k)], k = 1 .. 10)], K), CurveFitting[LeastSquares]([seq([k, CardRatio(4, k)], k = 1 .. 10)], K)}

{1, 44268857/45401356-(532409481/9988298320)*K, 24308311919/13309971675-(135902619982/773879781675)*K}

(1.1)

``

 

 

 

 

Download ask_maple.mw

 

 

Hello there, 

Here is a set

thanks

Hello there, 

Here is a set of non-linear equations:

 

restart;

with(LinearAlgebra):

TrainLoad := -10*10^6*(cos(convert(40*degrees, radians))+I*sin(convert(40*degrees, radians)));

-10000000*cos((2/9)*Pi)-(10000000*I)*sin((2/9)*Pi)

(1)

 

evalf(TrainLoad, 7);

-7660444.-6427876.*I

(2)

f1n2 := (0.03 + I*0.1515)*Ix[c1] - (0.03 + I*0.1515)*Ix[c2] + 2 * V[at1] - 55*10^3 = 0;

(0.3e-1+.1515*I)*Ix[c1]+(-0.3e-1-.1515*I)*Ix[c2]+2*V[at1]-55000 = 0

(3)

f3n4 := (1.6 + I*6.24)*Ix[c1] + (1.12 + I*2.64)*Ix[c2] + V[t] - V[at1] = 0;

(1.6+6.24*I)*Ix[c1]+(1.12+2.64*I)*Ix[c2]+V[t]-V[at1] = 0

(4)

f5n6 := (1.36 + I*4.44)*Ix[c2] + V[at2] - V[t] = 0;

(1.36+4.44*I)*Ix[c2]+V[at2]-V[t] = 0

(5)

f7n8 := (-1.12 - I*2.64)*Ix[c1] + (-3.92 - I*12.00)*Ix[c2] + V[at2] - V[at1] = 0;

(-1.12-2.64*I)*Ix[c1]+(-3.92-12.00*I)*Ix[c2]+V[at2]-V[at1] = 0

(6)

f9n10 := V[t] * (Ix[c1] - Ix[c2]) + TrainLoad = 0;

V[t]*(Ix[c1]-Ix[c2])-10000000*cos((2/9)*Pi)-(10000000*I)*sin((2/9)*Pi) = 0

(7)

polynomials := {f1n2, f3n4, f5n6, f7n8, f9n10};

{(1.36+4.44*I)*Ix[c2]+V[at2]-V[t] = 0, V[t]*(Ix[c1]-Ix[c2])-10000000*cos((2/9)*Pi)-(10000000*I)*sin((2/9)*Pi) = 0, (-1.12-2.64*I)*Ix[c1]+(-3.92-12.00*I)*Ix[c2]+V[at2]-V[at1] = 0, (0.3e-1+.1515*I)*Ix[c1]+(-0.3e-1-.1515*I)*Ix[c2]+2*V[at1]-55000 = 0, (1.6+6.24*I)*Ix[c1]+(1.12+2.64*I)*Ix[c2]+V[t]-V[at1] = 0}

(8)

variables := {Ix[c1], Ix[c2], V[at1], V[at2], V[t]};

{Ix[c1], Ix[c2], V[at1], V[at2], V[t]}

(9)

fsolve(polynomials, variables, complex);

{Ix[c1] = 955.2297105-5281.491898*I, Ix[c2] = -505.0156845+2424.830843*I, V[at1] = 26894.34238+4.981252431*I, V[at2] = 10829.70666+56.66545127*I, V[t] = -623.3636109+1112.165758*I}

(10)

 

 


The 'fsolve()' command was able to come up with a solution. 

Then, when 'f9n10 := V[t] * (Ix[c1] - Ix[c2]) + TrainLoad = 0;' becomes 'f9n10 := V[t] * conjugate(Ix[c1] - Ix[c2]) + TrainLoad = 0;', 

the command ('fsolve()') refused to produce a solution. 

Would you tell me how to make the 'fsolve()' command work with the 'conjugate()' operator?

Thank you, 

In Kwon Park


 

 

Download no_conjugate.mw

 

Hello,

 

I am one of the software coordinators for CUNY and was wondering how would i obtain access to download Maplesoft for the college community?

I have the following program which constructs the multiplication table, CI, for a matrix Lie algebra and evaluates the difference between CI's row dimension and its rank. The code is a little convoluted because "LieTable" formats the entries very strangely and forces incorrect rank values.

The matrix CI is constructed rather quickly (within a few seconds), and everything works well with "small" examples (up to 12 basis elements has evaluated within seconds). However, the example I've included is for a 27-dimensional Lie algebra. As I stated, CI is constructed quickly, even in larger examples, but the rank evaluation (i.e., LinearAlgebra:-Rank(CI)) has never completed for the example I've included. I let it run for about 3 hours before shutting it down.

I have an older Macbook Air which I am using to run these computations. Could this simply be an issue of not enough computing power?

I have attempted to import the matrix CI into Mathematica (to see if it was simply a limitation of Maple), but that's its own headache (reads entries of the matrix incorrectly).

 

Any recommendations would help. If this is an issue of computing power, I can get access to a more powerful system soon. It doesn't seem that the code itself would cause the issue, since it is not the construction of the matrix which is giving me issues, it is the evaluation of the rank. I am rather naive about Maple (and programming in general) though, so I may be wrong.

 

Index_and_Contact.mw

I want to do the substitution f(t) - ff(t) = epsilon for any variable t in Maple:

 

expand(myerror);
    2 f(x - 2 h)   f(x)   3 f(x + 3 h)   2 ff(x - 2 h)   ff(x)
  - ------------ - ---- + ------------ + ------------- + -----
        15 h       6 h        10 h           15 h         6 h

       3 ff(x + 3 h)
     - -------------
           10 h     


NULL;
myfunc := t -> f(t) - ff(t) = epsilon;
 myfunc := proc (t) options operator, arrow, function_assign;

    f(t)-ff(t) = epsilon end proc


algsubs(myfunc(t), myerror);
          2               1        3            
        - -- f(x - 2 h) - - f(x) + -- f(x + 3 h)
          15              6        10           
        ----------------------------------------
                           h                    

               2                1         3             
             - -- ff(x - 2 h) - - ff(x) + -- ff(x + 3 h)
               15               6         10            
           - -------------------------------------------
                                  h                     


NULL;
subs(f(-h*n + x) = 1, ff(-h*n + x) = 0, f(x) = 1, ff(x) = 0, f(h*m + x) = 1, ff(h*m + x) = 0, myerror)*epsilon;
                           4 epsilon
                           ---------
                             15 h   

 

First 513 514 515 516 517 518 519 Last Page 515 of 2427