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
  • vv if you could please help adjust your code.  I've adjusted the start of the eurocup code to match the world cup however I haven't decoded your coding and probably won't be able to have time before the world cup starts.  I've got as far as adding the teams, flags and ratings of each team.

    Let me just say while copying and pasting the flag bytes to the code, Maple became a bitch to work worth (pardon my language) but I became so frustated because my laptop locked up twice.  The more I worked with Maple the slower it got, until it froze right up.  Copying and pasting large data in maple is almost to near IMPOSSIBLE.  .. perhaps this could be a side conversation.

    Here's the world cup file so far.

    2018_World_Cup.mw

    **edit added**
    Fixed flag sizes, couple of other fixes in other stats and added some additional stats
    2018_World_Cup7.mw

     

    ANIMATED image of cascade of opening matryoshkas

    E.R. Ibragimova

     

     

    ИбрагимоваЭ.Р_03_Казань_Матрёшки.mws

    Murtazin Shamil, 6th grade

    Simulation of the animated image "Flask with bubbles"

     

    FLASC_Murtazin_S.A..mw

    In as much as the embedded component suite is a brilliant tool for the custom design of online educational programs, student tests, etc, my purposes are orientated around encouraging and assisting of self directed investigation, with the utilization of the packages of maple, but in a manner that allows the user to neglect the requirement to have any knowledge of maple code itself, allowing them to focus entirely on their discipline of choice. 

    So because the content the user will enter into the interface I am designing is naturally going to be quite variant from individual to individual, one of the  necessary properties that does not exist is for the math containers to have the option of being resizeable at the discretion of the user.

    At the moment, I have added buttons that allow the user to resize the window by pressing one of four buttons entitled "increase height". "decrease height", "increase width" and "decrease height". This will suffice for my first working prototype but i just feel that it would be much neater if it were possible to resize the math component directly, and some option of the neighbouring embedded components to either shift their position accordingly, or maintain rectilinear alignment with the greater proportion of other components by all embedded components shifting accordingly when one math container is resized.

     

    I just feel that if at least one person less experienced than me reads this it will be a worth while post, because it will help them avoid things that eluded me when I was younger.


     

    The omitted function definitions are not relevant to the reason for which I decided to post about this. I would like the maple user to simply observe how many variables are involved in the relation's (R) three equalities in the consideration of the output.

     

    The reason I believe this is important, is that it is sometimes very easy to believe induction is sufficient proof of the truth value of a relation over the superset of a subset that has been enumerated, much like the example of the coefficients of the
    "105^(th) cyclotomic polynomial if one were to inductively reason statements about the coeffiecents of the previous 104 polynomials."

     

     

    A[n, k, M] = abs(C[0](n, k, M))/abs(C[1](n, k, M)); B[n, k, M] = abs(C[0](n, k, M))/abs(C[2](n, k, M)); E[n, k, M] = abs(C[1](n, k, M))/abs(C[2](n, k, M))

    R

    "`𝓃`(A[n,k,M])=`𝓃`(B[n,k,M]), `𝓃`(E[n,k,M])=`𝒹`(A[n,k,M]),`𝒹`(B[n,k,M])=`𝒹`(E[n,k,M])]"

    for t to 7 do R(t, 2, 30) end do

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 1, 1 = 1, 1 = 1]

     

    [1 = 11^(1/2)*7^(1/2), 11^(1/2)*7^(1/2) = 1, 7 = 7]

    (1)


     

    Download INDUCTION_IS_NOT_YOUR_FREN.mw

    Up to swMATH   Maple is referenced in 4183 articles   in zbMATH   and

    up to swMATH Mathematica is referenced in 4654 articles  in zbMATH.

    These numbers are sure unexpected to me. I think the ratio of the prices of academic editions MMA/Maple (which approximately equals 2 ) truly reflects their capabilities.

     

    At a recent undegraduate competition the students had to compute the following limit

     

    Limit( n * Diff( (exp(x)-1)/x, x$n), n=infinity ) assuming x<>0;

    Limit(n*(Diff((exp(x)-1)/x, `$`(x, n))), n = infinity)

    (1)

     

    Maple is able to compute the symbolic n-fold derivative and I hoped that the limit will be computed at once.

    Unfortunately it is not so easy.
    Maybe someone finds a more more straightforward way.

     

    restart;

    f := n * diff( (exp(x)-1)/x, x$n );

    n*(-1/x)^n*(-GAMMA(n+1)+GAMMA(n+1, -x))/x

    (2)

    limit(%, n=infinity);

    limit(n*(-1/x)^n*(-GAMMA(n+1)+GAMMA(n+1, -x))/x, n = infinity)

    (3)

    simplify(%) assuming x>0;

    limit(-(-1)^n*x^(-n-1)*n*(GAMMA(n+1)-GAMMA(n+1, -x)), n = infinity)

    (4)

     

    So, Maple cannot compute directly the limit.

     

    convert(f, Int) assuming n::posint;

    -n*(-1/x)^n*(-x)^(n+1)*GAMMA(2+n)*(Int(exp(_t1*x)*_t1^n, _t1 = 0 .. 1))/((n+1)*(Int(_k1^n*exp(-_k1), _k1 = 0 .. infinity))*x)

    (5)

    J:=simplify(%)  assuming n::posint;

    n*(Int(exp(x*_k1)*_k1^n, _k1 = 0 .. 1))*GAMMA(n+1)/(Int(_k1^n*exp(-_k1), _k1 = 0 .. infinity))

    (6)

    L:=convert(J, Int) assuming n::posint;

    n*(Int(exp(x*_k1)*_k1^n, _k1 = 0 .. 1))

    (7)

    L:=subs(_k1=u, L);

    n*(Int(exp(x*u)*u^n, u = 0 .. 1))

    (8)

     

    Now it should be easy, but Maple needs help.

     

    with(IntegrationTools):

    L1:=Change(L, u^n = t, t) assuming n::posint;

    Int(exp((x*t^(1/n)*n+ln(t))/n), t = 0 .. 1)

    (9)

    limit(L1, n=infinity);  # OK

    exp(x)

    (10)

    ####################################################################

    Note that the limit can also be computed using an integration by parts, but Maple refuses to finalize:

    Parts(L, exp(u*x)) assuming n::posint;

    n*(exp(x)/(n+1)-(Int(u^(n+1)*x*exp(x*u)/(n+1), u = 0 .. 1)))

    (11)

    simplify(%);

    n*(-x*(Int(u^(n+1)*exp(x*u), u = 0 .. 1))+exp(x))/(n+1)

    (12)

    limit(%, n=infinity);

    limit(n*(-x*(Int(u^(n+1)*exp(x*u), u = 0 .. 1))+exp(x))/(n+1), n = infinity)

    (13)

    value(%);  # we are almost back!

    limit(n*((-x)^(-n)*(-(n+1)*n*GAMMA(n)/x-(-x)^n*(x-n-1)*exp(x)/x+(n+1)*n*GAMMA(n, -x)/x)+exp(x))/(n+1), n = infinity)

    (14)

     

    Typically, we publish a “Meet Your Developers” profile, where you can get an inside look at the lives of our developers. Today, we’re excited to bring you something a little different, a glimpse into the life of Maple Product Manager, Samir Khan.

    Let's get right to it.

    1. What do you do at Maplesoft?

    I’m 50% of the product management team for Maple. I act as an interface between our developers, mathematicians, marketing, sales, and users.

    I spend a lot of time speaking to current and potential customers – this is the most important part of my job.

    At the beginning of each development cycle, I work with the developers to put together a list of proposed features. Then, during the year, I try to keep development on track to meet the proposed goals and provide continual feedback.

    I also develop applications that demonstrate Maple’s functionality in new and different ways (most are on the Application Center).

    2. What did you study in school?

    I studied Chemical Engineering.

    3. What area(s) of Maple are you currently focusing on in your development?

    While I don’t do any direct development of Maple features, I sometimes prototype code as a proof of concept. The developers then look at me with a sense of disdain, tear my prototype apart, and rewrite my code from the ground up.

    4. What’s the coolest feature of Maple that you’ve had a hand in developing?

    While I generally don’t develop any production code, I’ve been responsible for driving the ThermophysicalData package forward

    5. What do you like most about working at Maplesoft? How long have you worked here?

    I’ve worked at Maplesoft since 2008. It’s a cliché, but I like the people first and foremost.

    I also like the flexibility of my role. Within reason, I can devote part of my time doing things that I think will benefit the company. For example, I get to write lots of applications about subjects that interest me (usually thermodynamics or chemistry).

    6. Favourite hobby?

    I gave up all my hobbies when kids appeared on the scene. Before that, I wrote spreadsheets for financial modeling

    Now, I like to do home science experiments with my son. Yesterday, I mixed yeast with hydrogen peroxide to demonstrate an exothermic reaction.

    7. What do you like on your pizza?

    Pineapple and mushrooms.

    8. What’s your favourite movie?

    I don’t really have a single favourite movie, but these movies that have the greatest impact on me over the last few years

    • Interstellar
    • Annihilation
    • Dunkirk
    • The Witch
    • Frozen (yes, really)

    9. What skill would you love to learn? (That you haven’t already) Why?

    I want to learn how to juggle to amuse my kids. However, I don’t have the hand-eye coordination to be any good

    10. Who’s your favourite mathematician?

    That’s a really dreary question.

    Instead, I’ll answer two completely different questions.

    • My favorite kids TV show is Ben and Holly’s Little Kingdom
    • I usually listen to Slayer on the drive into work

     

    Thanks Samir!

    It post can be called a continuation of the theme “Determination of the angles of the manipulator with the help of its mathematical model. Inverse  problem”.
    Consider  the use of manipulators as multi-axis CNC machines.
    Three-link manipulator with 5 degrees of freedom. In these examples  one of the restrictions on the movement of the manipulator links is that the position of the last link coincides with the normal to the surface along the entire trajectory of the working point movement.
    That is, we, as it were, mathematically transform a system with many degrees of freedom to an analog of a lever mechanism with one degree of freedom, so that we can do the necessary work in a convenient to us way.
    It seems that this approach is fully applicable directly to multi-axis CNC machines.

    (In the texts of the programs, the normalization is carried out with respect to the coordinates of the last point, in order that the lengths of the integration interval coincide with the path length.)
    MAN_3_5_for_MP.mw

    MAN_3_5_for_MP_TR.mw

    I like to use Maple debugger to help me debug and I am sure many do.

    It is good that Maple comes with a debugger. I type "stopat(proc_name);" and then the debugger comes up when proc_name is called.

    But the Maple debugger is hard to use. It appears to be primitive compared to other commerical debuggers that come with other known developments systems.

    For example, the output of "enter a debugger command" is displayed back into the same screen where the code is listed. This makes hard to see. There is only one window. It is also hard to see where one is in the source code is. So I have to keep clicking on the "list" button to display the lines again and look for the small "*" on the left.

    Basically, it is good to have the debugger, but it seems Maplesoft is not doing any improvements to make it easier to use. It is so 1980 looking compared to other easy and powerful to use debuggers, such as Matlab debugger, Visual studio, and others.

    Could Maplesoft please make some improvements to the debugger? At least make separate side window for output of debugger commands, and improve the code listing issue? It will also be nice to have a call stack view, and variable view window, and to see where one is in the call chain.

    Is this the only debugger available for Maple? 

    add, floats, and Kahan sum

     

    I found an intresting fact about the Maple command add for floating point values.
    It seems that add in this case uses a summation algorithm in order to reduce the numerical error.
    It is probably the Kahan summation algorithm (see wiki), but I wonder why this fact is not documented.

    Here is a simple Maple procedure describing and implementing the algorithm.

     

     

    restart;

    Digits:=15;

    15

    (1)

    KahanSum := proc(f::procedure, ab::range)  
    local S,c,y,t, i;      # https://en.wikipedia.org/wiki/Kahan_summation_algorithm
    S := 0.0;              # S = result (final sum: add(f(n), n=a..b))
    c := 0.0;              # c = compensation for lost low-order bits.
    for i from lhs(ab) to rhs(ab) do
        y := f(i) - c;     
        t := S + y;              
        c := (t - S) - y;        
        S := t;                  
    od;                         
    return S
    end proc:

     

    Now, a numerical example.

     

     

    f:= n ->  evalf(1/(n+1/n^3+1) - 1/(n+1+1/(n+1)^3+1));

    proc (n) options operator, arrow; evalf(1/(n+1/n^3+1)-1/(n+2+1/(n+1)^3)) end proc

    (2)

    n := 50000;
    K := KahanSum(f, 1..n);

    50000

     

    .333313334133301

    (3)

    A := add(f(k),k=1..n);

    .333313334133302

    (4)

    s:=0.0:  for i to n do s:=s+f(i) od:
    's' = s;

    s = .333313334133413

    (5)

    exact:=( 1/3 - 1/(n+1+1/(n+1)^3+1) );

    6250249999999900000/18751875067501050009

    (6)

    evalf( [errK = K-exact, errA = A-exact, err_for=s-exact] );

    [errK = 0., errA = 0.1e-14, err_for = 0.112e-12]

    (7)

    evalf[20]( [errK = K-exact, errA = A-exact, err_for=s-exact] );

    [errK = -0.33461e-15, errA = 0.66539e-15, err_for = 0.11166539e-12]

    (8)

     


    Download KahanSum.mw

    At Maplesoft, we are excited to be celebrating our 30th year of incorporation. This anniversary is a tremendous milestone for us. As a leading provider of mathematics-based software solutions for science, technology, engineering and mathematics (STEM), this longevity attests to our ability to grow along with changing market conditions, to continually enhance the quality of our offerings and strengthen our partnerships with industry leaders.

    As a company, it is our goal to actively connect and partner with our users and industry leaders to advance STEM education and continue to revolutionize engineering design processes. When it comes to academics, we believe our partnerships and outreach initiatives help improve STEM education, develop and enhance digital learning tools and foster online education. To that end, Maplesoft is an Affiliate Member of the Fields Institute, Educational Outreach Champion of Perimeter Institute, and Technology Partner of the American Math Society’s “Who Wants to be a Mathematician” student competition. On the commercial side, we work closely with our commercial partners to seamlessly integrate our technology with complementary tools. Our relationships with prominent companies such as Rockwell Automation, B&R, Altair and more, allow us to continue leading this charge.

    At Maplesoft, we work continuously to improve our technology offerings by developing new products and enhancing our existing technology. Maple 2018, the newest version of our flagship product Maple, offers new and improved features to benefit all users, no matter what they use Maple for. It provides an environment where students and instructors can enrich the classroom experience, researchers can accelerate their projects and engineers can refine their calculation management processes. Möbius, our online courseware platform, enables instructors to author rich content, explore important STEM concepts using engaging, interactive applications, visualize problems and solutions, and test students’ understanding by answering questions that are graded instantly.

    On the engineering side, we are revolutionizing the engineering design process using Digital Twins, which are virtual machine designs created in MapleSim, Maplesoft’s modeling and simulation software. By taking a virtual approach to machine-level system integration, engineers can commission faster, earlier, and with less risk.

    Maplesoft has come a long way since our humble beginnings as a research project at the University of Waterloo. Our website features a timeline that provides insights and information on our incredible journey. The company was built on a foundation of creativity and passion for mathematics and we have worked hard to preserve that legacy. The growth experienced over the past 30 years, along with the drive of our global employee and partner base, will ensure Maplesoft continues to be a driving force in the world of online education and design engineering long into the future.

    We invite you to join us as we continue our journey towards new and exciting developments and innovations.

    Due to the mechanistic process of our students and little creativity in analysis in schools and universities to be professionally trained is that STEM education appears (science, technology, engineering and mathematics) is a new model that is being considered in other countries and with very slow step in our city. In this work the methods with STEM will be visualized but using computational tools provided by Maplesoft which is a company that leads online education for adolescents and adults in the current market. In Spanish.

    ECI_UNT_2018.pdf

    ECI_UNT_2018.mw

    Lenin Araujo Castillo

    Ambassador of Maple

    There is a bug in inttrans:-hilbert:

    restart;

    inttrans:-hilbert(sin(a)*sin(t+b), t, s);
    # should be:
    sin(a)*cos(s+b);   expand(%);

    sin(a)*cos(s)

     

    sin(a)*cos(s+b)

     

    sin(a)*cos(s)*cos(b)-sin(a)*sin(s)*sin(b)

    (1)

    ########## correction ##############

    `inttrans/expandc` := proc(expr, t)
    local xpr, j, econst, op1, op2;
          xpr := expr;      
          for j in indets(xpr,specfunc(`+`,exp)) do
              econst := select(type,op(j),('freeof')(t));
              if 0 < nops(econst) and econst <> 0 then
                  xpr := subs(j = ('exp')(econst)*combine(j/('exp')(econst),exp),xpr)
              end if
          end do;
          for j in indets(xpr,{('cos')(linear(t)), ('sin')(linear(t))}) do
              if type(op(j),`+`) then
                  op1:=select(has, op(j),t); ##
                  op2:=op(j)-op1;            ##
                  #op1 := op(1,op(j));
                  #op2 := op(2,op(j));
                  if op(0,j) = sin then
                      xpr := subs(j = cos(op2)*sin(op1)+sin(op2)*cos(op1),xpr)
                  else
                      xpr := subs(j = cos(op1)*cos(op2)-sin(op1)*sin(op2),xpr)
                  end if
              end if
          end do;
          return xpr
    end proc:

    #######################################

    inttrans:-hilbert(sin(a)*sin(t+b), t, s); expand(%);

    -(1/2)*cos(a-b)*sin(s)+(1/2)*sin(a-b)*cos(s)+(1/2)*cos(a+b)*sin(s)+(1/2)*sin(a+b)*cos(s)

     

    sin(a)*cos(s)*cos(b)-sin(a)*sin(s)*sin(b)

    (2)

     


    Download hilbert.mw

     

    To demonstrate Maple 2018’s new Python connectivity, we wanted to integrate a large Python library. The result is the DeepLearning package - this offers an interface to a subset of the Tensorflow framework for machine learning.

    I thought I’d share an application that demonstrates how the DeepLearning package can be used to recognize the numbers in images of handwritten digits.

    The application employs a very small subset of the MNIST database of handwritten digits. Here’s a sample image for the digit 0.

    This image can be represented as a matrix of pixel intensities.        

    The application generates weights for each digit by training a two-layer neural network using multinomial logistic regression. When visualized, the weights for each digit might look like this.

    Let’s say that we’re comparing an image of a handwritten digit to the weights for the digit 0. If a pixel with a high intensity lands in

    • an intensely red area, the evidence is high that the number in the image is 0
    • an intensely blue area, the evidence is low that the number in the image is 0

    While this explanation is technically simplistic, the application offers more detail.

    Get the application here

    First 46 47 48 49 50 51 52 Last Page 48 of 306