tomleslie

13876 Reputation

20 Badges

15 years, 174 days

MaplePrimes Activity


These are replies submitted by tomleslie

@Bendesarts

In your definition of EQ2[i], ie

EQ2[i]:=beta0(t)=solve(EqAng2mod1[i][2],beta0(t)) assuming 0 < beta0(t) and beta0(t) < Pi:

what- exactly - is EqAng2mod1[i][2]?

Maybe it should be EqAng1mod1[i][2]?

If not, please provide the indexable entity EqAng2mod1[i][2]

@Declan 

My original was incorrect ( but can be easily corrected ). The following would seem to cover most of the possibilities. Something in this list of possibilities must be what you want (although I can think of a few otheres!!)

   a:=[3,6,2,7,5,4]:
#
# Numerically
#
    add(a[j]*10^(numelems(a)-j), j=1..numelems(a));
#
# With cat(), NB still need parse()
#
   parse(cat(a[]));
#
# As String
#
    cat(seq(convert(j, string), j in a));
#
# Using strings but converting back to numbers
#
    parse( cat(seq(convert(j, string), j in a)) );

Since assumptions are comma-separated, I'm guessing that your second equation is actually being treated as an additional assumption for the solution of your first equation?

Since you don't load executable code, I can't easily check this

Use the big green up-arrow in the Maplerimes editor toolbar to upload a simple example which "doesn't work" - then we can easily demonstrate what you have wrong

@Bendesarts 

Seems it was a "privilieges" issue

Have to disagree with Acer: there is a "lib" folder in your Maple installation path for the specific purpose of including libraries/modules/packages which you want to add. Mine currently  contains all the DirectSearch() stuff, MapletoMatlab (MTM) packages and a few other packages of my own.

When adding/modifying anything in this location, if you are worried about damaging anything, then you have two choices

  1. Rely on your overall backup strategy: on my system this folder is backed up every night. If I break/delete/damage anything, then it is a 30sec restore operation
  2. If you don't have a scheduled/operational backup strategy, then just make a copy of the 'lib' folder before you start writing/changing it. If anything goes wrong, swap the copy back in.

@Bendesarts 

Could be a "privilege" issue. Shut down maple and restart as "administrator".

@Carl Love 

   restart;
   pts1:=[[-4,1], [2,3]]:
   pts2:=[[-6,0], [1,5]]:
#
# Returns a list comprising the
#
#     intersection point
#     whether it is in the segment defined by pts1
#     whether it is in the segment defined by pts2
#
   inSegs:= proc( ll1::list, ll2::list)
                          local p, gC;
                          uses geometry;
                          seq( point(p||j, ll1[j]),
                                 j=1..2
                              );
                          seq( point(p||j, ll2[j-2]),
                                 j=3..4
                               );
                          line( L1,
                                 [p1, p2],
                                 [x, y]
                               );
                          line( L2,
                                 [p3, p4],
                                 [x, y]
                               );
                          gC:= op( [3,2],
                                        detail
                                        ( intersection
                                          (G, L1, L2)
                                        )
                                     ):
                           p:= x-> `and`
                                        ( seq
                                          ( `and`
                                            ( is( gC[j] >= min( x[1..2, j])),
                                              is( gC[j] <= max( x[1..2, j]))
                                           ),
                                           j=1..2
                                         )
                                      );
                            return [ gC, p(ll1), p(ll2) ];
                  end proc:
  inSegs( pts1, pts2);

The attached shows how to define points, lines and intersections using only the geometry package.

I don't think I understand the second part of your question about when points are on a given line, but you may want to consider the use of the IsOnLine() command in the attached

intersection.mw

@Kitonum 

I've come across the "truncated range" effect a couple of times before. If you use the option smartview=false, things get better. Seems like smartview isn't very "smart"

What you are doing is specifying what are called Neumann boundary conditions (check wikipedia or any halfway decent textbook on pdes)

This is *generally* OK but you have to take some care. As far as I can tell you have two problems: one syntactic, which can be fixed; and one conceptual, which probably(?) can't. NB when I say "probably can't", I think it is not solvable, but maybe someone else here knows better?

Starting with the basics - ie the syntactic problem.

You have to define the boundary conditions in a syntactically correct manner. Unfortunately you use an assignment to which you attempt to subsequently apply variables. This will never work! You need to understand the difference in Maple, between an assignment, an equation, and a function. Now once you have understood the distinction between these three entities, (together with the application of the 'D' operator), you will undertstand why I regenerate your boundary conditions as

L := 1651.12;
m := 3205.12;
r1 := .1875;
r2 := 2;
z1 := 0;
z2 := 12;
ld := 4.5;
BCS := { w(r, 0) = 0,
             (L+2*m)*D[1](u)(r1,ld)+L*D[2](w)(r1,ld)+L*u(r, z)/r=0,
             L*D[1](u)(r,z2)+(L+2*m)*D[2](w)(r,z2)+L*u(r, z)/r=0,
             m*D[2](u)(r1,z)+m*D[1](w)(r1,z)=T
          };


I think I have transcribed these correctly, but you should check, becuase I might be wrong.

Assuming that I have the above boundary conditions syntactically correct, then we move on to the conceptual problem, and this is harder to explain. A good textbook on numerical solution of pdes would help you. Very basically, when you have Neumann boundary conditions, then you have to ensure that these are "perpendicular" to the boundary. When a boundary condition is "parallel" to the boundary, then it gives no information in how to progress from the boundary. In fact when I did the syntax corrections above, and attempted a numeric solution, I got the error message

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[2](u))(.1875, z)

You have two pde's in two dependent functions - this is good

Each of the pde's is second order in the independent variables: two variables * second order means that you will need four boundary conditions in order to get an explicit solution

In the absence of boundary conditions, Maple can sometimes come up with an analytic solution in terms of four arbitrary constants, or a produce "simpler" set of equations which might be solvable (but still with four arbitrary constants). I tried this approach (briefly!), but didn't get anything particularly interesting.

I therefore think that you will have to solve this problem numerically, so you will need the four boundary conditions an preferably values for all of the parameters (L, m, n)

In future please use the big green up-arrow in the MaplePrimes editor to upload code - it is just possible that I failed to find an analytic solution because I had to retype your equations - and my typinig may not have been accurate

@Earl 

My DirectSearch.hdb file is 2711kB. Note kB not MB which you quote (albeit with the same number - 2711)

My DirectSearch.help file, created using Maple2015 (might have been Maple18 - I really can't remember) is 801kB. So considerably smaller than the corresponding .hdb file.

This .help file works just fine in Maple 2015 and Maple 2016. It is just a pity that according to site rules I cannot supply you with a copy

@Markiyan Hirnyk

@dharr

I'm the guilty party

I thought I'd solve the OP's problem, by sending him/her a zip file containing the DirectSearch .mla and .help database which I created with Maple 2015. I know that

"don't post copies of someone else's material here without permisson"

is a site rule -- but given the circumstances, and what was posted in this case, deleting my post seems a little overzealous???

The code snippets you present don't *really* define a recursive operation. To be recursive, the code

 

 

would actually have to be within the procedure fea(). Since you consistently refuse (why?) to upload the actual code which you are using - diagnosis gets really, really difficult. Always remember the big green up-arrow in the MaplePrimes editor is your friend.

With no uploaded code for diagnosis I can only offer some random thoughts

  1. The presence of 'return' statements, such as return printf("%d is composite",n) implies that most of the above code exists within some kind of procedure. Is this the procedure fea() or some other procedure which you are not telling us about? Are we supposed to guess???
  2. From the snippets you present, the first condition on C[0] depends on the value 'k'.  This is defined nowhere in the code you supply. Are we supposed to guess what the value might be??
  3. Like Doug I can see various ways to shorten/simplify the conditions which you are using, but cannot tell how valid they might be because you refuse to disclose the code which you are using
  4. As a general rule - if you have code which is non-functional, it is pointless to post "snippets". If you don't know why it is non-functional, then you don't know which bits are important

@Markiyan Hirnyk 

FYI
I didn't actually reinstall DirectSearch. I just copied the DirectSearch stuff from my Maple2015/lib directory to my Maple 2016/lib directory and everything seems to be working

So an obvious workaround would seem to be

  1. Do the conversion in Maple2015
  2. Copy results to Maple 2016
First 155 156 157 158 159 160 161 Last Page 157 of 207