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
  • A wealth of knowledge is on display in MaplePrimes as our contributors share their expertise and step up to answer others’ queries. This post picks out one such response and further elucidates the answers to the posted question. I hope these explanations appeal to those of our readers who might not be familiar with the techniques embedded in the original responses.

    Before I begin, a quick note that the content below was primarily created by one of our summer interns, Pia, with guidance and advice from me.

    The Question: why is 2*cos(x)^2-1 simpler than 1-2*sin(x)^2

    The author, nm, asked why 2*cos(x)^2-1  was simpler than 1-2*sin(x)^2 according to Maple. nm wrote:

    I looked at help trying to understand why Maple thinks 2*cos(x)^2-1 is simpler than 1-2*sin(x)^2 but did not see it. I was expecting to see cos(2*x) as a result.

    Preben Alsholm answered nm’s question by recommending the use of the combine command to obtain the result he was expecting to see, as well as a further explanation on how the simplify command works. Alsholm wrote:

    Use combine to obtain what you want:
    combine(1-2*sin(x)^2);

    simplify has a general preference for cos over sin. That doesn't mean however, that it turns sin into cos at all costs:

    simplify(sin(x));
    ##Try also
    simplify(1-2*sin(x)^2,size);

    simplify doesn't necessarily get you the simplest result in the common sense of the word 'simplify'. Try as another example

    expand((x+y)^3);
    simplify(%);
    factor(%);

    As always, Alsholm provided an accurate, thoughtful response. But for those just learning Maple, I thought some additional explanation could be helpful.

    Let’s talk more about the simplify command and combine function

    The simplify command applies simplification rules to an expression. Its parameters can be any expression.

    The combine function applies transformations which combine terms in sums, products, and powers into a single term. For many functions, the transformations applied by combine are the inverse of the transformations that are applied by expand. For example, consider the well-known identity:

    sin(a + b) = sin(a) cos(b) + cos(a) sin(b)

    The combine function applies the identity from right to left, whereas the expand function does the reverse.

     

    I hope that you find this useful. If there is a particular question on MaplePrimes that you would like further explained, please feel free to contact me.

     


    In connection with recent developments for symbolic sequences, a number of improvements were implemented regarding symbolic differentiation, that is the computation of n^th order derivatives were n is a symbol, the simplest example being the n^th derivative of the exponential, which of course is the exponential itself. This post is about these developments, done in collaboration with Katherina von Bülow, and available for download as usual from the Maplesoft R&D web page for Differential Equations and Mathematical functions (the update itself is bundled with the official updates of the Maple Physics package).

     

    It is important to note that Maple is pioneer in having an actual implementation of symbolic differentiation, something that works for real, since several releases.  The development, however, was somewhat stuck because we were unable to compute the symbolic n^th derivative of a composite function f(g(z)). A formula for this problem is actually known, it is the Faà di Bruno formula, but, in order to implement it, first we were missing the incomplete Bell functions , that got implemented in Maple 15, nice, but then we were still missing differentiating symbolic sequences, and functions whose arguments are symbolic sequences (i.e. the number of arguments of the function is n, a symbol, of unknown value at the time of differentiating). All this got implemented now within the new MathematicalFunctions:-Sequence package, opening the door widely to these improvements in n^th differentiation.

     

    The symbolic differentiation code works as mostly all other computer algebra code, by mapping complicated problems into a composition of simpler problems all of which are tractable; what follows is then an illustration of these basic cases.

     

    Among the simplest new case that can now be handled there is that of a power where the exponent is linear in the differentiation variable. This is actually an easy problem

    (%diff = diff)(f^(alpha*z+beta), `$`(z, n))

    %diff(f^(alpha*z+beta), `$`(z, n)) = alpha^n*f^(alpha*z+beta)*ln(f)^n

    (1)

    More complicated, consider the k^th power of a generic function; the corresponding symbolic derivative can be mapped into a sum of symbolic derivatives of powers of g(z) with lower degree

    (%diff = diff)(g(z)^k, `$`(z, n))

    %diff(g(z)^k, `$`(z, n)) = k*binomial(n-k, n)*(Sum((-1)^_k1*binomial(n, _k1)*g(z)^(k-_k1)*(Diff(g(z)^_k1, [`$`(z, n)]))/(k-_k1), _k1 = 0 .. n))

    (2)

    In some cases where g(z) is a known function, the computation can be carried on furthermore. For example, for g = ln the result can be expressed using Stirling numbers of the first kind

    (%diff = diff)(ln(alpha*z+beta)^k, `$`(z, n))

    %diff(ln(alpha*z+beta)^k, `$`(z, n)) = alpha^n*(Sum(pochhammer(k-_k1+1, _k1)*Stirling1(n, _k1)*ln(alpha*z+beta)^(k-_k1), _k1 = 0 .. n))/(alpha*z+beta)^n

    (3)

    The case of sin and cos are relatively simpler, but then assumptions on the exponent are required in order to proceed further ahead from (2), for example

    `assuming`([(%diff = diff)(sin(alpha*z+beta)^k, `$`(z, n))], [k::posint])

    %diff(sin(alpha*z+beta)^k, `$`(z, n)) = (-1)^k*piecewise(n = 0, (-sin(alpha*z+beta))^k, alpha^n*I^n*(Sum(binomial(k, _k1)*(2*_k1-k)^n*exp(I*(2*_k1-k)*(alpha*z+beta+(1/2)*Pi)), _k1 = 0 .. k))/2^k)

    (4)

    The case of functions of arbitrary number of variables (typical situation where symbolic sequences are required) is now handled properly. This is the pFq hypergeometric function of symbolic order p and q 

    (%diff = diff)(hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[j], j = 1 .. q)], z), `$`(z, n))

    %diff(hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[j], j = 1 .. q)], z), `$`(z, n)) = (product(pochhammer(a[i], n), i = 1 .. p))*hypergeom([`$`(a[i]+n, i = 1 .. p)], [`$`(b[j]+n, j = 1 .. q)], z)/(product(pochhammer(b[j], n), j = 1 .. q))

    (5)

    The case of the MeijerG function is more complicated, but in practice, for the computer, once it knows how to handle symbolic sequences, the more involved problem becomes computable

    (%diff = diff)(MeijerG([[`$`(a[i], i = 1 .. n)], [`$`(b[i], i = n+1 .. p)]], [[`$`(b[i], i = 1 .. m)], [`$`(b[i], i = m+1 .. q)]], z), `$`(z, k))

    %diff(MeijerG([[`$`(a[i], i = 1 .. n)], [`$`(b[i], i = n+1 .. p)]], [[`$`(b[i], i = 1 .. m)], [`$`(b[i], i = m+1 .. q)]], z), `$`(z, k)) = MeijerG([[-k, `$`(a[i]-k, i = 1 .. n)], [`$`(b[i]-k, i = n+1 .. p)]], [[`$`(b[i]-k, i = 1 .. m)], [0, `$`(b[i]-k, i = m+1 .. q)]], z)

    (6)

    Not only the mathematics of this result is correct: the object returned is actually computable to the end (if you provide the values of n, p, m and q), and the typesetting is actually fully readable, as in textbooks, including copy and paste working properly; all this is new.

    The n^th derivative of a number of mathematical functions that were not implemented before, are now also implemented, covering the gaps, for example:

    (%diff = diff)(BellB(a, z), `$`(z, n))

    %diff(BellB(a, z), `$`(z, n)) = Sum(Stirling2(a, _k1)*pochhammer(_k1-n+1, n)*z^(_k1-n), _k1 = 0 .. a)

    (7)

    (%diff = diff)(bernoulli(z), `$`(z, n))

    %diff(bernoulli(z), `$`(z, n)) = pochhammer(nu-n+1, n)*bernoulli(nu-n, z)

    (8)

    (%diff = diff)(binomial(z, m), `$`(z, n))

    %diff(binomial(z, m), `$`(z, n)) = (Sum((-1)^(_k1+m)*Stirling1(m, _k1)*pochhammer(_k1-n+1, n)*(z-m+1)^(_k1-n), _k1 = 1 .. m))/factorial(m)

    (9)

    (%diff = diff)(euler(a, z), `$`(z, n))

    %diff(euler(a, z), `$`(z, n)) = pochhammer(a-n+1, n)*euler(a-n, z)

    (10)

    In the same way the fundamental formulas for the n^th derivative of all the 12 elliptic Jacobi functions  as well as the four elliptic JacobiTheta functions,  the LambertW , LegendreP  and some others are now all implemented.

    Finally there is the "holy grail" of this problem: the n^th derivative of a composite function f(g(z)) - this always-unreachable implementation of Faa di Bruno formula. We now have it :)

    (%diff = diff)(f(g(z)), `$`(z, n))

    %diff(f(g(z)), `$`(z, n)) = Sum(((D@@k)(f))(g(z))*IncompleteBellB(n, k, `$`(diff(g(z), [`$`(z, j)]), j = 1 .. n-k+1)), k = 0 .. n)

    (11)

    Note the symbolic sequence of symbolic order derivatives of lower degree, both of of f and g, also within the arguments of the IncompleteBellB function. This is a very abstract formula ... And does this really work? Of course it does :). Consider, for instance, a case where the n^th derivatives of f(z) and g(z) can both be computed by the system:

    sin(cos(alpha*z+beta))

    sin(cos(alpha*z+beta))

    (12)

    This is the n^th derivative expressed using Faa di Bruno's formula, in turn expressed using symbolic sequences within the IncompleteBellB  function

    (%diff = diff)(sin(cos(alpha*z+beta)), `$`(z, n))

    %diff(sin(cos(alpha*z+beta)), `$`(z, n)) = Sum(sin(cos(alpha*z+beta)+(1/2)*k*Pi)*IncompleteBellB(n, k, `$`(cos(alpha*z+beta+(1/2)*j*Pi)*alpha^j, j = 1 .. n-k+1)), k = 0 .. n)

    (13)

    These results can all be verified. Take for instance n = 3

    eval(%diff(sin(cos(alpha*z+beta)), `$`(z, n)) = Sum(sin(cos(alpha*z+beta)+(1/2)*k*Pi)*IncompleteBellB(n, k, `$`(cos(alpha*z+beta+(1/2)*j*Pi)*alpha^j, j = 1 .. n-k+1)), k = 0 .. n), n = 3)

    %diff(sin(cos(alpha*z+beta)), z, z, z) = Sum(sin(cos(alpha*z+beta)+(1/2)*k*Pi)*IncompleteBellB(3, k, `$`(cos(alpha*z+beta+(1/2)*j*Pi)*alpha^j, j = 1 .. 4-k)), k = 0 .. 3)

    (14)

    Compute now the inert functions: on the left-hand side this is just the (now explicit) 3rd order derivative, while on the right-hand side we have a sum of IncompleteBellB  functions, where the number of arguments, expressed in (13) using symbolic sequences that depend on the summation index k and the differentiation order n, now in (14) depend only on k, and get transformed into explicit sequences of arguments when the summation is performed and k assumes integer values

    value(%diff(sin(cos(alpha*z+beta)), z, z, z) = Sum(sin(cos(alpha*z+beta)+(1/2)*k*Pi)*IncompleteBellB(3, k, `$`(cos(alpha*z+beta+(1/2)*j*Pi)*alpha^j, j = 1 .. 4-k)), k = 0 .. 3))

    alpha^3*sin(alpha*z+beta)*cos(cos(alpha*z+beta))-3*alpha^3*cos(alpha*z+beta)*sin(alpha*z+beta)*sin(cos(alpha*z+beta))+alpha^3*sin(alpha*z+beta)^3*cos(cos(alpha*z+beta)) = alpha^3*sin(alpha*z+beta)*cos(cos(alpha*z+beta))-3*alpha^3*cos(alpha*z+beta)*sin(alpha*z+beta)*sin(cos(alpha*z+beta))+alpha^3*sin(alpha*z+beta)^3*cos(cos(alpha*z+beta))

    (15)

    Take left-hand side minus right-hand side

    simplify((lhs-rhs)(alpha^3*sin(alpha*z+beta)*cos(cos(alpha*z+beta))-3*alpha^3*cos(alpha*z+beta)*sin(alpha*z+beta)*sin(cos(alpha*z+beta))+alpha^3*sin(alpha*z+beta)^3*cos(cos(alpha*z+beta)) = alpha^3*sin(alpha*z+beta)*cos(cos(alpha*z+beta))-3*alpha^3*cos(alpha*z+beta)*sin(alpha*z+beta)*sin(cos(alpha*z+beta))+alpha^3*sin(alpha*z+beta)^3*cos(cos(alpha*z+beta))))

    0

    (16)

    NULL

    :)


    Download SymbolicOrderDifferentiation.mw


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

    My desk was covered with papers, a glass of water, and a big shipping container. Even though my chair was there, I was sitting on the floor with my laptop, having a bad hair day, and a robot was seated next to me.  This was a typical day at Maplesoft for an engineering co-op student.

    For this project, at the request of my manager, I left my duties as Spanish translator and marketing assistant and I started to work with the robot NAO from Aldebaran Robotics. The purpose of this project was to program NAO using Aldebaran’s Choreographe software to make new movements and dances that I would later use to create new MapleSim models for Maplesoft’s Model Gallery. Maplesoft’s marketing team would then use these models in some of their promotional activities.

    Given that NAO was going to travel to Taiwan in a short period of time, I wanted to focus on doing one elaborate dance and a couple of simple movements.Thanks to F.U.N. lab from the University of Notre Dame, I was able to focus on the detailed dance because they had an amazing Choreographe database of behaviour/movement code.   

    I started this project with zero knowledge about Choreographe, but with a good understanding of NAO´s MapleSim model that the Maplesoft engineers had previously created. After a few weeks with NAO and some YouTube tutorials, I discovered that programming NAO was really easy. I would move NAO’s joints to the positions I wanted to, and then I would tap its head to record and save them. I did this for a couple of weeks making sure that the sequence of movements wouldn’t make NAO fall or break a finger. At this point I was already a NAO expert.

    After finishing up all the movements and dances it was time to move on to the next phase of the project: obtaining the data for the MapleSim model. The MapleSim model was created using the Denavit-Hartenberg (DH) convention; therefore, I needed the values of the degrees of rotation of each joint while the robot performed a dance. These numbers were easily obtained using the “record” button in Choreographe and exporting them into a CSV file. This file was later attached to the MapleSim model, so it could be used in a time look up table. The input of NAO´s joints were then specified by using the values within this table.

    I started by recording the simplest movements: NAO blowing kisses and doing the sprinkler. These were the best ones to start working on because in these examples, the robot only needs to move its upper body, meaning that the lower body didn’t need any flexibility. This gave me and Abtin Athari, Application Engineer at Maplesoft, the freedom to simplify the original model by removing unnecessary degrees of freedom on the lower body. Abtin and I also realized that at the beginning of some of the new movements the robot would have too much torque, so we extended some of the recorded position of the rotational joints so the robot could stay in the same position for a longer time. These modifications ensured that the model wouldn´t have any problems during any of the simulations.

    To finish the project, I worked with the Marketing team to create some videos where we could display the real robot next to the MapleSim model doing the same movements. The purpose of these videos was to showcase the essence of the high-fidelity models that MapleSim allowed us to create. It was amazing to see how the MapleSim model corresponded so closely to the physical robot.

    After three weeks of intense work and meetings, my days as a robot whisperer ended. I learned new things about robots, how to build models with MapleSim, and the processes behind developing videos. It was a project that allowed me to wear both an engineer’s and a marketer’s shoes.  I was able to put into practice my technical knowledge and problem solving skills; and at the same time I was able to enhance my creative and analytical skills by evaluating the quality and impact of my work.

    Philip Yasskin, a long-time Maple user and professor at Texas A&M University is passionate about getting young people engaged in mathematics. One of his programs is SEE-Math: a two-week summer day camp for gifted middle school children interested in math. Maplesoft has been a long-standing supporter of SEE-Math, providing software and prizes for the campers.

    A major project in SEE-Math is developing computer animations using Maple. Students spend their time creating various animations, in hopes of taking the top prize at the end of the workshop. A slew of animations are submitted, some with pop-culture references, elaborate plot lines, and incredible detail. The top animations take home prizes, while all animations from that year are featured on the SEE-Math website.

    Maplesoft proudly sponsors this event, and many like it, to promote interest in STEM education. To see all of the animations from this year’s SEE-Math camp, please visit: http://see-math.math.tamu.edu/2015/. You can find the animations listed under “Euler,” “Godel,” “Noether,” and “Ramanujan,” found halfway down the page.

    On this week I asked Maplesoft Customer Service for help. Here is our correspondence
    (Only the purchase code and e-mail addresses are censored. PS. Also the last name of Kari was deleted by Bryon Thur on 28.08.2015.).
    I think this is of interest for many Maple users. I have got some experience contacting
    with Kaspersky Antivirus (They helped me by the use of indices of my comp.) and ABBYYLingvo
    (They helped to install an ABBYYLingvo vocabulary on my phone.) so I can compare and
    make conclusions.


    From:
    Sent: August-15-15 4:44 AM
    To: Maplesoft Customer Service
    Subject: Customer Service Request: (Web) Installation questions

    Hello,
    After upgrading my Windows 7 HB 32-bit to Windows 10 I cannot uninstall my Maple 16 PE.
     It cannot be uninstalled by neither Start/Parameters/System/Applications nor
    Uninstall in C/ProgramFiles/Maple 16.
    The Uninstall option is not seen in Maple 16 as application.
    Also the overinstallation of Maple 16 does not work.
    Waiting for your feedback.
    Sincerely,
    Markiyan Hirnyk
    ------------------------------------------------------------------------------------------------------

    Dear Markiyan Hirnyk,

    Thank you for contacting Maplesoft.

    Maple 16 is not officially supported on Windows 10 but I have added an activation to your
    existing Maple 16 Personal Edition purchase code: XXXXXXXXXXXXXXXX to see if reactivating
    your license fixes the issue.  If reactivating doesn't give you access to Maple 16, please
    send me the exact wording of any error messages that you receive so that I can send
     the information to our Technical Support Team so that they can investigate further.

    Kind regards,

    Kari
    Maplesoft
    Customer Service
    -----------------------------------------------------------------------------------------------------------
    Hello Kari,
    Unfortunately, neither the  reactivation of my Maple 16 PE by XXXXXXXXXX nor its uninstallation
    do not succeed for me. See the error communications in the attached screens (both in one file) screens_1_2.docx.
    It should be noticed that Maple V Release 4 works on Windows 10 of my comp without any problems.
    Regards,
    Markiyan Hirnyk

    --------------------------------------------------------------------------------------------------------
    Hi Markiyan Hirnyk,

    Thanks for your response.
    I am forwarding your information to our Technical Support Team.
    A representative will contact you soon.
    Kind regards, Kari
    Maplesoft Customer Service
    ------------------------------------------------------------------------------------------------------------
    Hello Markiyan,

    This error is usually caused by a Windows permissions setting. To fix this, please do the following:

    1. Ensure that all Maple programs are completely closed.
    2. Click on your Start Menu and go to the 'Programs' > 'Maple 16' > 'Tools' folder.
    3. Right click the 'Activate Maple' icon and choose 'Run as administrator'.
    4. Activate Maple using your purchase code and this should fix your issue.

    Please let me know if you continue to experience any troubles.

    Regards,

    Chris
    Technical Support Analyst
    --------------------------------------------------------------------------------------------------------
    Hello Chris,
    Following your directions, I have just reactivated Maple 16, but my problem is not solved.
    To shed light on the situation, my Maple 16.02 works properly,
    but I cannot uninstall it after upgrading to Windows 10 Home 32bit.
    See the screens in the attached file screen.docx .
    Regards,
    Markiyan Hirnyk
    ----------------------------------------------------------------------------------------
    Hello Markiyan,
    If you are seeing error messages about Maple still being open,
     I would suggest you try to restart your PC and then attempt the uninstall again to ensure
    that you do not have any lingering Maple programs running. Please let me know
    if you still see this message after restarting.

    Regards,

    Chris
    Technical Support Analyst
    ------------------------------------------------------------------------------------------------------
    Hello Chris,
    This does not help too. My guess is execution failure when Maple 16 was installing.
    Because of that reason the Maple 16 installer did not create Maple uninstaller in my Maple 16.
     See the attached screen of the uninstall folder in C:/ Program Files/ screen_3.docx.
    Regards,
    Markiyan Hirnyk
    --------------------------------------------------------------------------------------------------------
    Hello,
    If you think that you have a corrupted installation, I recommend that you reinstall Maple
    using the new Maple 16.02 installer link provided below.
     This version of the installer was created to get around the Windows 8 installation issues and
     may be of help to you in Windows 10 as well, though again please be aware that
     we do not officially support Windows 10 yet.
    Here are the steps to reinstall Maple:
    1. Click on the Start Menu > Control Panel > Programs and Features ( or Add/Remove Programs).
     Find ‘Maple 16’ in the list and uninstall it. If this is not possible, move on to the next step and continue.
    2. Restart your computer.
    3. Click on the Start Menu > Computer > Local Disk C: > Program Files.
    If there is a folder here called ‘Maple 16’, please delete it.
    4. Download the installer for Maple 16 from the following link:
            http://www.maplesoft.com/downloads/?d=C75DEBEC838C08BB1DCCED0440B49503&pr=Maple16
    5. Make sure to download the correct version for your operating system, i.e. Windows version and 32 or 64-bit.
    6. Install Maple by right clicking the installation file and choosing ‘Run as administrator’.
    I hope that this helps to resolve the issues that you’re having and if it does not,
    contact us and we can further investigate for you.

    Regards,
    Chris
    Technical Support Analyst
    --------------------------------------------------------------------------------------------------------
     Hi Chris,
    My problem with Maple 16 is solved. I completely uninstalled it by Uninstall Tool 3.4, not using brute force. After that I installed Maple 16 by the distributive suggested by you. That's all right.
    Regards,
    Markiyan Hirnyk
    ---------------------------------------------------------------------------------------------------------
    Alright, that is good to hear. Please let us know if you run into any further issues with your installation.
    Regards,
    Chris
    Technical Support Analyst

    In addition to providing access to powerful tools for mathematical computation, Maple has been designed to help you work quickly and efficiently. Here are 10 useful short-cuts when working with Maple:

    1. Use F5 to switch between Text and 2D Math input modes in Maple.

    2. Use F2 (Control+? for Macintosh) to quickly bring up Maple Help information for anything that you have typed in your document.

    3.  Automatic Command Completion can be used when you don't want to type in the full name of a Maple command. To use, begin typing the first few letters of the command name, and press CTRL+Space (Esc or Command+Shift+Space for Macintosh, CTRL+Shift+Space for Linux).  A list of possible completions will display; click the one you want.

     

    4. The Shift+Enter key combination lets you continue entering math or commands on a new line without executing that line. 

    5. If you want more than a single command to be executed at once, you must separate them with a semi-colon or colon.

    6. When you click inside a set of commands in Math mode, the dash line indicates the boundaries of the input region; all commands in this region will execute together in sequence.

    7. To increase the size of a piecewise function, add a new row.  Place the cursor on the last row, and press CTRL+Shift+R (Command+Shift+R for Macintosh). These shortcut keys also work to add rows to matrices.

    8. An easy way to insert a Greek letter is to first press CTRL+Shift+G (Command+Shift+G for the Macintosh). The next letter typed will appear in Greek.

    9. Sometimes you may want to insert symbols above or below another character, for example, to enter a vector arrow. To insert a symbol above (called "overscript"), press CTRL+Shift+["] (Command+Shift+["] for Macintosh) and then type in your symbol (or insert it from a palette).

    For example, typing "x" then holding down CTRL+Shift and pressing ["] allows you to insert a symbol above the x, such as 

    10. Compute or recompute the entire Maple worksheet when you have changed expressions that affect subsequent Maple commands.  Press Ctrl + Shift + Enter (Command + Shift + Enter in Macintosh) or click the execute worksheet icon. 

    Are there any short-cuts that you would add to this list?

    In this work the theme of vector analysis shown from a computational point of view; this being a very important role in the engineering component; in civil and mechanical special it is why, using the scientific software Maple develops interactive solutions for long processes through MapleCloud calculations. At present the majority of professors / researchers perform static classes open source leaves; so that our students learn and memorize commands, thus generating more time learning in the area. Loading Bookseller VectorCalculus develop topics: vector algebra, differential operators, conservative fields, etc. Maplesoft making processes provide immediate calculations long operation Embedded Components displayed in line with MapleNet integrations. Today our future engineers to design solutions and will be launched in the cloud thus being a process with global qualification in the specialty. Significantly Maple is a scientific software which allows the researcher to design their own innovations and not use themes for their manufacturers.

     

    III_CRF_2015.pdf

    CRF_2015.mw

     

    L.AraujoC.

     

     

    knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. This problem mentioned in  page of tasks still without  Maple implementation. 

    The post presents the implementation of this task in Maple. Required parameter of the procedure (named  KnightTour)  is  address  - the address of the initial square in the algebraic notation. The second parameter  opt  is optional parameter:

    1) if  opt is sequence  (by default) then  the procedure returns the sequence of moves of the knight in the usual algebraic notation,

    2)  if  opt is diagram   then  the procedure returns the plot of moves of the knight and  sequentially numbers all the visited squares,

    3) if  opt is animation  then  the procedure returns an animation of moves of the knight.

    In the procedure is used a solution with maximum symmetry by George Jelliss, http://www.mayhematics.com/t/8f.htm

     

    Code of the procedure:

    KnightTour := proc(address::symbol, opt::symbol := sequence)

    local L, n, L1, k, i, j, squares, border, chessboard, letters, digits, L2, L3, Tour, T, F;

    uses ListTools, plottools, plots;

    L := [a1, b3, d2, c4, a5, b7, d8, e6, d4, b5, c7, a8, b6, c8, a7, c6, b8, a6, b4, d5, e3, d1, b2, a4, c5, d7, f8, h7, f6, g8, h6, f7, h8, g6, e7, f5, h4, g2, e1, d3, e5, g4, f2, h1, g3, f1, h2, f3, g1, h3, g5, e4, d6, e8, g7, h5, f4, e2, c1, a2, c3, b1, a3, c2];

    n := Search(address, L);

    L1 := [L[n .. 64][], L[1 .. n-1][]];

    if opt = sequence then return L1[] fi;

    k := 0;

    for i to 8 do

    for j from `if`(type(i, odd), 1, 2) by 2 to 8 do

    k := k+1;

    squares[k] := polygon([[i-1/2, j-1/2], [i-1/2, j+1/2], [i+1/2, j+1/2], [i+1/2, j-1/2]], color = grey);

    od;  od;

    squares := convert(squares, list);

    border := curve([[1/2, 1/2], [1/2, 17/2], [17/2, 17/2], [17/2, 1/2], [1/2, 1/2]], color = black, thickness = 4);

    chessboard := display(squares, border);

    letters := [a, b, c, d, e, f, g, h];

    digits := [$ 1 .. 8];

    L2 := convert~(L1, string);

    L3 := subs(letters=~digits, map(t->[parse(t[1]), parse(t[2])], L2));

    Tour := curve(L3, color = red, thickness = 3);

    T := textplot([seq([op(L3[i]), i], i = 1 .. 64)], align = above, font = [times, bold, 16]);

    if opt = diagram then return display(chessboard, Tour, T, axes = none) fi;

    F := seq(display(chessboard, curve(L3[1 .. s], color = red, thickness = 3), textplot([seq([op(L3[i]), i], i = 1 .. s)], align = above, font = [times, bold, 16])), s = 1 .. 64);

    display(seq(F[i]$5, i = 1 .. 64), insequence = true, axes = none);

    end proc:

     

     Examples of use:

    KnightTour(f3);

    KnightTour(f3, diagram);

     

     

    KnightTour(f3, animation);

                                     

     

     

     KnightTour.mw

    As an educator, you surely know that giving students more involved problems in an online assessment tool provides challenges, both for students and instructors. Only marking the final answer doesn’t necessarily provide an understanding of the student’s capabilities, and it penalizes students that make a small mistake in part of their solution.

    This webinar will demonstrate how to create separate questions with multiple steps that can be linked or chained together. Question chaining allows instructors to mark subsequent questions based on the correct answer or the answer provided by students in previous parts.

    To join us for the live presentation, please click here to register.

    Dear friends,

    some time ago I shared a story here on the use of Maple to compute the cycle index of the induced action on the edges of an ordinary graph of the symmetric group permuting the vertices and the use of the Polya Enumeration Theorem to count non-isomorphic graphs by the number of edges. It can be found at the following Mapleprimes link.

    I am writing today to alert you to another simple Maple program that is closely related and demonstrates Maple's capability to implement concepts from group theory and Polya enumeration. This link at Math.Stackexchange.com shows how to use the cycle index of the induced action by the symmetric group permuting vertices on the edges of a multigraph that includes loops to count set partitions of multisets containing two instances of n distinct types of items. The sequence that corresponds to these set partitions is OEIS A020555 where it is pointed out that we can equivalently count multigraphs with n labeled i.e. distinct edges where the vertices of the graph represent the multisets of the multiset partition and are connected by an edge k if the two instances of the value k are included in the sets represented by the two vertices that constitute the edge. The problem then reduces to a simple substitution into the aforementioned cycle index of a polynomial representing the set of labels on an edge including no labels on an edge that is not included.

    This computation presents a remarkable simplicity while also implementing a non-trivial application of Polya counting. It is hoped that MaplePrimes users will enjoy reading this program, possibly profit from some of the techniques employed and be motivated to use Maple in their work on combinatorics problems.

    Best regards,

    Marko Riedel

    In this paper of presents under a totally modern sound environment dynamics; using embedded components that gives us the Cybernet Company through its product Maple 2015. Using classical techniques vector equations describe the particle, particle system and solid bodies. We note that the solutions o ered by this software motivate students civil and mechanical engineering to nd optimal answers. Integrating algorithms own programming language and solid mechanics using buttons we relate the movement of translation and rotation with reference to its center of mass.
    Choosing envelopes graphical methods, functional programming and mathematical computer display modeling reached alternatives to achieve the next generation of engineers. Therefore this work show that the use of
    embedded components allow us to merge the traditional and the computer; It means that all these equations using physical and propose viable criteria we perform in a dynamic sheet; which they have a number of components; then generate simulations with real objects.

    Congreso COMAP 2015.pdf

    Study of the Dynamics of the Solid with Embedded Components in Civil Engineering with Maplesoft.mw

    (in spanish)

    L.AraujoC.

     

    Symbolic sequences enter in various formulations in mathematics. This post is about a related new subpackage, Sequences, within the MathematicalFunctions package, available for download in Maplesoft's R&D page for Mathematical Functions and Differential Equations (currently bundled with updates to the Physics package).

     

    Perhaps the most typical cases of symbolic sequences are:

     

    1) A sequence of numbers - say from n to m - frequently displayed as

    n, `...`, m

     

    2) A sequence of one object, say a, repeated say p times, frequently displayed as

     "((a,`...`,a))"

    3) A more general sequence, as in 1), but of different objects and not necessarily numbers, frequently displayed as

    a[n], `...`, a[m]

    or likewise a sequence of functions

    f(n), `...`, f(m)

    In all these cases, of course, none of n, m, or p are known: they are just symbols, or algebraic expressions, representing integer values.

     

    These most typical cases of symbolic sequences have been implemented in Maple since day 1 using the `$` operator. Cases 1), 2) and 3) above are respectively entered as `$`(n .. m), `$`(a, p), and `$`(a[i], i = n .. m) or "`$`(f(i), i = n .. m)." To have computer algebra representations for all these symbolic sequences is something wonderful, I would say unique in Maple.

    Until recently, however, the typesetting of these symbolic sequences was frankly poor, input like `$`(a[i], i = n .. m) or ``$\``(a, p) just being echoed in the display. More relevant: too little could be done with these objects; the rest of Maple didn't know how to add, multiply, differentiate or map an operation over the elements of the sequence, nor for instance count the sequence's number of elements.

     

    All this has now been implemented.  What follows is a brief illustration.

    restart

    First of all, now these three types of sequences have textbook-like typesetting:

    `$`(n .. m)

    `$`(n .. m)

    (1)

    `$`(a, p)

    `$`(a, p)

    (2)

    For the above, a$p works the same way

    `$`(a[i], i = n .. m)

    `$`(a[i], i = n .. m)

    (3)

    Moreover, this now permits textbook display of mathematical functions that depend on sequences of paramateters, for example:

    hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[i], i = 1 .. q)], z)

    hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[i], i = 1 .. q)], z)

    (4)

    IncompleteBellB(n, k, `$`(factorial(j), j = 1 .. n-k+1))

    IncompleteBellB(n, k, `$`(factorial(j), j = 1 .. n-k+1))

    (5)

    More interestingly, these new developments now permit differentiating these functions even when their arguments are symbolic sequences, and displaying the result as in textbooks, with copy and paste working properly, for instance

    (%diff = diff)(hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[i], i = 1 .. q)], z), z)

    %diff(hypergeom([`$`(a[i], i = 1 .. p)], [`$`(b[i], i = 1 .. q)], z), z) = (product(a[i], i = 1 .. p))*hypergeom([`$`(a[i]+1, i = 1 .. p)], [`$`(b[i]+1, i = 1 .. q)], z)/(product(b[i], i = 1 .. q))

    (6)

    It is very interesting how much this enhances the representation capabilities; to mention but one, this makes 100% possible the implementation of the Faa-di-Bruno  formula for the nth symbolic derivative of composite functions (more on this in a post to follow this one).

    But the bread-and-butter first: the new package for handling sequences is

    with(MathematicalFunctions:-Sequences)

    [Add, Differentiate, Map, Multiply, Nops]

    (7)

    The five commands that got loaded do what their name tells. Consider for instance the first kind of sequences mentione above, i.e

    `$`(n .. m)

    `$`(n .. m)

    (8)

    Check what is behind this nice typesetting

    lprint(`$`(n .. m))

    `$`(n .. m)

     

    All OK. How many operands (an abstract version of Maple's nops  command):

    Nops(`$`(n .. m))

    m-n+1

    (9)

    That was easy, ok. Add the sequence

    Add(`$`(n .. m))

    (1/2)*(m-n+1)*(n+m)

    (10)

    Multiply the sequence

    Multiply(`$`(n .. m))

    factorial(m)/factorial(n-1)

    (11)

    Map an operation over the elements of the sequence

    Map(f, `$`(n .. m))

    `$`(f(j), j = n .. m)

    (12)

    lprint(`$`(f(j), j = n .. m))

    `$`(f(j), j = n .. m)

     

    Map works as map, i.e. you can map extra arguments as well

    MathematicalFunctions:-Sequences:-Map(Int, `$`(n .. m), x)

    `$`(Int(j, x), j = n .. m)

    (13)

    All this works the same way with symbolic sequences of forms "((a,`...`,a))" , and a[n], `...`, a[m]. For example:

    `$`(a, p)

    `$`(a, p)

    (14)

    lprint(`$`(a, p))

    `$`(a, p)

     

    MathematicalFunctions:-Sequences:-Nops(`$`(a, p))

    p

    (15)

    Add(`$`(a, p))

    a*p

    (16)

    Multiply(`$`(a, p))

    a^p

    (17)

    Differentation also works

    Differentiate(`$`(a, p), a)

    `$`(1, p)

    (18)

    MathematicalFunctions:-Sequences:-Map(f, `$`(a, p))

    `$`(f(a), p)

    (19)

    MathematicalFunctions:-Sequences:-Differentiate(`$`(f(a), p), a)

    `$`(diff(f(a), a), p)

    (20)

    For a symbolic sequence of type 3)

    `$`(a[i], i = n .. m)

    `$`(a[i], i = n .. m)

    (21)

    MathematicalFunctions:-Sequences:-Nops(`$`(a[i], i = n .. m))

    m-n+1

    (22)

    Add(`$`(a[i], i = n .. m))

    sum(a[i], i = n .. m)

    (23)

    Multiply(`$`(a[i], i = n .. m))

    product(a[i], i = n .. m)

    (24)

    The following is nontrivial: differentiating the sequence a[n], `...`, a[m], with respect to a[k] should return 1 when n = k (i.e the running index has the value k), and 0 otherwise, and the same regarding m and k. That is how it works now:

    Differentiate(`$`(a[i], i = n .. m), a[k])

    `$`(piecewise(k = i, 1, 0), i = n .. m)

    (25)

    lprint(`$`(piecewise(k = i, 1, 0), i = n .. m))

    `$`(piecewise(k = i, 1, 0), i = n .. m)

     

    MathematicalFunctions:-Sequences:-Map(f, `$`(a[i], i = n .. m))

    `$`(f(a[i]), i = n .. m)

    (26)

    Differentiate(`$`(f(a[i]), i = n .. m), a[k])

    `$`((diff(f(a[i]), a[i]))*piecewise(k = i, 1, 0), i = n .. m)

    (27)

    lprint(`$`((diff(f(a[i]), a[i]))*piecewise(k = i, 1, 0), i = n .. m))

    `$`((diff(f(a[i]), a[i]))*piecewise(k = i, 1, 0), i = n .. m)

     

     

    And that is it. Summarizing: in addition to the former implementation of symbolic sequences, we now have textbook-like typesetting for them, and more important: Add, Multiply, Differentiate, Map and Nops. :)

     

    The first large application we have been working on taking advantage of this is symbolic differentiation, with very nice results; I will see to summarize them in a post to follow in a couple of days.

     

    Download MathematicalFunctionsSequences.mw

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

    For the past thirty years, I have used several mathematical packages for problem solving and graphing. It all started with spreadsheet software that really helped speedup calculations compared to calculators. As many people do, once I had one tool I then started looking for another that would offer even more capabilities and features. I tested several of the very early math software but none really did all that I wanted until I came across Maple while I was working at SPAR Aerospace in Canada. For me, the rest is history. As long as I had a copy of Maple, it was all that I needed.

    On occasions when I did not have a copy of this amazing software, I resorted to spreadsheets once more to complete fairly large and complex projects involving large databases and large numbers of calculations, especially when performing What-If scenarios. One distinct disadvantage of using a spreadsheet was the cryptic form of equation writing. I had to divide one long equation into several sections in different cells and then add them all up, which clearly is not good for documentation of the calculations. It is also very confusing for other engineers to know what that equation is or what it does. The development of the full engineering spreadsheet took months to complete, debug and verify. During this process, when I had errors, it was often very difficult to track exactly where the problem was, making the debugging process time consuming and sometimes very frustrating.

    Having worked with Maple before, I remembered how easy it was to enter equations in a very familiar, readable math format. The real power of this software is that it allows you to write the equation(s) anyway you like and solve for any given parameter, unlike spreadsheets where you have to solve the problem first, by hand, for the parameter you want and then get the spreadsheet to calculate the value. I remember one time a few years ago when I wrote nine or ten simultaneous differential equations all in symbolic form and asked Maple to calculate certain parameters in a fully symbolic form. To my utmost disbelief, the answer came back within few minutes. With results in hand, I was able to quickly finish my research, and the results were published at PCIM Europe 2005 in “Distributed Gate ESR and its Effect on Shoot Through Performance at the Die Level”. I would never have gotten the results I needed if I was using a spreadsheet.

    Even with much simpler systems of equations, finding solutions with a paper and pencil was never an easy task for me. It took a very long time, and even then there was no guarantee that I did not make copying errors, accidentally leave out a term, or make a calculation error. After I found the correct solution, I then had the problem of plotting the results, which I often needed in 3-D. Plotting allowed much deeper insights into the interdependency of all the parameters and made it easy for me to concentrate on the important ones without wasting any time. I was very happy when I could pass all these tasks onto Maple, which could do them much faster and more reliably then I ever could. Maple is a software that allows me to go beyond routine engineering calculations and gives me the tools to reach levels of insight and understanding that were completely out of reach of the average engineer until a few years ago.

    For the record, I have no business affiliations with Maplesoft. I’m writing this article because Maple makes such a difference in my work that I feel it is important to share my experiences so other engineers can get the same benefits.

           Calculation of RSCR mechanism as a  solution to underdetermined system of nonlinear equations.  

     

    RSCR.mw 

    https://vk.com/doc242471809_376439263
    https://vk.com/doc242471809_408704758

    RCCC mechanism
    https://vk.com/doc242471809_375452868

    Here we develop the factoring in common factor, simple and complete square blade, plus simple equation systems with graphic and design, and graphic solution of the quadratic equation using components in maple 2015.

     

    Factorizacion.mw

    (in spanish)

    L.AraujoC.

     

     

     

    First 66 67 68 69 70 71 72 Last Page 68 of 297