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
  • 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

    Using Maple's native syntax, we can calculate the components of acceleration. That is, the tangent and normal scalar component with its respective units of measure. Now the difficult calculations were in the past because with Maple we solved it and we concentrated on the interpretation of the results for engineering. In spanish.

    Calculo_Componentes_Aceleracion_Curvilínea.mw

    Uso_de_comandos_y_operadores_para_calculos_de_componentes_de_la_aceleración.mw

    Lenin Araujo Castillo

    Ambassador of Maple

     

     

    The Maple splash screen needs a makeover, it's not too exciting so looking at the maplesoft website the opening screen has an image that would have been rather fitting for the Maple 2018 splash screen.  Here's the image I'm talking about.

    Last week, my colleague Erik Postma and I had the pleasure of spending a few hours with a group of bright and motivated high school students at the Math for Real: High School Math Solves Real Problems workshop held at the Fields Institute for Research in Mathematical Sciences in Toronto, and sponsored by the Fields Institute and NSERC PromoScience. The purpose of this three-day workshop was to train students for the International Mathematical Modeling Challenge, also known as IM2C.

    The IM2C is hosted by York University and run by the IM2C-Canada committee, consisting of parents and high school teachers, as well as faculty and students in York’s Department of Mathematics and Statistics. In this competition, students working in small teams have five days to solve a mathematical modelling problem in diverse application areas. To support the “Real World” aspect of the contest, students are expected not just to showcase their mathematical creativity and problem-solving skills, but they are also asked to clearly communicate their analyses and conclusions through a written report and visualizations.

    The contest allows students to use appropriate software tools to help them with their tasks. Of course I am biased but I can’t help thinking that Maple is the perfect tool for students wanting to do a combination of prototyping, modelling, visualization and document-preparation. The IM2C organizers also thought that the students could benefit from our software, so Erik gave an hour-long introduction to Maple. I was impressed by the students’ enthusiastic remarks and sometimes challenging questions, though admittedly they were partly motivated by the chance to receive as prizes our highly coveted limited-quantity “Math Matters” t-shirts.

    The workshop also introduced the students to other software products, taught modelling and writing skills, and had them work on fun practice problems. Over the lunch break, I was struck by the sense of camaraderie at this event, which probably should not have surprised me, as unlike many other competitions involving mathematics, this one is a true team-based activity. Both Erik and I are eager to see what the students will be doing with Maple. Responding to the students’ enthusiasm and interest, Maplesoft has agreed to offer complimentary Maple licenses to all students participating in IM2C. 

    As a Corporate Affiliate of the Fields Institute, Maplesoft is pleased to provide training and support to students and researchers that come to Fields for its many events. Developers like myself are encouraged to participate in the institute’s events when possible, and I’ve had the opportunity to attend a number of workshops in the past few years. I encourage you to look at their wide range of activities and to consider visiting the culturally diverse city of Toronto!


    Minimum:
    1. Maple Tour
    2. Maple Quick Start
    3. Quick Help
    4. Quick Reference Card
    5. Math Apps
    6. Plotting Guide
    ...
    https://drive.google.com/file/d/1ZAlFQ8_MbuKNsr2PDIyEHmIoogKInBmE/view?usp=sharing

    Is that only for my students?

    In worksheets:
    https://drive.google.com/file/d/1cfA8WKPXSQQxJQR7KbyYHBY6g4OjHaSn/view?usp=sharing

    First 47 48 49 50 51 52 53 Last Page 49 of 307