Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Just wondering why

restart;
x:=2*{};
has(x,{})

Clearly {} is special. But is there a way to make it return true? 

 

Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up
restart;
with(plots);
p := 10; omega := 0.3e-2; q := 0.234e-1; phi := .2; beta := .1; alpha := .2; sigma := 0.4e-2; tau := 0.2e-1; theta := .13; Omega := 0.23e-1; mu := 0.2e-1; k := 0.18e-1; eta := 0.2e-1; delta := 0.1e-1; unprotect(gamma); gamma := 0.2e-1; rho := 0.2e-1; PI := 0.4e-1; xi := 0.57e-1; a := 0.11e-1; l := 0.73e-1; chi := 0.95e-1; nu := 0.8e-1; unprotect(Zeta); Zeta := 0.26e-1; varphi := 0.2e-1;
funcs := diff(S(t), t) = delta*V(t)+PI*C__Sy(t)+xi*C__Asy(t)+varphi*R(t)+(1-p)*omega-(mu+(q+(1-q)*lambda)*phi+chi*lambda+nu)*S(t), diff(V(t), t) = p*omega-rho*lambda*V(t)+nu*S(t)-(delta+mu+kappa*lambda*eta+(1-kappa)*lambda*eta)*V(t), diff(C__Sy(t), t) = q*phi*S(t)+Omega*C__Sy(t)+eta*kappa*lambda*V(t)+l*i(t)-(PI+theta+mu+beta+sigma)*C__Sy(t), diff(C__Asy(t), t) = (1-q)*phi*S(t)+theta*C__Sy(t)+eta*lambda*(1-kappa)*V(t)+alpha*i(t)-(xi+Omega+mu+alpha+tau)*C__Asy(t), diff(i(t), t) = rho*lambda*V(t)+alpha*C__Asy(t)+beta*C__Sy(t)+chi*lambda*S(t)-(mu+Zeta+gamma+a+l)*i(t), diff(R(t), t) = gamma*i(t)+tau*C__Asy(t)+sigma*C__Sy(t)-(mu+varphi)*R(t), S(0) = 200, V(0) = 100, C__Sy(0) = 80, C__Asy(0) = 50, i(0) = 70, R(0) = 40;
p1 := dsolve({funcs}, type = numeric, abserr = 2.4);
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
p1i := odeplot(p1, [t, S(t)], 0 .. 120, numpoints = 100, labels = ["Time(Days)", "Susceptible  population"], labeldirections = [horizontal, vertical], style = line, axes = boxed, color = red);
Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up
 

Apparently the return value of a GetProperty check is not a boolean variable, but something else.

Why?

boolean.mw

I am creating Maple figures that are being used to create camera-ready figures in Adobe Illustrator. The graphic artist doing the Adobe Illustrator has asked me if there is a way to have the text information in the figure (tickmarks, axis labels, ...) saved as text and not created as an image?

I know that other EPS files have text stored this way, but it appears Maple does not do this. I can't find any documentation about this. Does anybody have any knowledge or experience about this?

Thanks in advance,

Doug

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

Dear All, 

When I tried to replace all occurrences of an expression (two occurrences in total), only one of them (the last one with 'R__arm/2' coefficient) was replaced. I wonder if there is a way to make sure that all the occurrences are replaced by the intended substitute. 


 

restart;

with(Student[LinearAlgebra]):

eq4:= v__a(t) = (v__an(t)-v__ap(t))/2 - L__arm/2*diff([i__ap(t)-i__an(t)], t) - R__arm/2*(i__ap(t)-i__an(t));

v__a(t) = (1/2)*v__an(t)-(1/2)*v__ap(t)-(1/2)*L__arm*[diff(i__ap(t), t)-(diff(i__an(t), t))]-(1/2)*R__arm*(i__ap(t)-i__an(t))

(1)

eq4_2:= subs([i__ap(t)-i__an(t) = i__a(t)], eq4);

v__a(t) = (1/2)*v__an(t)-(1/2)*v__ap(t)-(1/2)*L__arm*[diff(i__ap(t), t)-(diff(i__an(t), t))]-(1/2)*R__arm*i__a(t)

(2)

 


 

Download Maximum_Modulation_Index_for_MMC_with_CCC.mw

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

 

 

First 387 388 389 390 391 392 393 Last Page 389 of 2097