MaplePrimes Questions

In an unrelated thread, I provided the OP with some 1-D code, which contained the Array definition

TC:= Array(0...1001, fill=0)

Note the existence of three '.' characters in the range specification. This was a typo on my part, or my '.' key bounced, or something. The code containing the above definition "worked" with no problem, which, presumably, was why I didn't notice.

The Maple help does state (my emphasis)

Note that more than two dots in succession are also parsed as the range (..) operator.

although I wasn't making use of this fact - I just screwed up when typing the original.

The OP preferred to use 2-D input, and used cut-and-paste to transfer the above code, resulting in 2-D input, which is where the fun started. It seems(?) that when using 2-D input, more than two dots in succession is only interpreted as a straightforward range, if the total number of dots is even.

If the total number of dots is odd, then it appears(?) as if the 'final' dot is associated with the second number in the range as a 'decimal point', (so producing .1001 in the above example). This is then 'coerced/rounded' to an integer - ie it becomes '0', and the above Array definition is interpreted as

TC:= Array(0..0, fill=0)

Consequences in the following code are left to your imagination

Worth an SCR?

 

 

 

Dear Users!

Hope you would be fine with everthing. I am going to draw a closed figure in maple for this I defined 13 function and then plot them combine. But function 13 "F13" not plotted as I required. I need it plot vertically but it plot horizentaly. Please see the attachment and try to fix my problem. I am waiting your response. Thanks in advance.

Functions.mw

how to adjust the height and width of plot in maple 13

plot( x[3]^5, caption = typeset("\n A plot of %1.", x[3]^5), captionfont=[times, 20] );

hellow,

can any body help me to  increase the size of the caption in maple plot

plot( x[3]^5, caption = typeset("A plot of %1.", x[3]^5) );

Can anyone  produce these diagram?  Please Read the theory in:

   https://en.wikipedia.org/wiki/Logistic_map.

Wikipedia pages that explain bifurcation diagrams and attractors in more elementary contexts.

See the bifurcation diagram in the picture

   https://en.wikipedia.org/wiki/Logistic_map#/media/File:Logistic_Bifurcation_map_High_Resolution.png

 


 

``

lambda[1] := .3:

evalf(int(2*alpha^2*Z*exp(lambda[1]*Z)/((exp(lambda[1]*Z)-1+alpha)^2*(exp(lambda[2]*Z)-1+alpha)), Z = 0 .. infinity))

Float(undefined)

(1)

``


 

Download aquestion.mw

Hi. How can I see the code of a graph already plotted.

Thanks

hi
can somebody hep me
i dont know how to add a neww member to an existing set!?
i made an empty set and in my loop for each prime answer i have to add a new memeber to my set but i dont know how!

Is this a correct way to define a piecewise function in which substitution occurs, or are there better ones?

Data := [L=1000, F=1000, E=206000, d0=10];

Diameters := X -> eval(subs(Data, piecewise(x<L/2, d0 ,x<2/3*L, 2*d0 ,x>2/3*L, 1.5*d0)), x=X); 
 

Hello.

Regarding to my previous question I'd like to speed up calculations of the expression. 

restart;
tt := -0.689609e-3; T_c := .242731; mu := .365908; k := 1;
R1 := a*tanh((a^2-mu)/(2*T_c))*ln((2*a^2+2*a*q+q^2-2*mu-(I*2)*Pi*N)/(2*a^2-2*a*q+q^2-2*mu-(I*2)*Pi*N))/q-2;
R2 := Int(R1, a = 0 .. 10000);
R3 := q*ln((-q^2-k^2+mu+I*(2*N*Pi*T_c-(2*m+1)*Pi*T_c)+k*q)/(-q^2-k^2+mu+I*(2*N*Pi*T_c-(2*m+1)*Pi*T_c)-k*q))/(k*(tt+R2));
R4 := Sum(R3, N = -100 .. 100);
m := 1;
R5 := Int(R4, q = 0.1e-2 .. 10000);
R6 := evalf(R5);

Here I have integration procedure inside the expression R3, then the summation over the integer parameter N and then finally the integration again.

Is it possible to speed up calculations of this cumbersome expression? Or actually was I correct to write this simple code?

Thank you in a advance.

K := simplify(C, 'size');
      5                                                  4   
lambda  + (-a__11 - a__33 - a__44 - a__55 - a__22) lambda  + 

  ((a__44 + a__33 + a__22 + a__11) a__55

   + a__44 (a__33 + a__22 + a__11) + (a__33 + a__22) a__11

                                      3                    
   + a__33 a__22 - a__32 a__23) lambda  + (((-a__33 - a__22

   - a__11) a__44 + (-a__33 - a__22) a__11 - a__33 a__22

   + a__32 a__23) a__55

   + ((-a__33 - a__22) a__11 - a__33 a__22 + a__32 a__23) a__44

   + (-a__22 a__33 + a__23 a__32) a__11

                                              2            
   - a__32 (a__13 a__21 + a__24 a__43)) lambda  + ((((a__33

   + a__22) a__11 + a__33 a__22 - a__32 a__23) a__44

   + (a__22 a__33 - a__23 a__32) a__11

   + a__32 (a__13 a__21 + a__24 a__43)) a__55

   + ((a__22 a__33 - a__23 a__32) a__11 + a__13 a__21 a__32) a__44

   + a__32 (a__11 a__43 a__24 - a__21 (a__14 a__43 + a__15 a__53)

  )) lambda + (((-a__22 a__33 + a__23 a__32) a__11

   - a__13 a__21 a__32) a__44

   - a__43 a__32 (a__11 a__24 - a__14 a__21)) a__55

   - a__15 a__21 a__32 (a__43 a__54 - a__44 a__53)

u := [coeffs(K, [lambda], 'l')];
[(((-a__22 a__33 + a__23 a__32) a__11 - a__13 a__21 a__32) a__44

   - a__43 a__32 (a__11 a__24 - a__14 a__21)) a__55

   - a__15 a__21 a__32 (a__43 a__54 - a__44 a__53), 1, 

  -a__11 - a__33 - a__44 - a__55 - a__22, (a__44 + a__33 + a__22

   + a__11) a__55 + a__44 (a__33 + a__22 + a__11)

   + (a__33 + a__22) a__11 + a__33 a__22 - a__32 a__23, ((-a__33

   - a__22 - a__11) a__44 + (-a__33 - a__22) a__11 - a__33 a__22

   + a__32 a__23) a__55

   + ((-a__33 - a__22) a__11 - a__33 a__22 + a__32 a__23) a__44

   + (-a__22 a__33 + a__23 a__32) a__11

   - a__32 (a__13 a__21 + a__24 a__43), (((a__33 + a__22) a__11

   + a__33 a__22 - a__32 a__23) a__44

   + (a__22 a__33 - a__23 a__32) a__11

   + a__32 (a__13 a__21 + a__24 a__43)) a__55

   + ((a__22 a__33 - a__23 a__32) a__11 + a__13 a__21 a__32) a__44

   + a__32 (a__11 a__43 a__24 - a__21 (a__14 a__43 + a__15 a__53)

  )]
u[1] = C__5;
(((-a__22 a__33 + a__23 a__32) a__11 - a__13 a__21 a__32) a__44

   - a__43 a__32 (a__11 a__24 - a__14 a__21)) a__55

   - a__15 a__21 a__32 (a__43 a__54 - a__44 a__53) = C__5
C__1 = u[3];
         C__1 = -a__11 - a__33 - a__44 - a__55 - a__22
C__2 = u[4];
   C__2 = (a__44 + a__33 + a__22 + a__11) a__55

      + a__44 (a__33 + a__22 + a__11) + (a__33 + a__22) a__11

      + a__33 a__22 - a__32 a__23
C__3 = u[5];
C__3 = ((-a__33 - a__22 - a__11) a__44 + (-a__33 - a__22) a__11

   - a__33 a__22 + a__32 a__23) a__55

   + ((-a__33 - a__22) a__11 - a__33 a__22 + a__32 a__23) a__44

   + (-a__22 a__33 + a__23 a__32) a__11

   - a__32 (a__13 a__21 + a__24 a__43)
C__4 = u[6];
C__4 = (((a__33 + a__22) a__11 + a__33 a__22 - a__32 a__23) a__44

   + (a__22 a__33 - a__23 a__32) a__11

   + a__32 (a__13 a__21 + a__24 a__43)) a__55

   + ((a__22 a__33 - a__23 a__32) a__11 + a__13 a__21 a__32) a__44

   + a__32 (a__11 a__43 a__24 - a__21 (a__14 a__43 + a__15 a__53)

  )
 

For some reason, Maple now hangs on the following Schrodinger PDE with initial and boundary conditions.

In Physics version 60, it works OK. No solution is returned, but it does not hang.

But when I updated to latest version of Physics, it hangs. I am not sure which version makes it hangs, I just know Maple does not hang in version 60. So the problem could have happend in any version after 60. I have not attempted to try them all to find out.

PackageTools:-Install("5137472255164416", version = 60, overwrite);
restart;
PackageTools:-IsPackageInstalled("Physics Updates");

              60


x:='x'; t:='t'; y:='y'; hbar:='hbar';f:='f';
pde:=  I* diff(f(x,y,t),t) = -hBar^2/(2*m) * (diff(f(x,y,t),x$2) +  diff(f(x,y,t),y$2)):
ic := f(x, y, 0) = sqrt(2)*(sin(2*Pi*x)*sin(Pi*y) + sin(Pi*x)*sin(3*Pi*y)):
bc := f(0, y, t) = 0,f(1, y, t) = 0, f(x, 1, t) = 0, f(x, 0, t) = 0:
sol:=pdsolve({pde,ic,bc},f(x,y,t));

            ()   #after only few seconds. No hang. good

 

Now in latest version of Physics

PackageTools:-Install("5137472255164416",  overwrite);
restart;
PackageTools:-IsPackageInstalled("Physics Updates");

                                  "74"

pde:=  I* diff(f(x,y,t),t) = -hBar^2/(2*m) * (diff(f(x,y,t),x$2) +  diff(f(x,y,t),y$2)):
ic := f(x, y, 0) = sqrt(2)*(sin(2*Pi*x)*sin(Pi*y) + sin(Pi*x)*sin(3*Pi*y)):
bc := f(0, y, t) = 0,f(1, y, t) = 0, f(x, 1, t) = 0, f(x, 0, t) = 0:
sol:=pdsolve({pde,ic,bc},f(x,y,t));

#after waiting for long time, had to terminate it
Warning,  computation interrupted

 

Why does Maple hangs on this PDE now and it did not before?

Using Maple 2018.1 on Linux

 

I am attempting to make the transition from Mathematica to Maple. I that regard, I would like to know how I would implement something like Mathematica's "Conditioned" in Maple. For example, how would I implement the example given in the diagram shown below involving the Poisson Distribution?

I am trying to solve a diffusion equation with a potential term that has an integral in it. The equation has the following form: 

PDE := diff(g(x, t), t) = diff((beta(x, t)+diff(g(x, t), x)), x), 

with the function beta: 

beta := proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = -infinity .. +infinity) end proc

The boundary conditions for the function g(x,t) are simply assumed to be a zero-centered Gaussian in space (i.e. in x). So it is unity for x=0 and zero for the outer boundary that we can set as x=L. 

The problem is easily solved if the function beta is not an integral, but in the current form I get the following error: 
*******
Error, (in pdsolve/numeric/process_PDEs) inconsistent dependencies in PDEs: g(x, t) v.s. g(y, t)

*******

So it does not like the dummy variable in the function g.  

I can not write an additional PDE for beta because my Kernel is an exponential so the integral never goes away. Anyone with a way to solve this?

ADDENDUM: I have now copied the scriptPDE_DIFFUSION_INTEGRAL.mw
 

restart

L := 20; betaz := proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = 0 .. L) end proc

proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = 0 .. L) end proc

(1)

PDE := diff(g(x, t), t) = diff(-betaz(x, t)+diff(g(x, t), x), x)

diff(g(x, t), t) = -(int(-abs(1, x-y)*exp(-abs(x-y))*g(y, t), y = 0 .. 20))+diff(diff(g(x, t), x), x)

(2)

v__t := 1; v__d := 0; IBC := {g(0, t) = exp(-(0.-v__d)^2/v__t), g(L, t) = 0*exp(-(L-v__d)^2/v__t), g(x, 0) = exp(-(x-v__d)^2/v__t)}

{g(0, t) = 1., g(20, t) = 0, g(x, 0) = exp(-x^2)}

(3)

pds := pdsolve(PDE, IBC, numeric, time = 100, range = 0 .. L, spacestep = .1)

Error, (in pdsolve/numeric/process_PDEs) inconsistent dependencies in PDEs: g(x, t) v.s. g(y, t)

 

p0 := pds:-plot(t = 0, numpoints = 100, color = red); p1 := pds:-plot(t = 10, numpoints = 100, color = red); p2 := pds:-plot(t = 20, numpoints = 100, color = blue); p6 := pds:-plot(t = 60, numpoints = 100, color = blue); p5 := pds:-plot(t = 50, numpoints = 100, color = blue); p3 := pds:-plot(t = 30, numpoints = 100, color = blue); p4 := pds:-plot(t = 40, numpoints = 100, color = green); p7 := pds:-plot(t = 70, numpoints = 100, color = blue); p8 := pds:-plot(t = 80, numpoints = 100, color = black); p9 := pds:-plot(t = 90, numpoints = 100, color = blue); plots[display]({p0, p2, p4, p8})

NULL


 

Download PDE_DIFFUSION_INTEGRAL.mw

below. 

 

Hi everybody,

 

Written in Maple 2015
restart:
t := table([1=table([a=123]) ]):
save t, MyFile:
restart:
read MyFile:
t[1][a] := 321;

The answer is  t[1][a] =321 (here a double underscore)

Now I read MyFile from Maple 2018
restart:
read MyFile:
t[1][a] := 321;

The result is   (t[1])[a] = 321   (still a double undercsore but the first level is enclosed between parentheses).

For a more hierarchical table, all the entries but the deeper one are between parentheses.

Does this difference in representations mean something about the inner representation of a table ?

Thank you all

First 801 802 803 804 805 806 807 Last Page 803 of 2427