Maple 18 Questions and Posts

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

Dear all

I have an optimization problem. I would like to add a condition to obtain only a positive integer as the solution to the problem 

 

 

Positive_integer.mw

 

thanks


 

with(LinearAlgebra); S[p] := 34.722406639004; alpha[1] := 0.2e-3; mu := 0.2041e-1; tau := .33; beta := .5; eta[1] := 0.96e-1; alpha[2] := .2; sigma := .9; e[o] := .33; delta := .2115; eta[2] := 0.2485e-2; A := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = alpha[1]*S[p], (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = beta, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0}); B := Matrix(6, 6, {(1, 1) = mu, (1, 2) = tau, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = e[o], (2, 1) = 0, (2, 2) = tau+mu, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = beta+eta[1]+sigma+mu, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = (1-delta)*alpha[2]-mu, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = alpha[2]*delta, (5, 5) = mu+eta[2], (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = mu+e[o]}); 1/B; VectorMatrixMultiply(A, 1/B)

S[p] := 34.722406639004

 

alpha[1] := 0.2e-3

 

mu := 0.2041e-1

 

tau := .33

 

beta := .5

 

eta[1] := 0.96e-1

 

alpha[2] := .2

 

sigma := .9

 

e[o] := .33

 

delta := .2115

 

eta[2] := 0.2485e-2

 

A := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0.6944481328e-2, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = .5, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0})

 

B := Matrix(6, 6, {(1, 1) = 0.2041e-1, (1, 2) = .33, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = .33, (2, 1) = 0, (2, 2) = .35041, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1.51641, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = .13729, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0.4230e-1, (5, 5) = 0.22895e-1, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = .35041})

 

Matrix(6, 6, {(1, 1) = 48.9955903968643, (1, 2) = -46.1417905623847, (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = -46.1417905623847, (2, 1) = 0., (2, 2) = 2.85379983447961, (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = -0., (3, 1) = 0., (3, 2) = 0., (3, 3) = .659452258953713, (3, 4) = 0., (3, 5) = 0., (3, 6) = -0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 7.28385170077937, (4, 5) = 0., (4, 6) = -0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = -13.4573892528049, (5, 5) = 43.6776588774842, (5, 6) = -0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 2.85379983447961})

 

Matrix(6, 6, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = -0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = -0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0.457955389901148e-2, (3, 4) = 0., (3, 5) = 0., (3, 6) = -0., (4, 1) = 0., (4, 2) = 0., (4, 3) = .329726129476857, (4, 4) = 0., (4, 5) = 0., (4, 6) = -0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = -0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = -0.})

(1)

LinearAlgebra:-Eigenvalues( (1) );

Vector(6, {(1) = 0.+0.*I, (2) = 0.+0.*I, (3) = 0.+0.*I, (4) = 0.457955389901148e-2+0.*I, (5) = 0.+0.*I, (6) = -0.+0.*I})

(2)


 

Download AB.mw

Dear all

I hope to find the maximum of a given function or show that the maximum is negative.

 

negative_maximum.mw

 

many thanks for your help

Since maple doesn't have mp3 support, the best we can do is just convert to a supported file type and go from there.  We can actually use maple's system command to work within maple to accomplish this and other tasks.  Actually someone using Matlab created an FFmpeg tool package - something similar could also be done with Maple.

So first you need to load the free open source FFmpeg software into your machine.  I'm using windows so Unzip into a folder then into right click on mycomputer go into properties advanced and add a new environment variable.

However I'm having a problem using the ssystem command.  The system command actually works fine, so I don't know if it's an issue with my format of the command or maybe it's a bug within the Maple 18 that I'm currently working in (perhaps it works on the newer versions) so here's the script

system("ffmpeg -i c:/test/test.mp3") #works fine outputed in a new window displays info about specified file

ssystem("ffmpeg -i c:/test/test.mp3") #maple is busy sitting executing with nothing happening

However this works,

ssystem("ffmpeg -version") #does output into Maple just information of the ffmpeg software version

so I suspect something to do with the file formatting??  Any ideas why ssystem doesn't output into maple using a file location?

 

Dear all

I tried to minimize a function but maple 18 does not return any solution.

minimize(sqrt(1-(4*(x-1))*(1-y)/(x^2*(1+y))), x = 3 .. 4, y = 0 .. 1, location)

 

thanks for any help

 

 

 

Hi

Is seem that maple change the order of the equation when I convert the system to matrix form

1) Can I kee the same order of the equations proposed in the system in order to get a special matrix form

2) Can I display the vector used in generating matrix maybe the order of unknown is inverted

system.mw

many thanks

 

Dear all

I have a second order partial differential equation.

I addeded some boundary conditions.

I tried to use plot3d for a function u(x,y) but there is no figure displayed.

 

plot_3d_curve.mw

 

I use Maple 18

Many thanks for your help

 

Hi guys,

I have problem with doing a complicated integral ! 

Thanks for your help.

cheers.

Question.mw

please help me export data of for(do) to excel


 

restart

Digits := 8

with(plots)

with(CurveFitting)

with(plottools)

with(ExcelTools)

v := .7

Disp := 20

esp := 1000000

k := 0

E := proc (x, t) options operator, arrow; Int(exp((-esp*w^4+Disp*w^2+k)*t)*cos(w*(x+v*t))/Pi, w = 0 .. infinity, epsilon = 0.1e-6) end proc

proc (x, t) options operator, arrow; Int(exp((-esp*w^4+Disp*w^2+k)*t)*cos(w*(x+v*t))/Pi, w = 0 .. infinity, epsilon = 0.1e-6) end proc

(1)

"f(x):=15.5*(e)^((-(x-12590)^(2))/(3710000))+14.55*(e)^((-(x-16100)^(2))/(3000000)):"

NULL

u := proc (x, t) options operator, arrow; Int(E(x-xi, t)*f(xi), xi = 0 .. 0.2e5, epsilon = 0.1e-4) end proc

proc (x, t) options operator, arrow; Int(E(x-xi, t)*f(xi), xi = 0 .. 0.2e5, epsilon = 0.1e-4) end proc

(2)

NULL

NULL

uu := evalf(Int(E(0-xi, i)*f(xi), xi = 0 .. 20000, method = _NCrule, epsilon = 10^(-6)))

Int((Int(.31830988*exp((-1000000.*w^4+20.*w^2)*i)*cos(w*(-1.*xi+.7*i)), w = 0. .. Float(infinity)))*(15.5*exp(-0.26954178e-6*(xi-12590.)^2)+14.55*exp(-0.33333333e-6*(xi-16100.)^2)), xi = 0. .. 20000.)

(3)

for i from 0 by 300 to 39000 do evalf(Int(E(0-xi, 39000-i)*f(xi), xi = 0 .. 20000, method = _NCrule, epsilon = 10^(-6))) end do

-0.40453181e-3

 

0.34992127e-3

 

0.12637278e-2

 

0.16816398e-2

 

0.98280208e-3

 

-0.90049939e-3

 

-0.31323275e-2

 

-0.41557391e-2

 

-0.25326936e-2

 

0.18889271e-2

 

0.72213081e-2

 

0.99627384e-2

 

0.68245493e-2

 

-0.27701468e-2

 

-0.15052225e-1

 

-0.22679194e-1

 

-0.18343538e-1

 

0.20091767e-3

 

0.26631663e-1

 

0.47005735e-1

 

0.46070677e-1

 

0.16544944e-1

 

-0.33724783e-1

 

-0.81923601e-1

 

-0.99668403e-1

 

-0.68223938e-1

 

0.83269218e-2

 

.10029034

 

.16367514

 

.16160510

 

0.85214080e-1

 

-0.37861317e-1

 

-.15374440

 

-.20787576

 

-.17365568

 

-0.69367811e-1

 

0.46138347e-1

 

0.98175763e-1

 

0.30797102e-1

 

-.16333068

 

-.42882780

 

-.65291065

 

-.68519320

 

-.36491699

 

.45065352

 

1.8601309

 

3.8933757

 

6.4921833

 

9.4993084

 

12.664412

 

15.671497

 

18.185563

 

19.912262

 

20.654429

 

20.352632

 

19.099001

 

17.122716

 

14.750504

 

12.351527

 

10.277969

 

8.8110726

 

8.1121013

 

8.2595148

 

9.1484300

 

10.625106

 

12.470000

 

14.442900

 

16.334977

 

17.814817

 

18.760786

 

19.181587

 

18.732976

 

17.780388

 

16.318411

 

14.486252

 

12.440398

 

10.334385

 

8.3022216

 

6.4471886

 

4.8365207

 

3.5019327

 

2.4446257

 

1.6429774

 

1.0611606

 

.65712596

 

.38895586

 

.21914009

 

.11682497

 

0.58405315e-1

 

0.26982858e-1

 

0.11209327e-1

 

0.39351902e-2

 

0.94525962e-3

 

-0.74540895e-4

 

-0.29495088e-3

 

-0.25204186e-3

 

-0.16004845e-3

 

-0.86532870e-4

 

-0.41463181e-4

 

-0.17899580e-4

 

-0.69278927e-5

 

-0.23491366e-5

 

-0.66829402e-6

 

-0.13686514e-6

 

-0.76837315e-8

 

0.49022551e-8

 

-0.69948640e-9

 

0.21531116e-8

 

0.94383197e-8

 

0.13935450e-7

 

0.74857886e-8

 

-0.17655857e-7

 

-0.20268315e-7

 

0.19079956e-6

 

0.10964273e-6

 

-0.46401214e-7

 

0.65111854e-8

 

0.19030541e-9

 

-0.32052754e-6

 

-0.33434254e-7

 

0.21130779e-7

 

-0.60700260e-9

 

-0.15371908e-9

 

0.56652633e-10

 

-0.29781841e-10

 

-0.17334684e-11

 

0.20761743e-11

 

0.98264048e-9

 

0.43165138e-11

 

-0.28235638e-7

(4)

NULL

NULL

NULL


 

Download getD1.mw

Help me to export data of 3d plot

Download export.mw

Hi,

I've been trying to replicate an example described in a book called "Quantum Mechanics Using Maple" by M. Horbatsch, but at the end, when I'm using fsolve it returns 0. instead .500 .

I'm using Maple 18, but I think this book was written using Maple V. I don't know if the syntax changes are causing this. I'm very new to maple. Here's my worksheet (qm_maple_-_periodic_potentials.mw) and book section (qm_maple_periodic.pdf). Thanks in advance!

BE312-1920-CW2-Amended-Maple-Codemw-46469mw-46557_(1).mw

 

How do you run this code in Maple 2019 to Maple 18 because I can't see the output?

Thank you


 

NULLrestart

Digits := 10:

with(plots):

with(CurveFitting):

with(plottools):

v := .7:

Disp := 20:

esp := 800000:

k := 0:

E := proc (x, t) options operator, arrow; int(exp((-esp*w^4+Disp*w^2+k)*t)*cos(w*(x+v*t))/Pi, w = 0. .. infinity) end proc;

proc (x, t) options operator, arrow; int(exp((-esp*w^4+Disp*w^2+k)*t)*cos(w*(x+v*t))/Pi, w = 0. .. infinity) end proc

(1)

f := proc (x) options operator, arrow; 20*exp(-(1/2000000)*(x-10000)^2)+15*exp(-(1/2000000)*(x-13800)^2) end proc:

 

 

u := proc (x, t) options operator, arrow; int(E(x-xi, t)*f(xi), xi = 0. .. 20000) end proc;

proc (x, t) options operator, arrow; int(E(x-xi, t)*f(xi), xi = 0. .. 20000) end proc

(2)

``

plot(u(x, t), x = 1500, t = 0 .. 60000, numpoints = 100)

Error, (in plot) unexpected options: [x = 1500, t = 0 .. 60000]

 

 

NULL

 

``

NULL


 

Download antegral.mw

4 5 6 7 8 9 10 Last Page 6 of 71