Applications, Examples and Libraries

Share your work here

A user wondered how to have Maple produce a desired form of a solution

eq1 := `σ__2` = P__2/(Pi*r^2)NULL

NULL

r := (1/2)*d

NULL

soln := `assuming`([solve(eq1, {d}, useassumptions)], [`σ__2`::real, d > 0, P__2 > 0])

{d = 2*(Pi*sigma__2*P__2)^(1/2)/(Pi*sigma__2)}

(1)

NULL

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

Download question-better-spacing.mw

We suggested the closest they might be able to get is using simplify like so:

 

restart; eq1 := `σ__2` = P__2/(Pi*r^2)
``

``

r := (1/2)*d

``

soln := `assuming`([solve(eq1, {d}, useassumptions)], [`σ__2`::real, d > 0, P__2 > 0])

{d = 2*(Pi*sigma__2*P__2)^(1/2)/(Pi*sigma__2)}

(1)

``

`assuming`([simplify(soln)], [sigma__2::real, P__2 > 0])

{d = 2*P__2^(1/2)/(Pi^(1/2)*sigma__2^(1/2))}

(2)

NULL


Download suggestion.mw

Our user wondered about using PolynomialIdeals:

1.  If we have n+1 polynomials,  f, g1,...,gn,  how to determine if  f  is in the ideal generated by  g1,...,gn?

2.  If so, how to write  f  as a polynomial combination of   g1,...,gn? 

We suggested that;

The nicest interface to answer the first question is given by the ?PolynomialIdeals,Operators page: you can write

with(PolynomialIdeals):
with(Operators):
J := <g1, g2, ..., gn>;
f in J; # true or false

To answer the second question, you need to use the lower level  package (which underlies the  package). This will also answer the first question for you. In particular the  command. You can write:

with(Groebner):
G := [g1, g2, ..., gn];
ord := tdeg(x,y,z); # replace x, y, z with the appropriate variables; you can also use other variable orders -- see ?Groebner,MonomialOrders

b := Basis(G, ord);
n := NormalForm(f, b, ord, 'Q');
# if n = 0 then f is in the ideal; Q is the list of coefficients:
f - add(Q[i] * G[i], i = 1 .. numelems(b)); # this will be equal to n.

A user would like to know if it is possible to specify a data set say, x:=[1,2,3,4,5,6] and then extract a random sample from that data set, i.e. xsample:=[3,2,4] for a bootstrapping-type calculation.

We suggested they use something like the following:

restart; with(Statistics); my_data := [1, 2, 4, 5.5, 5.5, 6]; X := RandomVariable(EmpiricalDistribution(my_data)); s := Sample(X, 10); Bootstrap(Mean, X, samplesize = 4, replications = 10000)

HFloat(3.9984625)

(1)

NULL

Download array-random-sample.mw

As always, it's just about drawings.
The parametric equation of a circle has 3 variables and two equations. In 3-dimensional space, a circle is a spiral, but we only need one projection of this spiral into 2-dimensional space, and we also know how  the rest 2 it's projections on flat space look.
If we look at the equation of the sphere in parametric form, we will see that these are 3 equations and 5 variables:
x1 = sin(x4)*cos(x5); 
x2 = sin(x4)*sin(x5); 
x3 = cos(x4);
And so I wanted to see how the remaining 9 projections of the sphere onto 3-dimensional space look. It is very easy to do this with Maple.
SPHERE.mw

Are you teaching a calculus course? Then use Maple Learn, Maplesoft’s free online product, to do so.

Below are some examples of calculus documents you can create in Maple Learn.

 

1. Documents Explaining Concepts with Interactive Visuals

Example: Visualizing the Formal Definition of the Derivative

 

2. Interactive Quizzes

Example: The Product Rule: Practice Questions

 

3. Documents Using Maple to Perform Complex Operations

Example: Taylor Series Approximation Calculator

 

Maplesoft’s learn content team has already created about 200 Maple Learn calculus documents! The full list is here. You can modify these documents easily, and use them to teach your calculus class as well.

A user wonders if there is a straightforward way to show US states with names using the WorldMap Data Set in Maple

We suggest something like the attached: map-of-us-with-states.mw

 

restart; with(DataSets:-Builtin); r := Reference("GeoNames"); states := r[[Country = "United States", Type = "first-order administrative division"]]; w := WorldMap(); w:-AddPoints(w, states); Display(w, mapdata = fine, style = polygonoutline, size = [2000, 1500])

 

 

I've said it before, and I'll say it again, at Maplesoft, I have the privilege of working with some of the most talented and creative minds around. My colleagues are constantly pushing the boundaries of what we can build and what our products can do.Christmas Wreath in Maple Learn

So to close out 2021, I wanted to share a video that one of our brilliant developers, Marek, sent the company. Marek emails a greeting every year wishing his Maplesoft colleagues a Happy Holiday.  Well, this year, he stepped it up a notch and created this superb video explaining "How to decorate for Christmas using Math", where he created a wreath using Maple Learn.

Watching the video brought a smile to my face, and I know it did the same for others.

I hope this video warms your heart as it did mine. On behalf of all of us at Maplesoft, Happy Holidays!

Recently, the Maple Learn team hosted an internal Maple Learn day. The team encouraged Maplesoft employees to create Maple Learn content. A lot of art was created.

Below is a link to an example of Maple Learn art, and a picture relating to it. The document is interactive, so open it to see what it does.

Christmas Art, by Marek Krzeminski - Senior Architect at Maplesoft

If you too like to combine math and art, use Maple Learn here to create artwork yourself, and share it with us in the comments.


 

Recently I decided to compare continuity, related notions, and differentiability. Can a function be differentiable, but not continuous? What about uniformly continuous, but not differentiable? I used Maplesoft's new online product, Maple Learn (free to use at learn.maplesoft.com), to explore.

Here is a Maple Learn document I created. It is an organizational diagram, as shown below. Each rectangle in the diagram corresponds to a different property that a function may satisfy. Within each rectangle, examples are provided of functions satisfying the appropriate properties.

If you click on an example, it will be selected, and the corresponding function will be plotted in Maple Learn's context panel. Try it!

I've also created companion documents to explain certain concepts in greater detail. For instance, below is a snapshot of a document explaining uniform continuity, which you can access here.

By using sliders in the document, you can move and resize the rectangle drawn in the graph. You should notice when doing this that the green function never touches the horizontal sides of the rectangle. This turns out to be the "reason" why the function is uniformly continuous.

You can find a companion document on Lipschitz continuity here.

I’ve learnt a lot about continuity in creating the documents shown. I hope that you too have learnt something from them!

Although not mentioned in the documentation, the flexible beam component of MapleSim allows for simulation of large deflections.  

In the animation, a flexible beam is loaded with a moment (red arrow) at its free end. Assuming a Euler-Bernoulli beam and slow loading (i.e., no dynamic forces), the beam should deform to an arc of constant radiusNot only the deformation of the beam can be described analytically, also the path (red trace) of the free end follows an analytical curve.

 

I used this test case to get a better understanding of nonlinearities observed in an oscillating system using flexible beams (https://www.mapleprimes.com/posts/215718-Mode-Coupling-With-Flexible-Beams-). The system required tuning of the structure to develop mode coupling. This could not be explained by linear theory. It was unclear whether the large deflections (nonlinear kinematics of the beam) themselves or the implementation of the flexible beam component were responsible for that.  

 

What I have learned so far with the test case using only default settings: 

  • For moderate deflections there is no difference to textbook formulas.
  • Up to 15 degrees rotation of the end frame, the difference between observed displacement and the Bernoulli beam stays bellow 5%.  
  • Up to 30 degrees rotation of the end frame (as in the mode coupling example) the trace of the end frame conforms well with the analytical path.
  • To simulate verry large deflections beyond 45 degrees rotation, the beam needs to be segmented to closely follow the analytical path.  

For those that are unsure about the fidelity of their models, I can suggest increasing the numbers of flexible beam components and to compare. I did this in the case of the mode coupling example and noticed no difference. So, the component was not responsible for the nonlinearities. It were the kinematics.

It's unclear whether this good performance in large deflections was intended or is a byproduct of the sophisticated multibody dynamics under the hood.  Maybe an expert can tell more.

Overall, to what I have seen the (static) performance was very satisfying. Judging dynamic is performance is much more difficult. Has anyone experience to share with that?

Flexible_beams_const_moment_curve_MP.mw

Flexible_beams_const_Moment_single_beam_MP.msim

Flexible_beams_const_Moment_7_beams_MP.msim

is what I have used.

Some years ago I taught a calculus course for especially talented students. I made up the following problem as an interesting challenge.

Take a circular disk made of paper. Cut out a sector of some angle α from the disk. Roll each of the resulting two pieces into cones. Let V(α) be the sum of the volumes of the two cones. Find the α that maximizes V(α).

Here is an animated statement of the problem, produced in Maple.

 

One of the things I love most about my job is working and collaborating with math teachers across the globe. Every discussion leads to additional insights into the challenges facing teachers today, and new ideas on how to make Maple and Maple Learn better. And sometimes, I even learn some math I thought I already knew!

A few months ago, I introduced Maple Learn to a friend of mine who teaches high school math in Kingston, Ontario. I showed her how she could use Maple Learn to teach many concepts during our call, including Completing the Square. I walked her through Maple Learn’s free-form canvas and explained how her students could work through a problem line-by-line just as they would in their notebooks. I highlighted the live plot window and showed how her students could graphically verify that their solution was equivalent to the initial expression. And, I demonstrated the power of Maple Learn’s intelligent context panel and how her students could check their answers algebraically. I thought I had done a good job, until she said: “Karishma, that’s not how we teach Completing the Square anymore!”. Huh! I was floored. What I had shown was the way I had learned the concept so many years ago. I was surprised to learn that there was a new way.

My friend then introduced me to Algebra Tiles and how she used it to teach Completing the Square. Once we went through a few examples, I realized that I had never fully appreciated what I was doing when I completed the square. I had memorized a series of steps without really understanding what I was trying to do. The progression of our discussion naturally led to the inevitable question: “Karishma, does Maple Learn include Algebra tiles? Because that would be a game-changer for my students. Currently, we use physical tiles, but with remote learning, we need something digital.” At that time, my answer was ‘not yet’; however, with the introduction of image support last week, I’m happy to announce that Maple Learn can support algebra tiles and other interactive supports.

Here is the Maple Learn document I created on Completing the Square using Algebra Tiles.

Feel free to change the expressions listed in the document and share it with your students. To see algebra tiles in action inside Maple Learn, take a look at the short video that I created.  If you have any suggestions for improving this application, please feel free to let me know.

 


 

In the plotting guide I didn't see a waterfall chart so I created a procedure. 
If anyone has a more efficent, better or alternate way please feel free to add.


 

waterfall := proc (data, colorinc := green, colordec := red) local i, r1; r || 1 := plots:-display(plottools:-rectangle([0, 0], [1, data[1]]), color = colorinc); for i from 2 to nops(data) do if data[i-1] < data[i] then r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]]), color = colorinc) elif data[i] < data[i-1] then r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]]), color = colordec) else r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]])) end if end do; plots:-display(seq(r || i, i = 1 .. nops(data))) end proc
``

data := [6, 4, 4, 4, 7, 9, 12, 16, 25, 100, 105, 95, 90, 55, 45, 30]

[6, 4, 4, 4, 7, 9, 12, 16, 25, 100, 105, 95, 90, 55, 45, 30]

(1)

waterfall(data)

 

waterfall(data, purple, yellow)

 

``


 

Download Waterfall.mw

 

Universidad Metropolitana de Ciencias de la Educación
Santiago de Chile

Derivative operator on vectors of real variable (R3): applied to curvilinear motion with Maple and MapleSim

In the present work it will be demonstrated how the derivative operator acts in functions of real variable in the movement of a particle that performs a curvilinear trajectory; using the scientific software of the Maplesoft company known by the names Maple and MapleSim, because nowadays most university teachers (higher education) do not visualize the movement of the particle in real time as well as the results of the calculations of speed and acceleration simultaneously. The objectives achieved are to use the vector operator with the help of these programs. As a theoretical tool we will use the three-dimensional vector spaces of real variable with Newton's notation. The methodology we have used was native syntax and embedded components using block diagrams. For the case of particle motion we use the graphical programming proposed by MapleSim. Viable results were achieved for motivational effects and time reduction in complex calculations without neglecting innovation in physical sciences, for teachers in higher education and university students. This work is self-sustaining via Maple Cloud.

Lenin Araujo Castillo

Ambassador of Maple

This is my second try---my previous post about the Maple Conference  https://www.maplesoft.com/mapleconference/2021/ seems to have vanished into thin electrons.

Anyway!  The conference opens tomorrow!  There are many really interesting prerecorded talks, three live plenaries, two excellent panels, and registration is free!  See the above link.

I look forward to "seeing" you tomorrow.

Rob Corless, co-Chair of the Program Committee

on behalf of the organizers

1 2 3 4 5 6 7 Last Page 1 of 63