Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

AOA. I want to plot the graph of the following function 

 

A new generalized complex representation of Euler gamma function in terms of Dirac delta function, which is

GAMMA(s) = 2*Pi*(sum((-1)^n*Dirac(s+n)/factorial(n), n = 0 .. infinity))

where*s = sigma+i*tau

for differenet values of parameters

 

Hi everyone,

I was trying to write a Maple sheet to calculate some perturbation theory expension as close to the "book notation" as possible. Lets for example consider a linearly perturbed harmonic oscillator with H = hω(n+1/2) and V = λ(a+a), this is one of the classical examples as it can be solved analytically by completing the square. In the Kato formulation (as used in the appended Maple worksheet), as well as in Rayleigh-Schrödinger perturbation theory one uses the projector onto the complement of the unperturbed state. I would like to do this by defining a projector in Maple. I've read the examples concerning projectors in Maple but it seems I have to use a rather ugly workaround by treating the states "below" the unperturbed state and the ones "above" separately. While this is a little annoying in one dimension it becomes a major nuisance in higher dimensions.

My question would be: How do I define the projector onto the complement of some state?

Cheers, Sören

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

a := Annihilation(N, 1):

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

Physics:-Ket(N, m)

(1)

H := Physics:-`*`(Physics:-`*`(h, omega), n+1/2):

`ΔE__2` := simplify(value(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Dagger(psi), V), 1/(E(m)-H)), V), psi)))

-lambda^2/(h*omega)

(2)

`ΔE__4,111` := simplify(value(Dagger(psi).V.(1/(E(m)-H)).V.(1/(E(m)-H)).V.(1/(E(m)-H)).V.psi))

Error, (in Physics:-Dagger) numeric exception: division by zero

 

`ΔE__4,201` := -simplify(value(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Physics:-`*`(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Dagger(psi), V), 1/(E(m)-H)^2), V), psi), Dagger(psi)), V), 1/(E(m)-H)), V), psi)))

lambda^4*(2*m+1)/(h^3*omega^3)

(3)

`ΔE__4` := `ΔE__4,111`+`ΔE__4,201`

`ΔE__4,111`+lambda^4*(2*m+1)/(h^3*omega^3)

(4)

``

Download kato_perturbation_theory.mw

Hi everyone,

I'm running Maple 18 and MapleSim 6.4 on my macbook pro 13 " with retina display and the GUI is blurred like there is no smoothing or the antialiasing is not working properly. I tried to find something helpfull in the setting but with no luck.

Is there something I can do to fix this?

Thanks

Carlo

convert(50, base, 12);

this can change base for integer, however can not change decimal

assume i change decimal to fraction first and then apply convert base to 12 to numer and denom, and divide again to get decimal

it may get a decimal based on base 12

however, how to make this base 12 operation apply in linear algebra calculation

hi

DirectSearch answer has confused me. How to reduce the residual.
See the program.Direct.mw

Hi Maple users :)

do you know if exists a Maple package in order to perform a Panel method, for instance in the Hess-Smith version, for solving incompressible potential flow over thick 2d and 3d airfoil geometries?

Thank in advance for the help.

I have a matrix then I need to plot its columns as curves on one plot.

how to convert decimal number into given decimal number like algebra

for example, convert 191.715 , given a=12.2, b=3.5

how to find this a^2 + b^3

m := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

m2 := Determinant(m-Matrix([[1,0,0],[0,1,0],[0,0,1]]));

1. which family of polynomials do m2 belong to?

2. how to analyze m2?

Dear Friends

I have a problem in CPU time in MAPLE.

I write the codes in maple related to the nonlinear heat conduction problem in one dimension by Collocation method, but after 30 minutes no solution has been observed!!!

My codes are for N=4!, i.e., I have 25 equations with 25 unknowns!!!

If MAPLE can not solve this simple system, How can I solve 3 dimensional pdes by N=9,

In this case, I have 1000 equations with 1000 unknowns!!!

please help me and suggest me a fast iterative solver.

I should remark that my problem is stated in this paper

http://www.sciencedirect.com/science/article/pii/S1018364713000025

If there exist any other suitable method, I will be happy to receive any support.

 

With kind regards,

Emran Tohidi.

 

> restart;
> Digits := 20; N := 4; st := time(); u := sum(sum(a[m, n]*x^m*t^n, m = 0 .. N), n = 0 .. N); u := unapply(u, x, t); ut := diff(u(x, t), `$`(t, 1)); ut := unapply(ut, x, t); ku := simplify(1+u(x, t)^2); ku := unapply(ku, x, t); ux := diff(u(x, t), `$`(x, 1)); ux := unapply(ux, x, t); K := ku(x, t)*ux(x, t); K := unapply(K, x, t); Kx := diff(K(x, t), `$`(x, 1)); Kx := unapply(Kx, x, t); f := proc (x, t) options operator, arrow; x*exp(t)*(1-2*exp(2*t)) end proc;
print(`output redirected...`); # input placeholder
> S1 := {seq(u(i/N, 0)-i/N = 0, i = 0 .. N)}; S2 := {seq(u(0, j/N) = 0, j = 1 .. N)}; S3 := {seq(u(1, j/N)+ux(1, j/N)-2*exp(j/N) = 0, j = 1 .. N)}; S4 := {seq(seq(Kx(i/N, j/N)+f(i/N, j/N)-ut(i/N, j/N) = 0, i = 1 .. N-1), j = 1 .. N)}; S := `union`(`union`(`union`(S1, S2), S3), S4); sol := DirectSearch:-SolveEquations([op(S)], tolerances = 10^(-4), evaluationlimit = 1000000);
print(`output redirected...`); # input placeholder
> assign(sol);
%;
> u(x, t);
> CPUTIME := time()-st;
plot3d(u(x, t) - x exp(t), x = 0 .. 1, t = 0 .. 1)

Hello,

I just bought and installed "The mathematical Survival Kit" but I can't figure out how does it work

Anybody can help?

 

Thanaks

Martina

What is the command to get a sequence of the first twenty prime numbers

Code was computed on two different PC:
1) Win 8.1, Maple 17.02 x64
2) Win 8.1, Maple 18.01 x64

In brief:

n:=3: 
Grid:-Seq('f(i)', i = 1 .. n):

works well in Maple 17.02 but gives an error in Maple 18.01. Why?

However,

(j -> Grid:-Seq('f(i)', i = 1 .. j))(n):

works well for both Maple versions.

according to examples from Maple help page
http://www.maplesoft.com/support/help/Maple/view.aspx?path=Grid%2fSeq
we have to pass exactly 'f(i)' (not just f(i)) into Grid:-Seq(...). Why?

Why doesn't Digits:=30: work properly for Grid:-Seq(...)?

For details see attached file. Output was produced in Maple 17.02. In Maple 18.01 the output will differ.


restart; n := 3; f1 := proc (i) options operator, arrow; evalf(sqrt(i)) end proc; f2 := proc (i) options operator, arrow; evalf(sqrt(i+1)) end proc; f3 := proc (i) options operator, arrow; evalf(i*Pi) end proc; g1 := proc (f, n) local za, zb, zc, str; str := sprintf("g1(%a,n)", f); za := seq(f(i), i = 1 .. n); zb := Grid:-Seq(f(i), i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq(f(i), i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc; g2 := proc (f, n) local za, zb, zc, str; str := sprintf("g2(%a,n)", f); za := seq('f(i)', i = 1 .. n); zb := Grid:-Seq('f(i)', i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq('f(i)', i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc

3

(1)

g1(f1, n);

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(2)

Digits := 30;

30

 

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(3)

``

NULL


Download Grid[Seq].mw

i am trying to export an animated gif file but the export windows freezes and exports an empty file with zero bytes

the animation was created by: display(map(p, convert(A(() .. (), 2), list)), insequence = true)

i have tried to give maple some time (2-3 hours) and i even tried to restart the computer and lauch maple and try to export it but it didnt worked

how can i export it or how can i plot the using commands

 

First 194 195 196 197 198 199 200 Last Page 196 of 2097