Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I  can't seem to get a solution to the following problem.  Can anyone see where I am going wrong I thought I had correct IBC s but they may be wrong/ill-posed

Melvin
 

Two 1-D coupled Burgers equations - semiclassical case: remove O( `ℏ`^2) terms for u(x,t) but retain O( `ℏ`) terms for v(x,t):

In the quantum case, there are two coupled quantum Burgers equations, which each include the quantum potential terms.  As in the classical case above, we apply constant external forces Fuand Fv.  Our aim is to display the profiles of u(x, t) and v(x, t) as strings on x, t space.

#hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants

hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing

At O( `ℏ`^2) the real quantum potential term is zero, leaving the classical expression:

pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = .2

(1)

On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( `ℏ`) terms and so is retained as semiclassical

pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;

diff(v(x, t), t)+u(x, t)*(diff(v(x, t), x))-(1/2)*(diff(diff(u(x, t), x), x))+v(x, t)*(diff(u(x, t), x)) = .1

(2)

By inspection of the derivatives in above equations we now set up the ICs and BCs for u(x, t) and "v(x,t)."

The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for v and for u, notably a 1st derivative BC term for u.

IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u

{u(0, t) = .5-.5*cos(2*Pi*t), u(x, 0) = .1*sin(2*Pi*x), (D[1](u))(0, t) = .6283185308*cos(2*Pi*t)}

(3)

IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v

{v(0, t) = .2-.2*cos(2*Pi*t), v(x, 0) = .2*sin((1/2)*Pi*x)}

(4)

IBC := IBCu union IBCv;

{u(0, t) = .5-.5*cos(2*Pi*t), u(x, 0) = .1*sin(2*Pi*x), v(0, t) = .2-.2*cos(2*Pi*t), v(x, 0) = .2*sin((1/2)*Pi*x), (D[1](u))(0, t) = .6283185308*cos(2*Pi*t)}

(5)

pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution

_m2606922675232

(6)

The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:

T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;

2

 

Error, (in pdsolve/numeric/animate) unable to compute solution for t>HFloat(0.0):
matrix is singular

 

p1

(7)

Note that this plot also shows that there are regions in which pIm < 0,  pRe > 0.  Below, the 3D plot of u(x,t),v(x,t) also illustrates the quantum delocalisation of features:

T := 3; p1 := pds:-plot3d({[u, shading = zhue], [v, color = red]}, t = 0 .. T, x = -0.1e-2 .. 2,transparency = 0.0, orientation = [-146, 54, 0], title = print("Coupled quantum solution \n u(x, t) zhue, v(x,t) red", numeric),scaling=unconstrained):p1;

3

 

"Coupled quantum solution 
 u(x, t) zhue, v(x,t) red", numeric

 

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
matrix is singular

 

``


 

Download BurgersEqns.mw

Here it is:

#hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing
At O( 
`&hbar;`^2;
) the real quantum potential term is zero, leaving the classical expression:
pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;
              / d         \           / d         \      
      pdeu := |--- u(x, t)| + u(x, t) |--- u(x, t)| = 0.2
              \ dt        /           \ dx        /      
On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( 
`&hbar;`;
) terms and so is retained as semiclassical
pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;
                                                     2         
         / d         \           / d         \   1  d          
 pdev := |--- v(x, t)| + u(x, t) |--- v(x, t)| - - ---- u(x, t)
         \ dt        /           \ dx        /   2    2        
                                                    dx         

              / d         \      
    + v(x, t) |--- u(x, t)| = 0.1
              \ dx        /      
By inspection of the derivatives in above equations we now set up the ICs and BCs for 
u(x, t);
 and 
v(x,t).;
The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for 
v;
 and for 
u;
, notably a 1st derivative BC term for 
u;
.
IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u
          IBCu := {u(0, t) = 0.5 - 0.5 cos(2 Pi t), 

            u(x, 0) = 0.1 sin(2 Pi x), 

            D[1](u)(0, t) = 0.6283185308 cos(2 Pi t)}
IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v
                   /                                 
          IBCv := { v(0, t) = 0.2 - 0.2 cos(2 Pi t), 
                   \                                 

                             /1     \\ 
            v(x, 0) = 0.2 sin|- Pi x| }
                             \2     // 
IBC := IBCu union IBCv;
         /                                 
 IBC := { u(0, t) = 0.5 - 0.5 cos(2 Pi t), 
         \                                 

   u(x, 0) = 0.1 sin(2 Pi x), v(0, t) = 0.2 - 0.2 cos(2 Pi t), 

                    /1     \  
   v(x, 0) = 0.2 sin|- Pi x|, 
                    \2     /  

                                           \ 
   D[1](u)(0, t) = 0.6283185308 cos(2 Pi t) }
                                           / 
pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution
                     pds := _m2606922675232
The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:
T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;
                             T := 2
Error, (in pdsolve/numeric/animate) unable to compute solution for t>HFloat(0.0):
matrix is singular
                               p1
 

The help page for dsolve,numeric,events says that "A call to a procedure-form dsolve numeric procedure" can return the time that one or more events fired by coding the eventfire option.

I do not know how to code for this.

Please provide a simple example of a procedure-form dsolve numeric with an event that exhibits this feature.

 

sys.pdf

Can  anyone help me to proof that this solution is the right solution to this system ?

Good day to you all.

I would like to construct a plot of several data sources and would like to understand how I can animate each event.

For instance - consider a plot of 2 data sets (a simple example is in the attached worksheet), one as a point and another as a column. What is the most efficient way to construct this? Following that, how can both data sets be animated in synch?

Thanks for reading!

MaplePrimes_Example.mw

Hi everyone:

I'm going to write code to give me the following expression, how can I do it?
n is Natural and k=0..n. 

Just want labels but no axes. Also seems with axes=none sometimes I get wierd artifacts in the surfacewireframe where the wireframe is some wierd color. If I set the axes to normal it goes away and then usually it is ok. Sometimes half the graph is colored this way. It is with MatrixPlot.

How does one set the size of a 3D plot? I get tired of dragging it's size when it resets it to the default size. size=[w,h] does not work with plot3d.

 

matrixplot(A, style=surfacewireframe,heights=histogram);

when A has zero values they are graphed, is there any way to not have them show? Choose any matrix for A I just want to see non-zero elements.

 

Also when looking down on the 3d graph I'd like the tops of the histogram cells to be colored as if I'm looking at a 2d plot. When I do it now I can't tell any difference between any of the cells. This looks to be a lighting issue I suppose. There is some variation but it is very difficult to tell. Some light settings work better than others. Z-Hue seems to be the best but still a little washed out.

I've always found that the way maple handles rotating graphs to be very unintuitive. It is very difficult for me to get the exact view I want by rotating the graph.

 

Usually i want to view for 1 2d projection then rotate to view the other. In most programs one can do this easier and there usually is some modifier key. In maple this is not the case and how it handles rotation is bizzaire.

For example, if I set the orientation to be x axis and start to rotate by dragging the mouse horizontally the 3d graph starts to rotate all 3 axis. It seems to depend on where the mouse is exactly at in the graph. That is, if I drag only in the horizontal but the mouse starts at the top then it is different than when it starts at the bottom. This is not intuitive it it requires me to know exactly how maple does things and thing work backwards...

Many programs have a modifier key that will snap one direction/angle to not change. This is idea. rather than have all 3 angles changing arbitrarily(it is nice when one just wants to perview the graph in 3D but not good when one wants to get a specific angle).

 

Is there any easy way to get what I want? I know I can set the orientation manually. That is not what I'm after. I'm after changing the rotation algorithm that maple uses or to add a modifier key to restrict rotation to only 2 angles.

 

 

Draw the surface area of the paraboloid z=12-x^2-y^2 which is inside the cone z=sqrt(x^2+y^2)?

Hello,

I was working one of the problems for my course in structural dynamics and came across the following function that needs to be plotted. How can we do it in maple 2018.

 

i have a acceleration of record earthquake(in excel ) and i get fourier and power spectra from another software (seismosignal) .Now i want to get it in maple but i try a lot but i couldn't.
i very Eager to learn it

rr.xlsx

I compared the numerical value of an integral expression in Gradshteyn and Rhyzhik (8.431.5) for the BesselI(v,z) function to the BesselI(v,z) function in Maple 2019.2 and got different answers.  The GR expression is the difference of two integrals and it looks like Maple only evaluates the first integral, which is correct only if the order v is an integer.  Please see the attached.

BesselI.mw

At first, I appology my poor English and I am a non-proessional on mathematics and programing. I am an old retired engineer/researcher.

I found strange phenomena with maple.
Could someone please verify this result?
This is sound like a stupid joke.
This queation is related to factorization of composite number N=p*q
p, q are large prime number respectively.

Degits:=200;
1.    Let p is large prime such as 50 degits
2.    Let R is small integer such as 3
3.    Let q is nearest prime R*p
4.    Let N=p*q
5.    Let f=frac(N/(q+s))

j:=1;
m:=2^b*2^c;
r:=m/2^b;
b:=8; c:=0;
F:=[ ];
for s from -m to m by r do
f:= frac(N/(q+s));
      if f=0 OR 1.0 then f:=100000; # zero dev exeption;
      elif f <= 0.5 then f:=log10(f);
      elif f > 0.5 AND f < 1.0 then f:=-log10(1.0-f);
      else print(“error”) break;
      end if:
F:=[F[ ], [s, f]];  # maple plot format
j::=j+1;
end do:

6.    Draw a Graph s vs F

You wil find a oscillating graph with step at s=0;

7. b:=8 and c:=75; and try same caluclation.

You will find a graph with dip at s=0;
Caution! Resolution and Scanwidth can not go together.

8.    Let qx=q+10^25;
9.    Nx:=p*qx;
10.    Let ps:=sqrt(N/3.0) and let qs:=3.0*sqrt(N/3.0);
11.    fs:=frac(Nx/(qx+s));
Caution!  Nx not equal Ns:=p*qs
12.     Draw a graph s vs Fs with Nx, p, qs
You will find a similar graph dip point shifted from s=0
13. Verify qx=ps-dip point s

My questions are
1.    Is it a kaind of factorization of Nx?
2.    This phenomena hava posibirity to make a vulneravility for RSA crypto?
3.    Power spectrum of F( c=0) indicates R=q/p; with an peak
4.    Is it an rediscovery of “Wheel”?  Are thea any papers similar to this phenomena

I appreciate to read this questions.

Environment: Windows 10 for workstation and Maple 2019(64bit) CPU: Intel Xeon.

15 Dec 2019  some miss spelling corrected

                       A graph added   frac(N(q+s)) vs s b=8 c=75 

 

Dear maple user ,while solving the system of pdes i am getting the errors and unable to plot the curves. please help me to  rectify the errors and  plot the curves.

Thanks in advance

 

restart;
with(PDETools):
G:=1300:beta:=0.0075:epsilon:=4.9*(10)^(-6):Pa:=100:alpha:=24:Pv:=97:
sys1:= {G*(beta^2*u(r,z)*diff(u(r,z),z)+v(r,z)*diff(u(r,z),r)) = -diff(p(r,z),z) +beta^2*diff(u(r,z), z$2)+diff(u(r,z),r$2)+(1/r)*diff(u(r,z),r),G*(beta^2*u(r,z)*diff(v(r,z),z)+v(r,z)*diff(v(r,z),r)) = -diff(p(r,z),r) +beta^2*diff(v(r,z), z$2)+diff(v(r,z),r$2)+(1/r)*diff(v(r,z),r)-(v(r,z)/r^2),beta^2*diff(u(r,z),z)+diff(v(r,z),r)+(v(r,z)/r)=0  }:

IBC:=(D[1](u))(0, z) = 0,v(0,z)=0,phi*(D[1](u))(1, z)+u(1,z) = 0,v(1,z)=epsilon*(p(1,z)+(Pa/alpha)-1),p(r,-1)=0,p(1,z)=(Pv-Pa)/alpha:
sol := pdsolve(sys1, IBC, numeric):
r:=0:

p1 := sol:-plot(u(r, z), phi = 0, numpoints = 100, z = -1 .. 1, color = ["Blue"], legend = ["u(r,z)"]):

p2 := sol:-plot(u(r, z), phi = 0.15, numpoints = 100, z = -1. 1, color = ["red"], legend = ["u(r,z)"]):

p3 := sol:-plot(u(r, z), phi = 0.4, numpoints = 100, z = -1 .. 1, color = ["green"], legend = ["u(r,z)"]):

plots:-display({p1, p2,p3});

 

First 480 481 482 483 484 485 486 Last Page 482 of 2097