tomleslie

4465 Reputation

10 Badges

9 years, 93 days

MaplePrimes Activity


These are replies submitted by tomleslie

  1. This is a bug
  2. I have checked all versions back to Maple 2015, and all produce an identical error message
  3. In Maple 18 (ie prior to Maple 2015), the pdsolve() command never(?) terminates - so maybe(?) it is stuck in some kind of infinte recursion, which is being "trapped" in subsequent releases
  4. Rather interestingly, the LHS of your PDE is the sum of three terms. Remove any one of these terms and the pdsolve() command completes without error. In two cases it obtains an analytic solution and in the third case it returns no solution

@asma khan 

but maybe something in the attached i what you want

  restart;
#
# Take N=8 as an example
#
  N:=8;
#
# Generate list of x-values
#
  x:=[ seq
       ( -1+j*(1/3),
         j=0..N
       )
     ];
#
# With x-values given above, diagonal entries
# of matrix P1 are given by
#
#       P1[i,i]=-x[i]
#
  P1:= Matrix( N+1,
               N+1,
               (i,j)-> `if`( i=j,
                             -x[i],
                             0
                           )
             );
#
# With x-values given above, diagonal entries
# of matrix P2 are given by
#
#       P2[i,i]=1-x[i]
#
  P2:= Matrix( N+1,
               N+1,
               (i,j)-> `if`( i=j,
                             1-x[i],
                             0
                           )
             );

N := 8

 

x := [-1, -2/3, -1/3, 0, 1/3, 2/3, 1, 4/3, 5/3]

 

Matrix(9, 9, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (2, 1) = 0, (2, 2) = 2/3, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1/3, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (3, 9) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = -1/3, (5, 6) = 0, (5, 7) = 0, (5, 8) = 0, (5, 9) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = -2/3, (6, 7) = 0, (6, 8) = 0, (6, 9) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = -1, (7, 8) = 0, (7, 9) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 0, (8, 8) = -4/3, (8, 9) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = -5/3})

 

Matrix(%id = 18446744074372138518)

(1)

 

 

Download doMat.mw

@Hajra Zeb 

and I'll say it again!!!

Upload a worksheet, using the big green up-arrow in the Mapleprimes toolbar.

Trying to diagnose problems by looking at pictures of code is almost impossible. On the other hand if you provide an actual worksheet, then responders here can execute/edit/debug. This way problem can be solved.

@reza gugheri 

I can use the file you have uploaded - but what do you want me to do with it?

@reza gugheri 

Save the worksheet.

Using the big green up-arrow in the Mapleprimes toolbar, navigate to the desired worksheet and upload it

  1. Use CTRL+Alt+Delete to bring up Task Manager. Under the processes tab, check for the entry mserver.exe. If one (or more) of these exist, right-click on each entry and use "End Process Tree"
  2. Try starting Maple again.

It woulld probably be a good idea if you could check whether you have a "start-up" issue or an "install" issue

It is worth checking the installer log for anything "suspicious".

This log file will be located in your installation directory (probably C:\Program Files\Maple 2018) and will be called

Maple_2018_dateTimeString.log

where dateTimeString in the above will depend on the date/time of installation. Dump this into your favourite editor and do a case insensitive search for the string "error" This *may* provide some enlightenment

@Hajra Zeb 

will generate a matrix containing the, unevaluated, indexed entries phi[i,j].

How these entries are evaluated to numbers depends on how you have assigned the entries phi[i,j], which your code snippet does not show.

If you need an explanation of this evaluation, you will have to provide information on the assignments of phi[i,j]

See the attached

N:=3;
getMat:= N-> Matrix
               ( N+1,
                 N+1,
                 (i,j)-> `if`( type(j, odd),
                               `if`( `and`( type(i, odd),
                                            i>=j
                                          ),
                                      phi[ i-1, (i-j)/2 ],
                                      0
                                   ),
                               `if`( `and`( type(i, even),
                                            i>=j
                                          ),
                                      phi[ i-1, (i-j)/2 ],
                                      0
                                   )
                             )
               ):
 Z:= getMat(N)^+;

N := 3

 

Matrix(%id = 18446744074370523494)

(1)

 


 

Download doMat3.mw

 

post low resolution pictures of worksheets which I can barely read

Post the actual, editable, executable worksheet using the big green up-arrow in the Mapleprimes toolbasr

@byrktr 

see the attached


 

restart:

 

 

we:=[1,2,8,9,15,16,22,23,29,30]:

wd:=[3,4,5,6,7,10,11,12,13,14,17,18,19,20,21,24,25,26,27,28]:

#printlevel :=3:

for j from 1 to 30 do
#her gündüz vardiyasında en az 4 hemşire bulunsun
a[j]:=sum(x[i][j][1], i=1..20)>=4:
end do:

A := [seq(a[j],j=1..30)]:

#her gece vardiyasında en az 4 hemşire bulunsun
for j from 1 to 30 do
b[j]:=sum(x[i][j][2], i=1..20)>=4:
end do:

 

B := [seq(b[j],j=1..30)]:

#her hemşire ayda en az 4 hafta içi gündüz vardiyasında çalışsın
for i from 1 to 20 do
c[i]:=sum(x[i][wd[k]][1], k=1..20)>=4:
end do:

C := [seq(c[i],i=1..20)]:

#her hemşire ayda en az 4 hafta içi gece vardiyasında çalışsın
for i from 1 to 20 do
d[i]:=sum(x[i][wd[k]][2], k=1..20)>=4:
end do:

dd:= [seq(d[i],i=1..20)]:

#her hemşire ayda en az 2 hafta sonu gündüz vardiyasında çalışsın
for i from 1 to 20 do
e[i]:=sum(x[i][we[k]][1], k=1..10)>=2:
end do:

E:= [seq(e[i],i=1..20)]:

#her hemşire ayda en az 2 hafta sonu gece vardiyasında çalışsın
for i from 1 to 20 do
f[i]:=sum(x[i][we[k]][2], k=1..10)>=2:
end do:

F:= [seq(f[i],i=1..20)]:

#gece vardiyasında çalışan hemşire ertesi gündüz ve gece vardiyalarında izinlidir
for i from 1 to 20 do
for j from 1 to 29 do
g[i][j]:=2*x[i][j][2]+x[i][j+1][1]+x[i][j+1][2]<=2:
end do:
end do:

for i from 1 to 20 do
g[i] := seq(g[i][j],j=1..29)
end do:

g:= [seq(g[i],i=1..20)]:

#her hemşirenin toplam çalıştığı vardiya sayısı mümkünse 12 ye en yakın olsun
for i from 1 to 20 do
sum(sum(x[i][c][k],c=1..30),k=1..2)=12+p[i]
end do:

#
# 'p' is not defined anywhere, so goal1 is
# completely undefined
#
  goal1:=sum(p[l],l=1..20);

p[1]+p[2]+p[3]+p[4]+p[5]+p[6]+p[7]+p[8]+p[9]+p[10]+p[11]+p[12]+p[13]+p[14]+p[15]+p[16]+p[17]+p[18]+p[19]+p[20]

(1)

#hemşireler mümkün olduğunca ardışık vardiyalara atanmasın
for i from 1 to 20 do
for j from 1 to 30 do
x[i][j][1]+x[i][j][2]=1+s[i]
end do:
end do:

#
# 't' is not defined anywhere, so goal2 is
# completely undefined
#
goal2:=sum(t[l],l=1..20);

t[1]+t[2]+t[3]+t[4]+t[5]+t[6]+t[7]+t[8]+t[9]+t[10]+t[11]+t[12]+t[13]+t[14]+t[15]+t[16]+t[17]+t[18]+t[19]+t[20]

(2)

with(Optimization):

#
# Since goal1 and goal2 are completely undefined
# goal1+goal2 is completely undefined, so no way the
# following can work
#
# Minimize( goal1+goal2),{A[],B[],C[],dd[],E[],F[],g[]}, assume = binary ):

 

 


 

Download tam3comment.mw

exaclt on whta you want, one of the commands

max([seq( mExact(k)-mNumer(k), k=0..1,0.1)]);
max([seq( evalf(mExact(k)-y(k)), k=0..1,0.1)]);
max([seq( abs(mExact(k)-mNumer(k)), k=0..1,0.1)]);
max([seq( abs(evalf(mExact(k)-y(k))), k=0..1,0.1)]);

will provide the required answer. Output from these commands for your problem is

 0.000000063396252
 0.000000005880000
 0.000000063396252
 0.000000204600000

respectively

@byrktr 

  1. Since you still do not supply a complete worksheet which illustrates Maple "crashing", there is not much anyone here can do
  2. If the problem is a limitation related to Maple's in-built Optimization:-Minimize() command, then other (free) optimizer packages are available for Maple (eg DirectSearch) which may be successful.
  3. Whether any package could definitively provide a global minimum is almost certain to depend on whether or not the problem is strictly convex. As far as I can tell from what you have provided so far all constraints appear(?) to be linear, so if the objective function (not supplied) is also linear in all unknowns, then the overall problem *ought* to be convex, and hence solvable
  4. AFAIK the assume=binary option is not available for the Optimization:-Minimize() command. A closely related restriction (binaryvariables=true) is available in the Optimization:-LPSolve() command. Using the latter command would require that the objective function and constraints are linear in all variables. This may be a better choice, but since you have not provide the objective function, I can't try this
  5. When using the DirectSearch() package it is possible to require that all variables are "binary", even for non-linear problems. Again, without a complete statement of the problem, I can't try this either.

Your worksheet contains the Optimization command

Minimize( sum(t[m], m=1..20),{A[],B[],C[],dd[],E[],F[],g[]}, assume = binary ):

However the list/Array/Vector 't' is defined nowhere.

Attempting to minimize an undefined expression is pretty much guaranteed to fail

Of course you could try another 'app' which does minimize undefined expressions!

so just bear with me.

I very much doubt that a problem with the help databases on the OrthogonalExpansions package could be causing any problems, but I admire your wish to keep your Maple installation as "clean" as possible, so maybe this should be fixed.

I apologise in advance if anywhere in the following I am "stating the obvious"

The message you are getting ie

"Converting C:\\Program Files\\Maple 2018\\lib\\OrthogonalExpansions.hdb to C:\\Program Files\\Maple 2018\\lib\\OrthogonalExpansions.help"
Error, (in HelpTools:-HelpCall) cannot create help database: 'unable to open database file"

suggests(?) a "privilege" problem. Solution is

  1. Start Maple with "admiinstrator" privilege
  2. Right-click on the desktop Maple icon or the .exe file in the Maple2018 directory - however you "normally" start Maple - and from the resulting pop-up, select "Run as Administrator"
  3. You should get the same warning message
  4. Now execute the HelpTools:-Database:-ConvertAll() command
  5. If this works, fine: shut down Maple and restart normally
  6. If it doesn't, get back to me

As I said earlier, I actually doubt if this "help database" problem is causing issues with your PDE. Much more likely is the version of the Physics package which you have installed. The Physics package uses a lot of PDE stuff, and upgrades to the former often result in upgrades to the latter. If I execute the command

Physics:-Version();

on my Maple 2018 installation, it returns (I have highlighted the relevant version numbers)

"C:\Users\TomLeslie\maple\toolbox\2018\Physics Updates\lib\Physics Updates.maple", `2019, March 14, 23:22 hours, version in the MapleCloud: 355, version installed in this computer: 326.`

If you execute the same command, which version of the Physics package updates do you have? Note down/emember your numbers for later

Since the Maple worksheet I originally provided works in Maple 2018, I have to assume that (maybe?!) one needs at least the Physics update 326. Since I am currently using Maple 2019 as my default, I don't normally do updates on prior versions - but the process is as follows:

  1. In the upper right corner of your Maple window, there is a "cloud" icon: click it; you should get a pop-up
  2. pause for a few seconds, because Maple has to go check whether or not "updates" are available: after a few secs you *ought* to get a "red" indicator above the "Updates" icon in this popup
  3. Assuming you do get this indication that updates are available, then click the "Updates" icon in this pop-up. This *ought* t open another window identifying which "packages" you have installed and whether or not any updates are available for these packages. The line entry "Physics Updates" in this new window *ought* to show an orange "Update" field
  4. Click this update field and wait for the installation to complete
  5. Shut down Maple and restart it
  6. Execute the Physics:-Version() command again to verify whether or not an updated version has been installed
  7. If this confirms a new Physics version, then re-run my original worksheet to see what happens

works fairly quickly (<10secs) in

Maple 2019
Maple 2018

but fails, or at least takes too long (>1min) for my patience in

Maple 2017
Maple 2016
Maple 2015
Maple 18

By the way responders on this site are Maple users, not (generally-speaking) Maple employees

I have previously noted that *sometimes* the fourier() command "fails", but performing the integration explicitly "works"

This shouldn't really be the case, because (according to the help page), if the command fourier() cannot find the transform in its look-up table, then explict integration is attempted (unless the user sets the NO_INT option)

Even setting 'infolevel' quite high it is not obvious (to me at least) that the fourier() command is even trying explicit integration.

In the attached, explicit integration workss for the erf() function

  restart;
  interface(rtablesize=10):
  interface(version);
  Physics:-Version();

`Standard Worksheet Interface, Maple 2019.0, Windows 7, March 9 2019 Build ID 1384062`

 

"C:\Users\TomLeslie\maple\toolbox\2019\Physics Updates\lib\Physics Updates.maple", `2019, April 26, 7:48 hours, version in the MapleCloud: 354, version installed in this computer: 350.`

(1)

  with(inttrans):
  infolevel[fourier]:=20;
  S := x->erf(x):
#
# No answer from fourier()
#
  ft1:=fourier(S(t),t,w);

20

 

fourier: Entering fourier with erf(t)
inttrans/fourier/lookup: Enter with  erf(t) t v
inttrans/fourier/lookup: Returning  FAIL
inttrans/fourier/main: Entering with erf(t) t v
inttrans/fourier/lookup: Enter with  erf(t) t _S
inttrans/fourier/lookup: Returning  FAIL

inttrans/fourier/main: Leaving(3) with fourier(erf(t) t v)

 

fourier(erf(t), t, w)

(2)

#
# But for the erf() function, integrating explicitly
# just "works"
#
  ft2:=int( S(t)*exp(-I*w*t), t=-infinity..infinity);
  plot( abs(ft2), w=0..10);

-(2*I)*exp(-(1/4)*w^2)/w

 

 

 

 

Download erfFour.mw

1 2 3 4 5 6 7 Last Page 1 of 140