Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I just installed Maple 2018.   There are long delays when typing imput into a worksheet.  Never had this problem with Maple 2017. I assume that there is some new debugging going on during my input.  But, whatever it is, is there a way to turn it off?

Hello. I have the system of inequalities -x / 2> 0, -x> 0, (-x-y) / 2> 0, (-x-z) / 2> 0, -y> 0, -z> 0. Tell me, please, how to build a graph on it?

Error, (in is/internal) too many levels of recursion

I get the error above when attempting to solve for the roots of partial derivative.  My results are below:


 

S3 := -(1/2*I)*(-(2*I)*exp(I*Pi*k*tau/T)*Pi*k-exp(I*Pi*k*tau/T)*T+I*exp(I*Pi*k*tau/T)*Pi*k*tau+(4*I)*Pi*k-(2*I)*exp(-I*Pi*k*tau/T)*Pi*k+exp(-I*Pi*k*tau/T)*T+I*exp(-I*Pi*k*tau/T)*Pi*k*tau)*sin(2*Pi*k*x/T)/(Pi^2*k^2)

S3 = ((-I)*(1/2))*((I*Pi*k*tau-(2*I)*Pi*k)*(exp(I*Pi*k*tau/T)+exp(-I*Pi*k*tau/T))-T*(exp(I*Pi*k*tau/T)-exp(-I*Pi*k*tau/T))+(4*I)*Pi*k)*sin(2*Pi*k*x/T)/(Pi^2*k^2)
"(->)"true"(->)"true

Despite the the simplifications MAPLE generated above MAPLE does not recognize the expressions as being equivalent.  So set the following for the Fourier coeffs:NULL

Ck := (-I*((2*(I*Pi*k*tau-(2*I)*Pi*k))*cos(Pi*k*tau/T)-(2*I)*T*sin(Pi*k*tau/T)+(4*I)*Pi*k))*(1/(2*Pi^2*k^2))

-((1/2)*I)*(2*(I*Pi*k*tau-(2*I)*Pi*k)*cos(Pi*k*tau/T)-(2*I)*T*sin(Pi*k*tau/T)+(4*I)*Pi*k)/(Pi^2*k^2)

(1)

The Fourier series can now be expressed as a 1 sided series employing both the Sum vs sum vs add commands for comparison:``

T0 := kernelopts(cputime), time(), time[real]();

204175839, 9435456, 8.998352053

(2)

S7 := a[0]+Sum(Ck*sin(2*Pi*k*x/T), k = 1 .. m):

1600991, 0, 0.

(3)

solve([diff(S5, x) = 0, 0 < x, x < 10*T/(2*Pi*m)], x)

Error, (in is/internal) too many levels of recursion

 

solve([diff(S5, x) = 0, 0 < x, x < 1/8], x)

Error, (in is/internal) too many levels of recursion

 

``


 

Download 2_many_levels_of_recursion.mw

How I can pdsolve this partial fractional  equation?

1.mw
 

restart; CK := .3; Z := 10; L := 1; alpha := .95

###The Riemann–Liouville fractional integral H^alpha  is written in a convolution-form as:

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

 

#where GAMMA(...) represents the Gamma function

 

 
PDE := diff(theta(xi, beta), beta, beta)+L*(diff(theta(xi, beta), xi, beta, beta))+diff(theta(xi, beta), beta, beta, beta)+(1/2)*(diff(theta(xi, beta), beta, beta, beta, beta)) = H^(alpha-1)*CK*(diff(theta(xi, beta), xi, xi))+H(CK*Z+1)^(alpha-1)*(diff(theta(xi, beta), xi, xi, beta))+H^(alpha-1)*Z*(diff(theta(xi, beta), xi, xi, beta, beta))

Init := {theta(xi, 0) = 0, (D[2](theta))(xi, 0) = 0}

{theta(xi, 0) = 0, (D[2](theta))(xi, 0) = 0}

(1)

Bdry := {theta(0, beta) = 1, theta(10, beta) = 0}

{theta(0, beta) = 1, theta(10, beta) = 0}

(2)

smod1 := pdsolve(PDE, Init, Bdry, numeric)

 

 

``


 

Download 1.mw

 

I have just begun to study Green's functions and made some initial progress on a problem, but now need Maple to make further progress.  Apologies, I have written up the equations in LaTeX form rather than Maple, as my Maple has gotten very rusty.

$\frac{d^4y}{dx^4}=f(x)

y(0)=y'(0)=0, y(1)=y'(1)=0$

I showed that the Green function $G(x,u)$ for this equation satisfies a condition

$\lim_{\epsilon\to0}\bigg[\frac{\partial^3G}{\partial x^3}\bigg]_{x=u-\epsilon}^{u+\epsilon}=1$

and showed that there is continuity of the Green's function and its first and second partial derivatives with respect to $x$ at $x=u$.  The next step is to show that this function has a piecewise definition such that

\[G=\frac{1}{6}x^2(1-u)^2(3u - 2ux -x\] for x between the range 0 and u and such that

\[G(x,u)=\frac{1}{6}u^2(1-x^2)(3x - 2xu - u) for x between u and 1

I am not entirely sure how to do this with pen and paper, so I have reason to believe that it could be a done a lot more easily with Maple, if someone could give some pointers that would be much appreciated.

Hi, i want to plot a function say R(t,n),

plot(R(t), t = 500 .. 50000) how can specify the t can only take intger value in the range of [500, 50000]?

I am looking for something like :plot(R(t), t = 500 .. 50000, assume=integer)

Hi all, I am having the follwing DE:

restart: 
(diff(z(x), x, x))-z(x) - cos(2*x)/(1+delta*z(x)) = 0:

With initial conditions: z(-pi/4)=z(pi/4)=0 and |delta|<<1

I showed by hand by using perturbation theory the second order approximation. The hint was: you can use Maple to check your answer. 

Is there somebody who can help me with this?

 

 

I have been attempting to resolve a particular problem to which I have posted a number of questions in the past.  In my attempts I have stumbled onto a number of command syntax issues & inconsistent result outputs.  Each time I try to post questions that appear to me to be separate questions even though it pertains to the same problem.  On numerous occasions a website moderator has deleted my questions unilaterally because the moderator has the opinion the question is identical to a previous question.

Deleting my questions instead of placing them into a previous thread without a response impedes my progress.  I am going to repost this inconsistent output, ONCE again!  If it is directly related to another thread then notify me of the response somehow instead of simply deleting the question.

The following inconsistency as far as I can tell is not explained in any of my previous questions.  I have a series that represents a particular waveform.  The series representation gives a definitive output.  However, when attempting generate the series of the derivative of this waveform (Q3 & Q4), which does exist (Q1 & Q2), MAPLE chokes on that representation & simply continues to evaluate for days & weeks without generating an output.  Why is this?  If anyone gets a definitive result please post it so that I might be able to reproduce the results.

Thanks in advance.

inconsistent_results.mw

Hi, 

I'm currently studying the Rossler Attractor, which is the following system:

diff(x(t), t) = -y(t)-z(t)

 diff(y(t), t) = x(t)+a*y(t)

diff(z(t), t) = b+x(t)*z(t)-c*z(t).

I have found the points of equilibrium of the system.

But now I need to draw bifurcation diagrams: one for varying a, one for varying b, and one for varying c.

 

Can someone please help me with a procedure of how to do this?

Thanks in advance.

 

I have a relatively complicated ODE that i am plotting. One of the variables in particular (B[2211], purple line in the graph) should under go an exponential-like decay to zero, but instead flies off into negative territory  (see graph below) despite having a very simple equation:

problem variable rate of change= -problem variable*constant +linear combination of variables that  are always posotive.

 

My intuition is that this is because i have somehow used the odeplot tool wrong - possibly due to a problem with stepsizes.

Here is a MWE i've made:

aa_problem_MWE.mw

 

Let say I want to generate polynomail with unknown coefficients of variable (x,y,z,t,s) of 3-th order (NOT RANDOM ONE!).

Hey!

The more "nodes, compartments, ..." I define the longer my formula (see below) gets. The formula posted below is written for a starting situation of 9 nodes (i,j,k,l,m,p,q,r,s). The problem that I have is that, besides running out of letters to chose from, the formula is getting to long and is not clear anymore (losing the overview). So I'm looking for a way to write it shorter, especially for the bold parts I assume there must be a better way.

B is a 9x9 matrix, n[0]:=1, N:=9

for i in n[0] do for j to N do for k to N do for l to N do for m to N do for o to N do for q to N do for r to N do for s to N do

if B(i, j) = 1 and B(j, k) = 1 and B(k, l) = 1 and B(l, m) = 1 and B(m, o) = 1 and B(o, q) = 1 and B(q, r) = 1 and B(r, s) = 1 and i <> j and i <> k and i <> l and i <> m and i <> o and i <> q and i <> r and i <> s and j <> k and j <> l and j <> m and j <> o and j <> q and j <> r and j <> s and k <> l and k <> m and k <> o and k <> q and k <> r and k <> s and l <> m and l <> o and l <> q and l <> r and l <> s and m <> o and m <> q and m <> r and m <> s and o <> q and o <> r and o <> s and q <> r and q <> s and r <> s

then P[loss, i, j, k, l, m, o, q, r, s] := P[loss, i, j, k, l, m, o, q, r]*P[fw, r, s]*P[suppr, i, j, k, l, m, o, q, r]*P[fo, s] else P[loss, i, j, k, l, m, o, q, r] := 0 end if; if P[loss, i, j, k, l, m, o, q, r] <> 0 then print(subs(I = i, J = j, K = k, L = l, M = m, O = o, Q = q, R = r, 'P[loss, I, J, K, L, M, O, Q, R]') = P[loss, i, j, k, l, m, o, q, r]) end if end do end do end do end do end do end do end do end do end do

 

I tried i<>j<>k<>l<>m<>o<>p<>q<>r<>s but that does't work

P.S.: Do you always have to specify something after ELSE using the IF loop? Actually I just don't want maple to do anything if the conditions are not met but since I then cannot print only the solutions I want (the ones for which the conditions are met) I always end up specifying something after else.

Thanks!!

This is about the recent implementation of tensor products of quantum state spaces in the Physics package, in connection with an exchange with the Physics of Information Lab of the University of Waterloo. As usual this development is available to everybody from the Maplesoft R&D Physics webpage. This is the last update for Maple 2017. The updates for Maple 2018, starting with this same material, will begin being distributed through the MapleCloud next week.

Tensor Product of Quantum State Spaces

 

Basic ideas and design

 

 

Suppose A and B are quantum operators and Ket(A, n), et(B, m) are, respectively, their eigenkets. The following works since the introduction of the Physics package in Maple

with(Physics)

Setup(op = {A, B})

`* Partial match of  'op' against keyword 'quantumoperators'`

 

[quantumoperators = {A, B}]

(1)

A*Ket(A, alpha) = A.Ket(A, alpha)

Physics:-`*`(A, Physics:-Ket(A, alpha)) = alpha*Physics:-Ket(A, alpha)

(2)

B*Ket(B, beta) = B.Ket(B, beta)

Physics:-`*`(B, Physics:-Ket(B, beta)) = beta*Physics:-Ket(B, beta)

(3)

where on the left-hand sides the product operator `*` is used as a sort of inert form (it has all the correct mathematical properties but does not perform the contraction) of the dot product operator `.`, used on the right-hand sides.

 

Suppose now that A and B act on different, disjointed, Hilbert spaces.

 

1) To represent that, a new keyword in Setup , is introduced, to indicate which spaces are disjointed, say as in disjointedhilbertspaces = {A, B}.  We want this notation to pop up at some point as {`&Hscr;`[A], `&Hscr;`[B]} where the indexation indicates all the operators acting on that Hilbert space. The disjointedspaces keyword has for synonyms disjointedhilbertspaces and hilbertspaces. The display `&Hscr;`[A] is not yet implemented.

 

NOTE: noncommutative quantum operators acting on disjointed spaces commute between themselves, so after setting  - for instance - disjointedspaces = {A, B}, automatically, A, B become quantum operators satisfying (see comment (ii) on page 156 of ref. [1])

 

"[A,B][-]=0"

 

2) Product of Kets and Bras (KK, BB, KB and BK) where K and B belong to disjointed spaces, are understood as tensor products satisfying, for instance with disjointed spaces A and B (see footnote on page 154 of ref. [1]),

 

`&otimes;`(Ket(A, alpha), Ket(B, beta)) = `&otimes;`(Ket(B, beta), Ket(A, alpha)) 

 

`&otimes;`(Bra(A, alpha), Ket(B, beta)) = `&otimes;`(Ket(B, beta), Bra(A, alpha)) 

 

while of course

Bra(A, alpha)*Ket(A, alpha) <> Bra(A, alpha)*Ket(A, alpha)

 

Details

   

 

3) All the operators of one disjointed space act transparently over operators, Bras and Kets of the other disjointed spaces, for example

 

A*Ket(B, n) = A*Ket(B, n)

and the same for the Dagger of this equation, that is

Bra(B, n)*Dagger(A) = Bra(B, n)*Dagger(A)

 

And this happens automatically. Hence, when we write the left-hand sides and press enter, they are automatically rewritten (returned) as the right-hand sides.

 

Note that for the product of an operator times a Bra or a Ket we are not using the notation that expresses the product with the symbol 5.

 

Regarding the display of Bras and Kets and their tensor products, two enhancements are happening:

 

• 

A new Setup option hideketlabel makes all the labels in Kets and Bras to be hidden when displaying Kets, Bras and Bracket(s), with the indices presented one level up, as if they were a sequence of labels, so that:

 "Ket(A,m,n,l"  

is displayed as

Ket(A, m, n, l)

 

  

This is the notation used more frequently when working in quantum information. This hideketlabel option is already implemented entering Setup(hideketlabel = true)

• 

Tensor products formed with operators, or Bras and Kets, that belong to disjointed spaces (set as such using Setup ), are displayed with the symbol 5 in between, as in Ket(A, n)*Ket(B, n) instead of Ket(A, n)*Ket(B, n), and `&otimes;`(A, B) instead of A*B.

Tensor product notation and the hideketlabel option

   

The implementation of tensor products using `*` and `.`

   

Basic exercising with the new functionality

   

Related functionality already in place before these changes

   

Reference

 

[1] Cohen-Tannoudji, Diue, Laloe, Quantum Mechanics, Chapter 2, section F.

[2] Griffiths Robert B., Hilbert Space Quantum Mechanics, Quantum Computation and Quantum Information Theory Course, Physics Department, Carnegie Mellon University, 2014.

See also

   

 


 

Download TensorProductDesign.mw
 

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Does any one know of a trick to make Maple solve this PDE using pdsolve?

restart;
pde:=diff(u(x,t),t)+diff(u(x,t),x)=0;
bc:=u(0,t)=0;
ic:=u(x,0)=x;
sol:=pdsolve({pde,ic,bc},u(x,t));

I have tried all HINTS and assumptions and Maple just returns () as solution.

Mathematica solve this as follows

ClearAll[u,x,t];
pde=D[u[x,t],t]+D[u[x,t],x]==0;
bc=u[0,t]==0;
ic=u[x,0]==x;
sol=DSolve[{pde,ic,bc},u[x,t],{x,t}]

 

Heavidside theta is basically a unit step function.

 

First 832 833 834 835 836 837 838 Last Page 834 of 2216