Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hi!

I seem to run into problems with (quantum) perturbation theory. In the following minimal working example, an energy denominator, as occuring in perturbation theory is not evaluated if I previously assume that the quantum number is a positive integer. It's supposed to return an error, as the energy denominator is 0.

restart; with(Physics)

a := Annihilation(N, 1, notation = explicit):

psi := Ket(N, m);

Physics:-Ket(N, m)

(1)

E := proc (g) options operator, arrow; (1/2)*g*(g-1)-mu*g end proc:

simplify(value(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Dagger(psi), 1/(E(m)-H)), psi)))

-I/(Im(m)*(2*Re(m)-1-2*mu))

(2)

assume(`in`(m, nonnegint), m > 0);

simplify(value(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Dagger(psi), 1/(E(m)-H)), psi)))

-2*Physics:-Bracket(Physics:-Bra(N, m), 1/(-2*mu*Physics:-`*`(`a-`[N[1]], `a+`[N[1]])+2*mu*m-m^2+Physics:-`*`(Physics:-`^`(`a-`[N[1]], 2), Physics:-`^`(`a+`[N[1]], 2))-4*Physics:-`*`(`a-`[N[1]], `a+`[N[1]])+2*mu+m+2), Physics:-Ket(N, m))

(3)

Parse:-ConvertTo1D, "invalid input %1", `.`(Dagger(psi), 1/(E-H), psi)

2/(2*mu*m-m^2+2*E+m)

(4)

``

Download energy_denominator.mw

 

Best regards,

Sören

Hi,

I was helping for a computing session today.

Maple 17 and 18 were not plotting the following:

 

restart:

with(plots):
spacecurve([x,cos(x), sin(x)], x = 0..10);

On some of the machines, with campus site license, windows 7, x64.

The plot came up with a "frame" only. And nothing was plotted.

We really can't figure out why?

Something to do with the settings(options)?

 

Had anyone had a similar experience?

 

Thanks,

 

casper

Hello everybody,

 

I find a answer on that subject at this link: http://www.mapleprimes.com/maplesoftblog/95508-Monte-Carlo-Pi

But for starting easy, I try this:

with(RandomTools[MersenneTwister]);
directpi := proc (n)
local i, x, y, N;
N := 0;
Digits := 2;
for i to n do
x := GenerateFloat();
y := GenerateFloat();
if x^2+y^2 < 1 then
N := N+1:
end if:
end do:
N;
end proc;


evalf(directpi(4000)/(1000.0), 4);

                             3.176

I would like to know if this code is appropriate and if it is possible to have a random number between -1 to 1 so it will be easier to plot the points in the square with the circle inside.

 

Thank you.

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

I'm trying to solve this system of ODEs by Laplace transform. 

> de1 := d^2*y(t)/dt^2 = y(t)+3*x(t)

> de2 := d^2*x(t)/dt^2 = 4*y(t)-4*exp(t)

with initial conditions 

> ICs := y(0) = 2, (D(y))(0) = 3, x(0) = 1, (D(x))(0) = 2

 

Using 

> deqns := de1, de2

and

> var := y(t), x(t)

 

I need to solve it for both y(t) and x(t), I have tried this by:

> dsolve({ICs, deqns}, var, method = laplace)

And

> dsolve({ICs, deqns}, y(t), method = laplace)

> dsolve({ICs, deqns}, x(t), method = laplace)

 

However I get this error message:

Error, (in dsolve/process_input) invalid initial condition

 

Any help is appreciated

Hi Maple friends.

Maple tends to spit out results(which comprise of variables) in very complicated forms, and I have to use the context menu to select 'simplify' to reduce them.

Is there a setting which will automatically simplify Maple's output?

Thanks in advance.

test.mw

can someone please look at this modified C.Love code, hopefully the problem i'm having is self explanatary.

I remember to have seen and used a command to make the graph of the output of FeynmanDiagrams but I can not find more sample files. Someone can tell me how to do (plot a Feynman graph using the result of FeynmanDiagrams).

Thanks and sorry for my english.

How do I permanently change the current directory on a MAC computer?

 

Kind regards

 

Per Kirkegaard

Hello,

I would like to know how to generate super/subscript characters in axis label. I have tried the double underscore (atomic variable style) and the super/subscript under "Format" in document mode but no luck at all. Any comment/suggestion is truly appreciated.

Yu-Hung Lien

 

 

 

 

Hi guys,

If I have a Hermitian 4x4 Matrix with elements that behave like complex numbers except that they do NOT commute. Is it possible to diagonalize this Matrix using Maple and the Eigenvectors - method of the LinearAlgebra package?

 

Cheers

NOh

 

 

P.S.: I am using Maple 18

Presented at the National University of Trujillo - CUICITI 2014.

IT Solutions for the Next Generation of Engineers

 

 

 

Descarga aqui los Slides de la presentación/mw CUICITI-2014

CUICITI_09102014.pdf

Soluciones_Informáticas_para_la_siguiente_generación_de_Ingenieros.mw

Lenin Araujo Castillo

Physics Pure

Computer Science

 

Hello everyone,

I've been trying to do some perturbation theory and ran into some problems I don't quite understand. I implemented the Hamiltonian of the Bose-Hubbard model and treated the hopping as a perturbation. Calculating the second order energy shift is easily accomplished, but when I'm only interested in one of the two occuring terms, I run into problems. The calculation takes minutes to finally fail, giving me an "too many levels of recursion"-error. I need to be able to just pick a few terms for some calculations, I'm doing, and can't figure out what I might be doing wrong. Here is the source code (download is below):

restart; with(Physics); Setup(mathematicalnotation = true)

a__1 := Annihilation(N, 1):

assume(`and`(`in`(m, nonnegint), m > 0)):

Physics:-Ket(N, m, m)

(1)

H := Physics:-`*`(Physics:-`*`(1/2, n__1), n__1-1)+Physics:-`*`(Physics:-`*`(1/2, n__2), n__2-1):

`&Delta;E__2` := Physics:-`*`(Physics:-`*`(2, d), simplify(value(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Dagger(psi), V), 1/(E(m, m)-H)), V), psi))))

-4*d*J^2*m*(m+1)

(2)

simplify(value(((Dagger(psi).c__2)*a__1.(1/(E(m, m)-H)).c__1)*a__2.psi))

Error, (in PatternMatching:-AlgStruct:-Match) too many levels of recursion

 

``

Download too_many_levels_of_recursion.mw

It would be great, if someone could point out the mistake, I'm making. I copy/pasted the last line, so there shouldn't be any typos.

Thanks in advance,

Sören

Every time I try to solve for a variable it gives me an arrow.

ex solve(5.6*10^-4=((x)(x))/(0.2-x),x)

gives me

x -> 7/62500 - 7/12500 x

How do I get it to stop giving me the x -> ?

Or at least reset some options so I don't have to reinstall the whole thing?

Hello,

first of all, this is my very fist question in this forum, so please excuse some formal mistakes I may make...

Using Maple 18.01 on Windows 7 64bit

To the topic: I want to calculate the eigenvalues of a complex matrix like this (just as an example):

M := Matrix(2, 2, {(1, 1) = a+2.5*I, (1, 2) = 1-I*a, (2, 1) = 4, (2, 2) = a})

When I try to calculate

Eigenvalues(M)

I get

Error, (in LinearAlgebra:-Eigenvalues) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values

Strange, because if I replace the "2.5" with just "2", so an integer instead of a float, I get results:

I don't understand this strange behavior, since Mathematica i.e. calculates everything just fine...:

Thanks in advance for any suggestions.

Hi everyone,

 

I am exploring the physics package a bit. However, in the documentation I didn't find anything about how to setup operator-ket relations like:

A | l,m,n > = f(l,m,n) | g(l,m,n), h(l,m,n), z(l,m,n) >

The Creation and Annihilation operators were the only predefined ones I found.

 

Cheers

NOh

First 68 69 70 71 72 73 74 Last Page 70 of 81