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
  • And the Nobel prize in physics 2017 went for work in General Relativity ! Actually, experimental work involving sophisticated detectors and Numerical Relativity, one of the branches of GR. The prize was awarded to Rainer Weiss (85 years old, 1/2 of the prize), Barry Barish (81 years old, 1/4 of the prize) and Kip Thorne (77 years old, 1/4 of the prize) who have "shaken the world again" with their work on Ligo experiment, which was able to detect ripples in the fabric of spacetime.

    General Relativity continues to be at the center of work in theoretical and experimental physics. I take this opportunity to note that, in Maple 2017, among the several improvements in the Physics package regarding General Relativity, there is a new package, Physics:-ThreePlusOne, all dedicated to the symbolic manipulations necessary to formulate problems in Numerical Relativity.

    The GR functionality implemented in Physics, Physics:-Tetrads and Physics:-ThreePlusOne is unique in computer algebra systems and reflects the Maplesoft intention, for several years now, to provide the very best possible computer algebra environment for Physics, regarding current research activity as well as related education in advanced mathematical-physics methods.

    For what is going on in theoretical physics nowadays and its connection with General Relativity, in very short: the unification of gravity with the other forces, check for instance this map from Aug/2015 (by the way a very nice summary for whoever is interested):

    It is also interesting the article behind this map of topics as well as this brilliant and accessible presentation by Nima Arkani-Hamed (Princeton):  Quantum Mechanics and Spacetime in the 21st Century, given in the Perimeter Institute for Theoretical Physics (Waterloo), November 2014. 

    Edgardo S. Cheb-Terrab
    Physics, Differential Equations and Mathematical Functions, Maplesoft

    We have released a small maintenance update to Maple. Maple 2017.3 provides enhancements in several areas, including mathematical typesetting, pdsolve, and the Physics package. It also provides improvements to the MapleCloud, including a fix for a problem that prevented some Mac users from logging on with their Google credentials.

    This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2017.3 download page.

     

    Group of exercises solved using Maple scientific software, with the necessary considerations of some basic commands: evalf and convert that will show the solutions with the user-defined digits and the angular measurement in sexagesimal degrees. Important use of the law of the triangle through of vector position applied to vectors in vector spaces, vector force and vector moment for engineering students. In spanish.

    Exercises_of_vectors_forces_and_moment_with_Maple.mw

    Videotutorial:

    https://www.youtube.com/watch?v=DxpO0gc5GCA

    Lenin Araujo Castillo

    Ambassador of Maple

    # Riemann hypothesis is false! (simple proof)
     

    restart;
    assume( s>0, s<1/2, t>0 );
    coulditbe(abs(Zeta(s+I*t))=0);

                                  true

    # Q.E.D.

    Unfortunately coulditbe(Zeta(s+I*t)=0) returns FAIL, but our assertion is already demonstrated!

    The moral: the assume facility deserves a much more careful implementation.

    We’ve just released a major new version of MapleSim. The MapleSim 2017 family of products provides new and improved model development and analysis tools, expands modeling scope, introduces new deployment options, and strengthens toolchain connectivity.  Here are some highlights:

    • The new Initialization Diagnostics App further simplifies the initialization task by helping you determine how your initial values are computed and what you need to do to adjust them.
       
    • The new Modal Analysis App helps you explore and understand the natural vibration modes of your mechanism, so you can determine how to reduce the vibration in the final product. 
       
    • Over 100 new components include expansions to the Electrical and Magnetic libraries.
       
    • A new Modelica® code editor makes it easier to create Modelica-based custom components.
       
    • The MapleSim Heat Transfer Library from CYBERNET, a new add-on component library, provides a comprehensive view into heat transfer effects in your model, enabling you to refine your  design to improve performance and avoid overheating.
       
    • The new MapleSim Explorer product provides a cost-effective deployment solution that allows you to make MapleSim models available to more people in your organization.

     

    There’s more, of course.  See What’s New in MapleSim for lots more details.

    eithne

    Try More/GeneratePDF  in  the menu under  a post/question. See screen_26.09.17.docx as an example of a result. Also Adobe Acrobat Reader fails with it. That was submitted to MaplePrimes staff through the Contact  button at the bottom of this page. I obtained no feedback from them.

    This might be of interest to some of us here - a comparison of differential equation solvers between many different packages/tools/libraries:

    http://www.stochasticlifestyle.com/comparison-differential-equation-solver-suites-matlab-r-julia-python-c-fortran/

    The "analysis" of maple's capabilities are presented as somewhat limited in comparison to mathematica's - I wonder if this is a simple bias/misinformation of the author, or if his conclusions are correct. 

    My interface has frozen, but above is a screen shot of what is by far the most unusual response from the CAS in the i guess 8 or so years ive been using it in total.

     

    *updated situation its allowing me to interrupt evaluation

    The development of the calculation of moments using force vectors is clearly observed by taking a point and also a line. Different exercises are solved with the help of Maple syntax. We can also visualize the vector behavior in the different configurations of the position vector. Applications designed exclusively for engineering students. In Spanish.

    Moment_of_a_force_using_vectors_updated.mw

    Lenin Araujo Castillo

    Ambassador of Maple

    A project that I have been working on is adding some functionality for Cluster Analysis to Maple (a small part of a much bigger project to increase Maple’s toolkit for exploratory data mining and data analysis). The launch of the MapleCloud package manager gave me a way to share my code for the project as it evolves, providing others with some useful new tools and hopefully gathering feedback (and collaborators) along the way.

    At this point, there aren’t a lot of commands in the ClusterAnalysis package, but I have already hit upon several interesting applications. For example, while working on a command for plotting clusters of points, one problem I encountered was how to draw the minimal volume enclosing ellipsoid around a group (or cluster) of points. After doing some research, I stumbled upon Khachiyan’s Algorithm, which related to solving linear programming problems with rational data. The math behind this is definitely interesting, but I’m not going to spend any time on it here. For further reading, you can explore the following:

    Khachiyan’s Algorithm had previously been applied in some other languages, but to the best of my knowledge, did not have any Maple implementations. As such, the following code is an implementation of Khachiyan’s Algorithm in 2-D, which could be extended to N-dimensional space rather easily.

    This routine accepts an Nx2 dataset and outputs either a plot of the minimum volume enclosing ellipsoid (MVEE) or a list of results as described in the details for the ‘output’ option below.

    MVEE( X :: DataSet, optional arguments, additional arguments passed to the plotting command );

    The optional arguments are as follows:

    • tolerance : realcons;  specifies the convergence criterion
    • maxiterations : posint; specifies the maximum number of iterations
    • output : {identical(data,plot),list(identical(data,plot))}; specifies the output. If output includes plot, then a plot of the enclosing ellipsoid is returned. If output includes data, then the return includes is a list containing the matrix A, which defines the ellipsoid, the center of the ellipse, and the eigenvalues and eigenvectors that can be used to find the semi-axis coordinates and the angle of rotation, alpha, for the ellipse.
    • filled : truefalse; specifies if the returned plot should be filled or not

    Code:

    #Minimum Volume Enclosing Ellipsoid
    MVEE := proc(XY, 
                  {tolerance::positive:= 1e-4}, #Convergence Criterion
                  {maxiterations::posint := 100},
                  {output::{identical(data,plot),list(identical(data,plot))} := data},
                  {filled::truefalse := false} 
                )

        local alpha, evalues, evectors, i, l_error, ldata, ldataext, M, maxvalindex, n, ncols, nrows, p1, semiaxes, stepsize, U, U1, x, X, y;
        local A, center, l_output; #Output

        if hastype(output, 'list') then
            l_output := output;
        else
            l_output := [output];
        end if;

        kernelopts(opaquemodules=false):

        ldata := Statistics:-PreProcessData(XY, 2, 'copy');

        nrows, ncols := upperbound(ldata);
        ldataext := Matrix([ldata, Vector[column](nrows, ':-fill' = 1)], 'datatype = float');

        if ncols <> 2 then
            error "expected 2 columns of data, got %1", ncols;
        end if;

        l_error := 1;

        U := Vector[column](1..nrows, 'fill' = 1/nrows);

        ##Khachiyan Algorithm##
        for n to maxiterations while l_error >= tolerance do

            X := LinearAlgebra:-Transpose(ldataext) . LinearAlgebra:-DiagonalMatrix(U) . ldataext;
            M := LinearAlgebra:-Diagonal(ldataext . LinearAlgebra:-MatrixInverse(X) . LinearAlgebra:-Transpose(ldataext));
            maxvalindex := max[index](map['evalhf', 'inplace'](abs, M));
            stepsize := (M[maxvalindex] - ncols - 1)/((ncols + 1) * (M[maxvalindex] - 1));
            U1 := (1 - stepsize) * U;
            U1[maxvalindex] := U1[maxvalindex] + stepsize;
            l_error := LinearAlgebra:-Norm(LinearAlgebra:-DiagonalMatrix(U1 - U));
            U := U1;

        end do;

        A := (1/ncols) * LinearAlgebra:-MatrixInverse(LinearAlgebra:-Transpose(ldata) . LinearAlgebra:-DiagonalMatrix(U) . ldata - (LinearAlgebra:-Transpose(ldata) . U) . LinearAlgebra:-Transpose((LinearAlgebra:-Transpose(ldata) . U)));
        center := LinearAlgebra:-Transpose(ldata) . U;
        evalues, evectors := LinearAlgebra:-Eigenvectors(A);
        evectors := evectors(.., sort[index](1 /~ (sqrt~(Re~(evalues))), `>`, ':-output' = ':-permutation'));
        semiaxes := sort(1 /~ (sqrt~(Re~(evalues))), `>`);
        alpha := arctan(Re(evectors[2,1]) / Re(evectors[1,1]));

        if l_output = [':-data'] then
            return A, center, evectors, evalues;
        elif has( l_output, ':-plot' ) then
                x := t -> center[1] + semiaxes[1] * cos(t) * cos(alpha) - semiaxes[2] * sin(t) * sin(alpha);
                y := t -> center[2] + semiaxes[1] * cos(t) * sin(alpha) + semiaxes[2] * sin(t) * cos(alpha);
                if filled then
                    p1 := plots:-display(subs(CURVES=POLYGONS, plot([x(t), y(t), t = 0..2*Pi], ':-transparency' = 0.95, _rest)));
                else
                    p1 := plot([x(t), y(t), t = 0..2*Pi], _rest);
                end if;
            return p1, `if`( has(l_output, ':-data'), op([A, center, evectors, evalues]), NULL );
        end if;

    end proc:

     

    You can run this as follows:

    M:=Matrix(10,2,rand(0..3)):

    plots:-display([MVEE(M,output=plot,filled,transparency=.3),
                    plots:-pointplot(M, symbol=solidcircle,symbolsize=15)],
    size=[0.5,"golden"]);

     

     

    As it stands, this is not an export from the “work in progress” ClusterAnalysis package – it’s actually just a local procedure used by the ClusterPlot command. However, it seemed like an interesting enough application that it deserved its own post (and potentially even some consideration for inclusion in some future more geometry-specific package). Here’s an example of how this routine is used from ClusterAnalysis:

    with(ClusterAnalysis);

    X := Import(FileTools:-JoinPath(["datasets/iris.csv"], base = datadir));

    kmeans_results := KMeans(X[[`Sepal Length`, `Sepal Width`]],
        clusters = 3, epsilon = 1.*10^(-7), initializationmethod = Forgy);

    ClusterPlot(kmeans_results, style = ellipse);

     

     

    The source code for this is stored on GitHub, here:

    https://github.com/dskoog/Maple-ClusterAnalysis/blob/master/src/MVEE.mm

    Comments and suggestions are welcomed.

     

    If you don’t have a copy of the ClusterAnalysis package, you can install it from the MapleCloud window, or by running:

    PackageTools:-Install(5629844458045440);

     

    These worksheets provide the volume calculations  of a small causal diamond near the tip of the past light cone, using dimensional analysis and particular test metrics.

    I recommend them for anyone working in causet theory on the problem of finding higher order corrections.

    2D.mw

    4D.mw

    4Dflat.mw

     

     

     

     

    With this app you will be able to interpret the curvatures generated by two position vectors, either in the plane or in space. Just enter the position vectors and drag the slider to calculate the curvature at different times and you will of course be able to observe its respective graph. At first I show you how it is developed using the natural syntax of Maple and then optimize our
     app with the use of buttons. App made in Maple for engineering students. In spanish.

    Plot_of_Curvature.mw

    Videotutorial:

    https://www.youtube.com/watch?v=SbXFgr_5JDE

    Lenin Araujo Castillo

    Ambassador of Maple

    There is a problem with mapleprimes favorites. 

    Looking at my list of favorites it cites I have 6 pages, however when I get to page 3 it shows a list of only six items and no more page listings after clicking the back button and going again to page 3 even less appear.  I was looking for specific questions and posts I have favorited which seem to be abscent from the listing. 

    Can mapleprimes administrators please address the problem?

    This is Maple:

    These are some primes:

    22424170499, 106507053661, 193139816479, 210936428939, 329844591829, 386408307611,
    395718860549, 396412723027, 412286285849, 427552056871, 454744396991, 694607189303,
    730616292977, 736602622363, 750072072203, 773012980121, 800187484471, 842622684461
    

    This is a Maple prime:


    In plain text (so you can check it in Maple!) that number is:

    111111111111111111111111111111111111111111111111111111111111111111111111111111
    111111111111111111111111111111116000808880608061111111111111111111111111111111
    111111111111111111111111111866880886008008088868888011111111111111111111111111
    111111111111111111111116838888888801111111188006080011111111111111111111111111
    111111111111111111110808080811111111111111111111111118860111111111111111111111
    111111111111111110086688511111111111111111111111116688888108881111111111111111
    111111111111111868338111111111111111111111111111880806086100808811111111111111
    111111111111183880811111111111111111100111111888580808086111008881111111111111
    111111111111888081111111111111111111885811188805860686088111118338011111111111
    111111111188008111111111111111111111888888538888800806506111111158500111111111
    111111111883061111111111111111111116580088863600880868583111111118588811111111
    111111118688111111111001111111111116880850888608086855358611111111100381111111
    111111160831111111110880111111111118080883885568063880505511111111118088111111
    111111588811111111110668811111111180806800386888336868380511108011111006811111
    111111111088600008888688861111111108888088058008068608083888386111111108301111
    111116088088368860808880860311111885308508868888580808088088681111111118008111
    111111388068066883685808808331111808088883060606800883665806811111111116800111
    111581108058668300008500368880158086883888883888033038660608111111111111088811
    111838110833680088080888568608808808555608388853680880658501111111111111108011
    118008111186885080806603868808888008000008838085003008868011111111111111186801
    110881111110686850800888888886883863508088688508088886800111111111111111118881
    183081111111665080050688886656806600886800600858086008831111111111111111118881
    186581111111868888655008680368006880363850808888880088811111111111111111110831
    168881111118880838688806888806880885088808085888808086111111111111111111118831
    188011111008888800380808588808068083868005888800368806111111111111111111118081
    185311111111380883883650808658388860008086088088000868866808811111111111118881
    168511111111111180088888686580088855665668308888880588888508880800888111118001
    188081111111111111508888083688033588663803303686860808866088856886811111115061
    180801111111111111006880868608688080668888380580080880880668850088611111110801
    188301111111111110000608808088360888888308685380808868388008006088111111116851
    118001111111111188080580686868000800008680805008830088080808868008011111105001
    116800111111118888803380800830868365880080868666808680088685660038801111180881
    111808111111100888880808808660883885083083688883808008888888386880005011168511
    111688811111111188858888088808008608880856000805800838080080886088388801188811
    111138031111111111111110006500656686688085088088088850860088888530008888811111
    111106001111111111111111110606880688086888880306088008088806568000808508611111
    111118000111111111111111111133888000508586680858883868000008801111111111111111
    111111860311111111111111111108088888588688088036081111860803011111111863311111
    111111188881111111111111111100881111160386085000611111111888811111108833111111
    111111118888811111111111111608811111111188680866311111111111811111888861111111
    111111111688031111111111118808111111111111188860111111111111111118868811111111
    111111111118850811111111115861111111111111111888111111111111111080861111111111
    111111111111880881111111108051111111111111111136111111111111188608811111111111
    111111111111116830581111008011111111111111111118111111111116880601111111111111
    111111111111111183508811088111111111111111111111111111111088880111111111111111
    111111111111111111600010301111111111111111111111111111688685811111111111111111
    111111111111111111111110811801111111111111111111158808806881111111111111111111
    111111111111111111111181110888886886338888850880683580011111111111111111111111
    111111111111111111111111111008000856888888600886680111111111111111111111111111
    111111111111111111111111111111111111111111111111111111111111111111111111111111
    

    This is a 3900 digit prime number. It took me about 400 seconds of computation to find using Maple.  Inspired by the Corpus Christi College Prime, I wanted to make an application in Maple to make my own pictures from primes.

    It turns out be be really easy to do because prime numbers are realy quite common.  If you have a piece of ascii art where all the characters are numerals, you could just call on it and get a prime number that is still ascii art with a couple digits in the corner messed up (for a number this size, I expect fewer than 10 of the least significant digits would be altered).  You may notice, however, that my Maple Prime has beautiful corners!  This is possible because I found the prime in a slightly different way.

    To get the ascii art in Maple, I started out by using to import ( )  and process the original image.  First then and to get a nice 78 pixel wide image.  Then to make it a pure 1-bit black or white image.

    Then, from the image, I create a new Array of the decimal digits of the ascii art and my prime number.  For each of the black pixels I randomly use one of the digits or and for the white pixels (the background) I use 's.  Now I convert the Array to a large integer and test if it is prime using (it probably isn't) so, I just randomly change one of the black pixels to a different digit (there are 4 other choices) and call again. For the Maple Prime I had to do this about 1000 times before I landed on a prime number. That was surprisingly fast to me! It is a great object lesson in how dense the prime numbers really are.

    So that you can join the fun without having to replicate my work, here is a small interactive Maple document that you can use to find prime numbers that draw ascii art of your source images. It has a tool that lets you preview both the pixelated image and the initial ascii art before you launch the search for the prime version.

    Prime_from_Picture.mw

    With this application you will learn the beginning of the study of the vectors. Graphing it in a vector space from the plane to the space. You can calculate its fundamental characteristics as triangle laws, projections and strength. App made entirely in Maple for engineering students so they can develop their exercises and save time. It is recommended to first use the native syntax then the embedded components. In Spanish.

     

    Vector_space_with_projections_and_forces_UPDATED_2018.mw

    Vector_space_with_projections_and_forces_UPDATED.mw

    Movie #01

    https://www.youtube.com/watch?v=VAukLwx_FwY

    Movie #02

    https://www.youtube.com/watch?v=sIxBm_GN_h0

    Movie #03

    https://www.youtube.com/watch?v=LOZNaPN5TG8

    Lenin Araujo Castillo

    Ambassador of Maple

    First 52 53 54 55 56 57 58 Last Page 54 of 306