MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Sometimes if code is not made available to download it must be transcribed or copied (I prefer the select content, crtl-c (copy), crtl-v (paste), route.  However sometimes the code must be decoded due to the way 2-D math is interpreted when it is copied to Notepad. 

    For example,

    a:=(x,t)->5*x+3*t*x^2    

    in Standard mode looks like       a := proc (x, t) options...

    If you have been logged in at mapleprimes in the last week you will know that I'm currently going through an obsession with plots. Indeed, some deadline is looming and it is all very stressful. For reference, and hopefully it may be of use to someone somewhere someday, I produce 2D plots with Standard GUI in the postscript format using plotsetup(ps). I'm on Windows for this. (3D plots aren't so hot with Standard GUI)

    I use LaTeX for my documents. I used to insert postscript...

    I've noticed times are off in mapleprimes. 

    For example, Foreign exchange post I replied to (yesterday morning? I'm sure it was, it was not last evening).  However this morning 7:58 am Sept 29 the post I replied with says I replied Yesterday at 8:45pm (something is amiss with am's and pm's or something)

     

    I made the switch from classic to standard largely because the 2D plot drivers/codes were completely rewritten in standard, and allowed me to export much prettier plots. This was a painful decision, because I always found classic to be more intuitive and faster. I don't care much for mouses and menus, I want code I can run and rerun as often as I like without having to remember a sequence of wrist movements. So now that I write in standard much of my recent work cannot be read...

    The goal here is to produce plots for inclusion inside Worksheets or Documents of the Standard GUI at specific sizes.

    [update: Maple 18 has this as a new feature for 2D plots. See the `size` option described on ?plot,options]

    When manually resizing an existing plot, using the mouse pointer, there is no visual cue as to what pixel size has been attained. Hence any worksheet author who wishes to produce a plot of size 600x600 is presented with two barriers. The first is that resizing must be done manually, and the second is that there is no convenient mechanism showing the actual size attained.

    The `Resize` package attempts to address these barriers by allowing construction of a plot, inside a worksheet, with programmatically specified width and height in pixels.

    The default behaviour of the package is to produce the plot inside a new Worksheet, from whence it may be selected and copied. An optional behaviour is to show the constructed plot inside a Task Template (a form of help-page), where it may be previewed for correctness and inserted into the current Worksheet or Document at the press of a single button.

    It appears to function for both 2D and 3D single plots.

    It won't work for so-called Array plots, which are collections of multiple plots displayed side-by-side inside a worksheet table.

    This first version is a bit rough. The plot is currently being inserted as input, which is why it isn't centered on the page. I suspect that it would be best to insert the first argument (eg. a `plot` call) as input to an execution group, and then have the plot be the output. That would look, and hopefully act, just as usual. And with the plot call inserted as input, the original `Resize` call could be neatly deleted if desired.

    To install this thing, use the File->Open from the Standard GUI's menubar. Choose this .mla file as the thing to open. (You may have to slide a scrollbar, and select a view of "All Files", in order to see it in the pop-up File Manager.) Double-clicking on the file, to launch it, should ideally also open it but it looks like that functionality broke for Maple 15.

    Resize_installer.mla

    Alternatively, you could run the command,

    march( 'open', "...full...path...to...Resize_installer.mla");

    The attached .mla archive is a (graphically) self-unpacking installer, when opened in this way.

    The bundled materials include a pre_built .mla containing the package itself, the source code and a worksheet that rebuilds it from source if desired, a short example worksheet, and a worksheet that rebuilds the whole installer (and re-bundles all those files into it). I used the `InstallerBuilder` to make the self-unpacking .mla installer, as I think it's a handy tool that is under-appreciated (and, alas, under documented!).

    It's supposed to work without the usual hassle of having to set `libname`. This is an automatic consequence of the place in which it gets installed.

    It seems to work in Maple 12, 14, and 15, on Windows 7. Let me know if you have problems with it.

    acer

    Several things are broken on mapleprimes right now, including

    - embedded (full) worksheets as displayed 2D Math, etc

    - reputation plots for several (if not most) members

    - both moderator badge updates

     

    I saw an image yesterday of some math done similar to how one can write on paper, with each new reformulation shown on the next line, with a down-arrow between each such line. In other words, operations and output moving down the sheet rather than along it to the right.

    The first thing that came to mind was: can this be done in Maple with context-menus?

    Here is an attempt,

        cm_downwards.mw

    It would be good I hope to present symbolic-numeric CAE system for framed structures analysis.

    It will be available soon as Preview version for enthusiasts

    The main features are:

    • One calculation act - all analytical dependencies.
    • Fast designing process for structural systems in industry, consulting and design companies;
    • Fastest parametric analysis of construction. New quality of designing in optimization tasks,...

    We have just released the MapleSim Driveline Component Library. Built with the involvement of several transmission manufacturers, this MapleSim add-on covers all stages in the powertrain, from the engine to the differential, wheels, and road loads, as well as vehicle dynamics. MapleSim and the MapleSim Driveline Component Library make it much easier for transmission manufacturers to reduce power loss through improved designs, resulting in more efficient vehicles.

    For...

    I think this is more of a blog but we don't have that option so it is here in a post.  Occassionally I like to use Maple to grab data from the internet. 

    The problem is that everyone seems to be changing the formats of their webpages.  Out with the old simple txt fomatted data webpages and in with the new html formatted webpages. The trouble with that is, if you already have a worksheet setup to manipulate the data using sockets or HTTP[Get] you...

    I have remarked on this ever since the launch of the second incarnation of mapleprimes. And I recall others expressing similar feelings.

    1. It should be possible to "vote" for comments in the same way as we can vote for "answers".
    2. The comments should be listed, right there next to Answers:

                          

       This is a promissory Maple package, which is rarely used (I found nothing  in MaplePrimes and in Application Center.). Let us see the ?padic package. It is well known that the field of rational numbers Q is not complete. For example, there does not exist a rational number k/n such that k^2/n^2=2. There are only two ways to complete Q ( http://en.wikipedia.org/wiki/Ostrowski's_theorem ) .  The first way is to create the field of real numbers R including Q. Every real number can be treated as a decimal fraction sum over [k in K] of a[k]*10^(k) with a[k] in {0,1,2,3,4,5,6,7,8,9}, finite or infinite. For example, the numbers 0.3+O(0.1), 0.33+O(0.01), 0.333+O(0.001), 0.3333+O(0.0001), ...  approximate the number  1/3.
       The second way is as follows (see http://en.wikipedia.org/wiki/P-adic_number  for more details). We choose a prime number p and consider the valuation v[p] of a rational number k/m=p^n*a/b <>0 where integers are supposed to be irreducible :v[p](k/m):=p^(-n) , v[p](0):=0. The completion of Q up to this valuation is the field of p-adic numbers Q[p] (also including Q).  Every p-adic number can be treated as a p-adic fraction sum over[k in K]of a[k]* p^(k) with a[k] in {0, 1, 2, 3, p-1}. For example, the numbers 2, 2+O(5),2+3*5+O(5^2),2+3*5+5^2+O(5^3) approximate the number 1/3 in Q[5]. These can be obtained with Maple as follows.
    > with(padic);
    > evalp(1/3, 5, 1);
                               2
    > evalp(1/3, 5, 2);
                            2+O(5)
    > evalp(1/3, 5, 3);
                              2+3*5+O(5^2)
    > evalp(1/3, 5, 4);
                             2+3*5+5^2+O(5^3)
        The field Q[p] is a very strange object. For example, the set of integers is bounded in Q[p] because v[p](k) <= 1 for every integer k. Another striking statement: the sequence p^n tends to 0 in Q[p] as n approaches infinity. The functions expp(x), logp(x), sqrtp(x) and the others are defined in the usual way as the sums of power series (see ?padic,functions for more details). For example,
    > Digitsp := 12;
    > logp(2+3*5+5^2, 5);

                   5+5^2+4*5^3+5^4+3*5^6+4*5^8+3*5^9+5^10+3*5^11+O(5^12)
    > cosp(x, p, 2);

                                padic:-cosp(x, p, 2)
    > eval(subs(x = 0, p = 5, padic:-cosp(x, p, 2)));

                                 1
    > eval(subs(x = 3*5, p = 5, padic:-cosp(x, p, 2)));

                                 1                            
        The definition of the limit of a sequence in Q[p] is identical to the one in R (of course,  abs(x[n]-a)<epsilon should be replaced by v[p](x[n]-a)<epsilon for every rational epsilon) and the same with the derivative. But every continuous function is picewise-constant. There also exists a non-injective function on Q[p] having the  derivative 1 at every point of  Q[p] . It should also be noticed that the radius of convergence of the expp(x):=sum(x^n/n!,n=0..infinity) series equals p^(-1) if p >2 and 2^(-2) if p=2. Next, there exists a Haar measure d[p](x)=:dx on Q[p] such that d[p](Z)=1. The definite integral of a real-valued function f(x) over a subset D of Q[p] with respect to  dx is defined in certain cases. For example, the definite integral of 1 over
    the ball B(0,p^n):={x in Q[p]: v[p](x)<=p^n} with respect to dx equals p^n, ie. the radius of B(0,p^n). It is clear that there does not exist any analog of the Newton-Leibniz formula in the p-adic case. Because of this reason every calculation of every definite p-adic integral is a hard problem.

            There are a lot of good and diffent books on p-adic analysis. In particular, see http://www.google.com/search?tbm=bks&tbo=1&q=p-adic&btnG= ,  http://books.google.com/books?id=H6sq_x2-DgoC&printsec=frontcover&dq=p-adic&hl=uk&ei=IgFuToupO8SL4gTE-tDOBA&sa=X&oi=book_result&ct=result&resnum=6&ved=
    0CEYQ6AEwBQ#v=onepage&q&f=false
    , and http://books.google.com/books?id=2gTwcJ55QyMC&printsec=frontcover&dq=p-adic&hl=ru&ei=UAxqTuabD5HGtAamhryxBA&sa=
    X&oi=book_result&ct=result&resnum=4&ved=0CDkQ6AEwAw#v=onepage&q&f=false
    as a good introduction to the topic.
         Why  is it so important? Which are applications? There are indications that the space  we live in has not  the Archimedean property (see http://en.wikipedia.org/wiki/Archimedean_property) on a very small scale. To verify this hypothesis is  a dozen times more expensive than  the large hadron collider
     (see http://en.wikipedia.org/wiki/Large_Hadron_Collider ). However, the mathematicians already develop the necessary mathematical tools, in particular, p-adic analysis.  Concerning other applications, see the answer by Anatoly Kochubei in
     http://mathoverflow.net/questions/62866/recent-applications-of-mathematics.

    Edit. The vanishing text and some typos.

     

    restart; interface(version); # Maple 15
    Digits:=40;
    # symbolic expression
    t:=1/292/(-77796+62196*I*3^(1/2))^(1/3)*73^(1/2)*
      ((-77796+62196*I*3^(1/2))^(1/3)*
      (-3*(-77796+62196*I*3^(1/2))^(2/3)-
      7812+688*(-77796+62196*I*3^(1/2))^(1/3)+
      3*I*3^(1/2)*(-77796+62196*I*3^(1/2))^(2/3)-7812*I*3^(1/2)))^(1/2)
      -0.3; # <--- does that give the trouble ?
    simplify(t); # makes it a float ...

      0...

     

                    

    3D Paper Physical Model

    We are looking for a Maple Wizard to join our team, based in California. US citizenship is an absolute requirement. Please send me a message if you are interested or know someone who might be.

    thanks

    First 107 108 109 110 111 112 113 Last Page 109 of 297