Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

If q := [q1(t),q2(t),q3(t)];

and L=cos(q1(t))+sin(q2(t))+5*dq1 + 4*dq3

now I want to get the result of the following expression

d(dL/d dq1)/dt=?,

how can i write the expression?

In above expression dq1 is the derivative of q1(t), and dq3 is that of q3(t),

How do I solve (1/2)*n^2 +2n-1=O(n^2) in maple2018?Thank you

curry(`?[]`,f)([1]);
                                                  

I have plotted a 3d figure with MAPLE. How can I snap a point in 3d figure and  show  the coordinate value of snaped point ?It  can be  carried out  easily in MATLAB,but I  cann‘t  snap the point used  point probe tool in MAPLE ?

Given 2 inputs
m = integer
c = integer

where c ≤ m/2

and variables, a_i, b_i, a, b (all non-negative integers)
Here, m is the digit length of a number where a_i and b_i represent digits in a number writen in base b. a is simply b-1 and is used as another digit.

I am interested in generating specific permutations of a_1 ... a_c  a ... a  b_c ... b_1 where the total number of digits is m and the number of a's in the centre is m-2c.

The permutations I am interested in satisfy the condition. a_i is to the left of b_j for i ≤ j


examples for m=7:
c=1
a1,a,a,a,a,a,b1

c=2
a1,a2,a,a,a,b2,b1
a1,a2,a,a,a,b1,b2
a1,b1,a,a,a,a2,b2
a2,a1,a,a,a,b1,b2
a2,a1,a,a,a,b2,b1

c=3
a1,a2,a3,a,b3,b2,b1
...

c=4
n/a   2c > m

I would like a function L(m,c) that creates all valid permuatations of a_1 .. a_c b_1 .. b_c  (2n terms)


I met up with a lecturer at my university and we came up with this code. Unfortunately it is for mathematica as he doesn't use Maple. I feel there may be a more efficient way than to generate all permutations and then delete some.

thank you in advance for any help.

Ben

Hi,

with the Physics package, I want to represent a discrete two-dimensional Hilbert space in a direct-product basis.

I have looked at https://www.mapleprimes.com/posts/209099-Tensor-Product-Of-Quantum-State-Spaces but am not sure how to implement bracketrules.

Let's assume I have one-dimensional bases A and B that span a two-dimensional space C. A is of size Na and B is of size Nb. Consequently, C is of size Na * Nb.

If I understand it correclty, this can be done with

Setup(hilbertspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C})

First question: Is this correct and if yes, why do I need to specify quantumbasisdimension for C?

Then, I want to define, using bracketrules, <A[i]| <B[j]| |Psi> = X[i,j],

where |Psi> lives in the full, two-dimensional space C and X is a matrix.

<B[j]|Psi> would be a state living in A and <A[i]||Psi> would be a state in B.

How do I define this?

bracketrules = {%Bracket(Bra(A, i)*Bra(B, j), Ket(C, t)) = X[i,j](t)}

gives me an error.

I found a way using the nested expression

bracketrules = {%Bracket(Bra(A, i), Ket(A, j)) = X[i,j], %Bracket(Bra(B, j), Ket(C)) = Ket(A, j)}

giving

Bracket(Bra(A, i), Bracket(Bra(B, j), Ket(C, t))) = X[i,j]

but this is error prone, clumsy and only works in one direction:

Bracket(Bra(B, j), Bracket(Bra(A, i), Ket(C)))

does not work. Of course, I could also specify rules for the reverse direction but this is quite an effort for higher-dimensional spaces (I have, e.g., 9-dimensional spaces in mind).

So how do I do this properly?

Please have a look at the attached example, where I also included time-dependence.

Thanks,

Henrik

 


 

-------``

First try

-------

restart; restart, with(Physics)

Setup(hilbertspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C}, bracketrules = {%Bracket(Bra(A, i)*Bra(B, j), Ket(C, t)) = X[i, j](t)})

Error, (in Physics:-Setup) expected first argument in the Bracket defining a bracket rule to be a 'Bra'; received: Physics:-`*`(%Bra(A, i), %Bra(B, j))

 

 

---------

Second try

---------

 

restart; restart, with(Physics)

Setup(hilbertspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C}, bracketrules = {%Bracket(Bra(A, i), Bra(B, j), Ket(C, t)) = X[i, j](t)})

[bracketrules = {%Bracket(%Bra(A, i), %Bra(B, j), %Ket(C, t)) = X[i, j](t)}, disjointedspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C}]

(1)

Bracket(Bra(A, i), Bra(B, j), Ket(C, t))

Physics:-`*`(Physics:-Bra(A, i), Physics:-Bra(B, j), Physics:-Ket(C, t))

(2)

--------

Third try

--------

 

 

restart; restart, with(Physics)

Setup(hilbertspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C}, bracketrules = {%Bracket(Bra(A, i), Ket(A, j, t)) = X[i, j](t), %Bracket(Bra(B, j), Ket(C, t)) = Ket(A, j, t)})

[bracketrules = {%Bracket(%Bra(A, i), %Ket(A, j, t)) = X[i, j](t), %Bracket(%Bra(B, j), %Ket(C, t)) = Physics:-Ket(A, j, t)}, disjointedspaces = {{A, C}, {B, C}}, quantumbasisdimension = {A = 1 .. Na, B = 1 .. Nb, C = 1 .. Na*Nb}, quantumdiscretebasis = {A, B, C}]

(3)

Bracket(Bra(A, i).Bra(B, j), Ket(C, t))

Physics:-`*`(Physics:-Bra(A, i), Physics:-Bra(B, j), Physics:-Ket(C, t))

(4)

Bracket(Bra(A, i), Bracket(Bra(B, j), Ket(C, t)))

X[i, j](t)

(5)

Bracket(Bra(B, j), Bracket(Bra(A, i), Ket(C, t)))

Error, (in Physics:-Bracket) expected a Bra and a Ket as a first and last arguments, or no Bra and no Ket when using the shortcut notation; received: Physics:-Bra(B,j), Physics:-Bracket(Physics:-Bra(A,i),Physics:-Ket(C,t))

 

``


 

Download twoD.mw

 

I have 3 lists of equal length:

A:=[1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5]
B:=[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5]
C:=[5,2,7,9,1,6,2,8,4,6,2,1,5,8,3,5,2,9,6,6,3,2,1,6,4]

I would like to make a 3-D plot of C dependent on A and B (Ex. C(1,1)=5, C(1,2)=2.. C(5,5)=4).

 

What would be the best way to plot this? I have tried 'pointplot3d' which returns a decent result, but I would prefer a filled plot if possible.

hi

I want to mix two curve and have only one figure(I want to compare two curve in one plot domain )?

Thank you

plot.mw
 

h1 := solve(Vdc = 0.1500000000e-2*sqrt(2.53669508*10^8*u^3-6.06101011*10^8*u^2+3.46343435*10^8*u), u); plot([h1], Vdc = 0 .. 11.5, color = [magenta], thickness = 1); plot(Vector([0, 3.38, 5.21, 6.97, 8.4108, 10.099, 10.9232, 11.8091]), Vector([0, 0.760e-1, .1275, .1994, .2286, .3222, .3637, .999]), style = point, symbol = asterisk, color = "Blue")

 

 

``


 

Download plot.mw

 

 

Hi, fairly simple question,

I solve a simple equation:

solve(x^x = 4, allsolutions, explicit);

#(2*(I*Pi*_Z7+ln(2)))/LambertW(_Z9, 2*ln(2)+(2*I)*Pi*_Z7)

Maple  gave me solution with prefix _Z for integer values, but why  _Z9 must be exactly equal  Zero  to be correct ?.

If _Z9 is integer it can also take other values than zero ?

Thanks in advance.



More information see attached file:

Download Allsolution.mw

 

There is a builtin command "callback". It exists both in Maple 5 and today's Maple. There is no documentation on it. What is it? Why does it exist? Is there any code that uses it?

Hi, fairly simple question,
I've been using the physics package to calculate various different tensors but I can't see that I can calculate a cotton tensor for a given metric, is this included in the physics package? If so what is the calling sequence as I cannot find it. I understand I could use the differential geometry package but I do not want to as I don't know how to set up an arbitrary metric, thanks in advance.

Where can I find help with graphing on Maple?

Hi there,

I have difficulties in solving the first partial derivatives dw/db and dw/dvarphi of this equation with its constraint:

w := exp(exp(x*b)*(r-1)/(1+varphi*exp(x*b))) where ln(r) = varphi*(exp(x*b))(r-1)/(1+varphi*exp(x*b))-1

Please help.

Regards,

Sarni Berliana

We have just released an update to Maple, Maple 2018.2. This release includes improvements in a variety of areas, including code edit regions, Workbooks, and Physics, as well as support for macOS 10.14.

This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2018.2 download page, where you can also find more details.

For MapleSim users, the update includes optimizations for handling large models, improvements to model import and export, updates to the hydraulics and pneumatics libraries, and more. For more details and download instructions, visit the MapleSim 2018.2 download page.

Hi all,

Anyone knows how to see a manual for DirectSearch:-GlobalSearch that explains what is done inside the function?

I tried to write "help(DirectSearch:-GlobalSearch)" and nothing. It opened an empty page written (no matches found). Is there any help for this function so I can know what's going on there?

More specifically, I'm trying solve the optimization probelm min(||Ax-b||_p) s.t. ||x||=1.

where A is a given matrix of size (n \times d)

b is a given vector of size (n \times 1)

p>0 is a scalar

and x is an unkown vector of size (d \times 1) that should be a unit vector.

I used DirectSearch:-GlobalSearch to solve this optimization problem. But since it's a non-convex optimization probelm, the function doesn't always return the optimal value. I want to read the manual of the function to understand what is done there and for which cases there are most chances that the function will not return the optimal value.

Thanks

First 781 782 783 784 785 786 787 Last Page 783 of 2254