Maple 18 Questions and Posts

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

The following MWE shows what I mean:

with(Physics):Setup(mathematical=true):

Setup(noncommutativeprefix={MX,MY,MZ});

test:=proc()

    local eq;

    eq:=-Commutator(MX,MY)-Commutator(MZ,MY);

    eq:=simplify(subs(MX=-MZ,eq));

    return eq;

end proc:

 

test();  # yields -[-MZ,MY] - [MZ,MY]

 

%  # yields 0

 

 

Any ideas how I can solve this? I would like to return the simplified version.

Hi guys

 

I have an if statement inside a function. This function then get's called in a sum. However, the result is not correct as the if statement checks wether the argument equals 0, but since the sum passes only the summation index name, it doesn't work as intended.

How can I tell Maple, that it has to evaluate the index before passing it on? MWE appended.

 

Cheers

NOh

Comm := proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc;

proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc

(1)

Comm(0);

1

(2)

sum(Comm(j), j = 0 .. 0);

0

(3)

``

 

Download MWE.mwMWE.mw

I have an integral that maple can not solve but I can solve it by hand. How can I add this to maple integration database?

f:=int(r^2*BesselJ(0,a*r)*BesselI(1,b*r),r)

Please see the file below.

Integral.mw

 

Many many thanks! :)

Hi

How can I substitute a function in a matrix? This is what I tried but it's not working at all:

lign1:=x-y+2*z=1:
lign2:=(-2)*x+y+z=0:
lign3:=(-4)*x+y+7*z=2:
lign4:=3*x-2*y+z=1:
T := GenerateMatrix([lign1, lign2, lign3, lign4],[x, y, z], augmented);

Then I'd like to substitute another function with lign1:

lign5:=x+y+z=6:
T2:=subs(lign1=lign5, T);

But T2 = T and that wasn't really the point.

 

Sorry if the answer is obvious no amount of searching has helped me so far. I hope this question isn't too ridiculous.

Thanks

kappa := Vector(7, [1,w[1]*(1-phi+phi*(1-1/(1+exp(-mu[p]-tau[p3]))))+(1-w[1])*
(1-phi+phi*(1-1/(1+exp(-mu[p]-tau[p3]-eta[p2])))),w[1]*phi/(1+exp(-mu[p]-tau[
p3]))+(1-w[1])*phi/(1+exp(-mu[p]-tau[p3]-eta[p2])),w[1]*(1-phi+phi*(1-1/(1+exp
(-mu[p])))*(1-phi)+phi^2*(1-1/(1+exp(-mu[p])))*(1-1/(1+exp(-mu[p]-tau[p3]))))+
(1-w[1])*(1-phi+phi*(1-1/(1+exp(-mu[p]-eta[p2])))*(1-phi)+phi^2*(1-1/(1+exp(-
mu[p]-eta[p2])))*(1-1/(1+exp(-mu[p]-tau[p3]-eta[p2])))),w[1]*phi^2*(1-1/(1+exp
(-mu[p])))/(1+exp(-mu[p]-tau[p3]))+(1-w[1])*phi^2*(1-1/(1+exp(-mu[p]-eta[p2]))
)/(1+exp(-mu[p]-tau[p3]-eta[p2])),w[1]*(phi/(1+exp(-mu[p]))*(1-phi)+phi^2/(1+
exp(-mu[p]))*(1-1/(1+exp(-mu[p]-tau[p3]))))+(1-w[1])*(phi/(1+exp(-mu[p]-eta[p2
]))*(1-phi)+phi^2/(1+exp(-mu[p]-eta[p2]))*(1-1/(1+exp(-mu[p]-tau[p3]-eta[p2]))
)),w[1]*phi^2/(1+exp(-mu[p]))/(1+exp(-mu[p]-tau[p3]))+(1-w[1])*phi^2/(1+exp(-
mu[p]-eta[p2]))/(1+exp(-mu[p]-tau[p3]-eta[p2]))]);

Download kappa.txt

Here is the expression, I am trying to simplify, given a set of rules. NEW_Cole.mw

I have tried different substitutions, using simplify with side rules, applyrule, eval, subs, algsubs.

But none seem to be working as the way I want them to be.

 

Is there a better way?

 

Thanks!

The Embedded Components are containers that currently use industries for modeling complex systems to find viable solutions in real time and thus avoid huge wait times and overload our computer; by this paper should show you how to implement a dynamic worksheet through Embedded Components in Maple; it goes from finding solutions to ordinary differential equations partial; which interact with the researcher using different parameters.
Using graphical programming will find immediate solutions to selected problems in science and engineering criteria of variability and boundary conditions evolving development with buttons on multiple actions.

 

cimac_2014.pdf

(in spanish)

Solutions_of_Differential_Equations_with_Embedded_Components.mw

 

Lenin Araujo Castillo

Physics Pure

Computer Science

 

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

 

 

 

 

First 74 75 76 77 78 79 80 Last Page 76 of 87