## Maximal Gap Among Integers Having a Common Divisor...

by: Maple

Source codes (seen in the pdf file) for the paper "Maximal Gap Among Integers Having a Common Divisor with an Odd Semi-prime".

## The flag on the strip of Möbius

by: Maple

The flag of Germany on the strip of the German mathematician August Ferdinand Möbius. Basically, it's just one way to represent flags of a certain type. It seemed that the flag looked good on the Mobius strip.
FLAG.mw

## Rolling a plane curve along a fixed plane curve...

by: Maple 2024

Hello!

I present a simple work-up of rolling a plane curve along a fixed plane curve in 2d space. Maple sources are attached.

Kind regards!

Source.zip

## Exploring the Impact of Infection Rate Variation...

by: Maple 2024

Today in class, we presented an exercise based on the paper titled "Analysis of regular and chaotic dynamics in a stochastic eco-epidemiological model" by Bashkirtseva, Ryashko, and Ryazanova (2020). In this exercise, we kept all parameters of the model the same as in the paper, but we varied the parameter β, which represents the rate of infection spread. The goal was to observe how changes in β impact the system's dynamics, particularly focusing on the transition between regular and chaotic behavior.

This exercise involves studying a mathematical model that appears in eco-epidemiology. The model is described by the following set of equations:

where r, b, c, β, α,,, e, d, m, , , μ>0 are given parameters. This model generalizes the classic predator-prey system by incorporating disease dynamics within the prey population. The populations are divided into the following groups:

 • Susceptible prey population (x): Individuals in the prey population that are healthy but can become infected by a disease.
 • Infected prey population (y): Individuals in the prey population that are infected and can transmit the disease to others.
 • Predator population (z): The predator population that feeds on both susceptible (x) and infected (y) prey.

The initial conditions are always x(0)=0.2, y(0)=0.05, z(0)=0.05,  and we will vary the parameter β.;

For this exercise, the parameters are fixed as follows:

 • Solve the system numerically for the given parameter values and initial conditions with β=0.6 over the time interval t2[0,20000].
 • Plot the solutions x(t), y(t), and  z(t) over this time interval.
 • Comment on the model's predictions, keeping in mind that the time units are usually days.
 • Also, plot the trajectory in the 3D space (x,y,z).

 (1)

 (2)

 (3)

 • Repeat the study in part (a) with the same initial conditions but set β=0.61.

 (4)

 (5)

 (6)

The rate of the infection spread is affected by the average number of contacts each person has (β=0.6) and increases depending on the degree of transmission within the population, in particular within specific subpopulations (such as those in rural areas). A detailed epidemiological study showed that the spread of infection is most significant in urban areas, where population density is higher, while in rural areas, the rate of infection remains relatively low. This suggests that additional public health measures are needed to reduce transmission in densely populated areas, particularly in regions with high population density such as cities

## About the inverse kinematics problem. The simplest...

by: Maple

This is another attempt to tell about one way to solve the problem of inverse kinematics of a manipulator.
We have a flat three-link manipulator. Its movement is determined by changing three angles - these are three control parameters. 1. the first link rotates around the black fixed point, 2. the second link rotates around the extreme movable point of the first link, 3. the third link − around the last point of the second link. These movable points are red. (The order of the links is from thick to thin.) The working point is green. For example, we need it to move along a circle. But the manipulator has one extra mobility (degree of freedom), that is, the problem has an infinite number of solutions. We have the ability to remove this extra degree of freedom mathematically. And this can also be done in an infinite number of ways.
Let us give two examples where the same manipulator performs the same movement of the working point in different ways. In one case the last red point moves in a straight line, and in the other case it moves in an ellipse. The result is the same. In the corresponding program texts, the manipulator model is described by a system of nonlinear equations f1, f2, f3, f4, f5 relative to the coordinates of the ends of the links (very easy to understand). The specific additional connection that takes away one degree of freedom is highlighted in blue. Equation of a circle in red color.

1.mw

2.mw

And as an elective. The same circle was obtained using a spatial 3-link manipulator with 5 degrees of freedom. In the last text, blue and red colors perform the same functions as in the previous texts.
3.mw

## Introducing VerifyTools

by: Maple

VerifyTools is a package that has been available in Maple for roughly 24 years, but until now it has never been documented, as it was originally intended for internal use only. Documentation for it will be included in the next release of Maple. Here is a preview:

VerifyTools is similar to the TypeTools package. A type is essentially a predicate that a single expression can either satisfy or not. Analogously, a verification is a predicate that applies to a pair of expressions, comparing them. Just as types can be combined to produce compound types, verifications can also be combined to produce compund verifications. New types can be created, retrieved, queried, or deleted using the commands AddType, GetType (or GetTypes), Exists, and RemoveType, respectively. Similarly in the VerifyTools package we can create, retrieve, query or delete verifications using AddVerification, GetVerification (or GetVerifications), Exists, and RemoveVerification.

The package command VerifyTools:-Verify is also available as the top-level Maple command verify which should already be familiar to expert Maple users. Similarly, the command VerifyTools:-IsVerification is also available as a type, that is,

VerifyTools:-IsVerification(ver);

will return the same as

type(ver, 'verification');

The following examples show what can be done with these commands. Note that in each example where the Verify command is used, it is equivalent to the top-level Maple command verify. (Also note that VerifyTools commands shown below will be slightly different compared to the Maple2024 version):

 > with(VerifyTools):

Suppose we want to create a verification which will checks that the length of a result has not increased compared to the expected result. We can do this using the AddVerification command:

 > AddVerification(length_not_increased, (a, b) -> evalb(length(a) <= length(b)));

First, we can check the existence of our new verification and get its value:

 > Exists(length_not_increased);

 > GetVerification(length_not_increased);

For named verifications, IsVerification is equivalent to Exists (since names are only recognized as verifications if an entry exists for them in the verification database):

 > IsVerification(length_not_increased);

On the other hand, a nontrivial structured verification can be checked with IsVerification,

 > IsVerification(boolean = length_not_increased);

whereas Exists only accepts names:

 > Exists(boolean = length_not_increased);

Error, invalid input: VerifyTools:-Exists expects its 1st argument, x, to be of type symbol, but received boolean = length_not_increased

The preceding command using Exists is also equivalent to the following type call:

 > type(boolean = length_not_increased, verification);

Now, let's use the new verification:

 > Verify(x + 1/x, (x^2 + 1)/x, length_not_increased);

 > Verify((x^2 + 1)/x, x + 1/x, length_not_increased);

Finally, let's remove the verification:

 > RemoveVerification(length_not_increased);
 > Exists(length_not_increased);

 > GetVerification(length_not_increased);

Error, (in VerifyTools:-GetVerification) length_not_increased is not a recognized verification

GetVerifications returns the list of all verifications known to the system:

 > GetVerifications();

Austin Roche
Software Architect
Mathematical Software
Maplesoft

## Circle inscribed between smooth curves

by: Maple

Circles inscribed between curves can be specified by a system of equations relative to the coordinates of the center of the circle and the coordinates of the tangent points. Such a system can have 5 or 6 equations and 6 variables, which are mentioned above.
In the case of 5 equations, we can immediately obtain an infinite set of solutions by selecting the ones we need from it.
(See the attached text for more details.)
The 1st equation is responsible for the belonging of the point of tangency to one of the curves.
The 2nd equation is responsible for the belonging of the point of tangency to another curve.
In the 3rd equation, the points of tangency on the curves belong to the inscribed circle.
In the 4th and 5th equations, the condition is satisfied that the tangents to the curves are perpendicular to the radii of the circle at the points of contact.
The 6th equation serves either to find a specific inscribed circle or to find an infinite set of solutions. It is selected based on the type of curves and their mutual arrangement.

In this example, we search for a subset of the solution set using the Draghilev method by solving the first five equations of the system: we inscribe circles in two "angles" formed by the intersection of the exponent and the ellipse.
The text of this example, its solution in the form of a picture,"big" option and pictures of similar examples.

INSCRIBED_CIRCLES.mw

One curve for the first two equations in coordinates x1,x2 and x3,x4
f1:=
x1^2 - 2.5*x1*x2 + 3*x2^2 - 1;
f2:=
x3^2 - 2.5*x3*x4 + 3*x4^2 - 1;

## A story of packing

by: Maple 2015

This post is inspired by minhthien2016's question.

The problem, denoted 2/N/1, for reasons that will appear clearly further on, is to pack N disks into the unit square in such a way that the sum of their radii is maximum.

I replied this problem using Optimization-NLPSolve for N from 1 (obvious solution) to 16, which motivated a few questions, in particular:

• @Carl Love:﻿ "Can we confirm that the maxima are global (NLPSolve tends to return local optima)?
Using NLPSolve indeed does not guarantee that the solution found is the (a?) global maximum. In fact packing problems are generaly tackled by using evolutionnary algorithms, greedy algorithms, or specific heuristic strategies.
Nevertheless, running NLPSolve a large number of times from different initial points may provide several different optima whose the largest one can be reasonably considered as the global maximum you are looking for.
Of course this may come to a large price in term of computational time.

• @acer: "How tight are [some constraints], at different N? Are they always equality?"
The fact some inequality constraints type always end to equality constraints (which means that in an optimal packing each disk touches at least one other annd, possibly the boundary of the box) seems hard to prove mathematically, but I gave here a sketch of informal proof.

I found 2/N/1 funny enough to spend some time digging into it and looking to some generalizations I will refer to as D/N/M:  How to pack N D-hypersheres into the unit D-hypercube such that the sum of the M-th power of their radii is maximum?
For the sake of simplicity I will say ball instead of disk/sphere/hypersphere and box instead of square/cube/hypercube.

The first point is that problems D/N/1 do not have a unique solution as soon as N > 1 , indeed any solution can be transformed into another one using symmetries with respect to medians and diagonals of the box. Hereafter I use this convention:

Two solutions and s' are fundamental solutions if:

1. the ordered lists of radii and s'  contain are identical but there is no composition of symmetries from to s',
2. or, the ordered lists of radii and s'  contain are not identical.

It is easy to prove that 2/2/1 and 3/2/1, and likely D/2/1, have an infinity of fundamental solutions: see directory FOCUS__2|2|1_and_3|2|1 in the attached zip file..
At the same time 2/N/2, 3/N/3, and likely D/N/D, have only one fundamental solution (see directory FOCUS__2|N|2 for more details and a simple way to characterize these solutions

(Indeed the strategy ito find the solution of D/N/D  in placing the biggest possible ball in the largest void D/N-1/D contains. Unfortunately this characterization is not algorithmically constructive in the sense that findind this biggest void is a very complex geometrical and combinatorial problem.
it requires finding the largest void  in a pack of balls)

Let Md, 1(N)  the maximum value of the sum of balls radii for problem d/N/1.
The first question I asked myself is: How does Md, 1(N) grows with N?

(Md, 1(N) is obviously a strictly increasing function of N: indeed the solution of problem d/N/1 contains several voids where a ball of strictly positive radius can be placed, then  Md+1, 1(N) > Md, 1(N) )

The answer seems amazing as intensive numerical computations suggest that

See D|N|M__Growth_law.mw in the attached sip file.
This formula fits very well the set of points  { [n, Sd, 1(n) , n=1..48) } for d=2..6.
I have the feeling that this conjecture might be proven (rejected?) by rigourous mathematical arguments.

Fundamental solutions raise several open problems:

• Are D/2/1 problems the only one with more than one fundamental solutions?

The truth is that I have not been capable to find any other example (which does not mean they do not exist).
A quite strange thing is the behaviour of NLPSolve: as all the solutions of D/2/1 are equally likely, the histogram of the solutions provided by a large number of NLPSolve runs from different initial points is far from being uniform.
F
or more detail refer ro directory FOCUS__2|2|1_and_3|2|1
in the attached zip file
I do not understand where this bias comes from: is it due to the implementation of SQP in NLPSolve, or to SQP itself?

• For some couples (D, N) the solution of D/N/1 is made of balls of same radius.
For N from 1 to 48 this is (numerically)
the case for 2/1/1 and2/2/1, but the three dimensional case is reacher as it contains  3/1/13/2/1,  3/3/1,  3/4/1 and 3/14/1 (this latter being quite surprising).
Is there only a finite number of values
If it is so, is this number increasing with
D?
It is worth noting that those values of
N mean that the solution of problems D/N/1 are identical to those of a more classic packing problem: "What is the largest radius N identical balls packed in a unit bow may have?".
For an exhaustive survey of this latter problem see
Packomania.

• A related question is "How does the number of different radii evolves as N increases dor given values of D and M?
Displays of 2D and 3D packings show that the set of radii has significantly less elements than
N... at least for values of N not too large. So might we expect that solution of, let us say, 2/100/1 can contain 100 balls of 10 different radii, or it is more reasonable to expect it contains 100 balls of 100 different radii?

• At the opposite numerical investigations of  2/N/1 and  3/N/1 suggest that the number of different radii a fundamental solution contains increases with N (more a trend than a continuous growth).
So, is it true that very large values of N correspond to solutions where the number of different radii is also very large?

Or could it be that the growth of the number of different radii I observed is simply the consequence of partially converged results?

• Numerical investigations show that for a given dimension d and a given number of balls n,  solutions of d/n/1 and d/n/M (1 < M < d) problems are rather often the same. Is this a rule with a few exceptions or a false impression due to the fact that I did not pushed the simulations to values of n large enough to draw a more solid picture)?

It is likely that some of the questions above could be adressed by using a more powerful machine than mine.

All the codes and results are gathered in  a zip file you can download from OneDrive Google  (link at the end of this post, 262 Mb, 570 Mb when unzipped, 1119 files).
Install this zip file in the directory of your choice and unzip it to get a directory named
PACKING
Within it:

• README.mw contains a description of the different codes and directories
• Repository.rtf must contain a string repesenting the absolute path of directory PACKING

## Exploring Nonlinear Dynamics: Analysis of Strange...

by: Maple 2024

An attractor is called strange if it has a fractal structure, that is if it has a non-integer Hausdorff dimension. This is often the case when the dynamics on it are chaotic, but strange nonchaotic attractors also exist.  If a strange attractor is chaotic, exhibiting sensitive dependence on initial conditions, then any two arbitrarily close alternative initial points on the  attractor, after any of various numbers of iterations, will lead to  points that are arbitrarily far apart (subject to the confines of the attractor), and after any of various other numbers of iterations will  lead to points that are arbitrarily close together. Thus a dynamic system with a chaotic attractor is locally unstable yet globally stable: once some sequences have entered the attractor, nearby points diverge  from one another but never depart from the attractor.

The term strange attractor was coined by David Ruelle and Floris Takens to describe the attractor resulting from a series of bifurcations of a system describing fluid flow. Strange attractors are often differentiable in a few directions, but some are like a Cantor dust, and therefore not differentiable. Strange attractors may also be found  in the presence of noise, where they may be shown to support invariant  random probability measures of Sinai–Ruelle–Bowen type.

Examples of strange attractors include the  Rössler attractor, and Lorenz attractor.

THOMAS

Dabras

Chen

References

 1 https://www.dynamicmath.xyz/strange-attractors/
 2 https://en.wikipedia.org/wiki/Attractor#Strange_attractor

## Standard and extended Lotka-Volterra models with...

by: Maple 2024

 This project discusses predator-prey system, particularly the Lotka-Volterra equations,which model the interaction between two sprecies: prey and predators. Let's solve the Lotka-Volterra equations numerically and visualize the results. Now, we need to handle a modified version of the Lotka-Volterra equations. These modified equations incorporate logistic growth fot the prey population.

## Maple Conference 2024 - Registration is now open

by: Maple , Maple Learn

We are pleased to announce that the registration for the Maple Conference 2024 is now open.

Like the last few years, this year’s conference will be a free virtual event. Please visit the conference page for more information on how to register.

This year we are offering a number of new sessions, including more product training options and an Audience Choice session.
You can find an overview of the program on the Sessions page. Those who register before September 10th, 2024 will have a chance to vote for the topics they want to learn more about during the Audience Choice session.

We hope to see you there!

## Maple Conference 2024: Application reminder

by: Maple , Maple Learn

This is a reminder that presentation applications for the Maple Conference are due July 17, 2024.

The conference is a a free virtual event and will be held on October 24 and 25, 2024.

We are inviting submissions of presentation proposals on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. We also encourage submission of proposals related to Maple Learn. You can find more information about the themes of the conference and how to submit a presentation proposal at the Call for Participation page.

I encourage all of you here in the Maple Primes community to consider joining us for this event, whether as a presenter or an attendee!

Contributed Program Co-Chair

## Maple Conference 2023 Proceedings

by: Maple

The Proceedings of the Maple Conference 2023 is now out, at

mapletransactions.org

The presentations these are based on (and more) can be found at https://www.maplesoft.com/mapleconference/2023/full-program.aspx#schedule .

There are several math research papers using Maple, an application paper by an undergraduate student, an engineering application paper, and an interesting geometry teaching paper.

Please have a look, and don't forget to register for the Maple Conference 2024.

## Weakness of the solve command

by: Maple 2018

Consider the equation  (2^x)*(27^(1/x)) = 24  for which we need to find the exact values ​​of its real roots. This is not difficult to solve by hand if you first take the logarithm of this equation to any base, after which the problem is reduced to solving a quadratic equation. But the  solve  command fails to solve this equation and returns the result in RootOf form. The problem is solved if we first ask Maple to take the logarithm of the equation. I wonder if the latest versions of Maple also do not directly address the problem?

```restart;
Eq:=2^x*27^(1/x)=24:
solve(Eq, x, explicit);

map(ln, Eq); # Taking the logarithm of the equation
solve(%, x);
simplify({%}); # The final result
```

## Announcing Maple Flow 2024

by: Maple Flow 2024

We've just launched Maple Flow 2024!

You're in the driving seat with Maple Flow - each new feature has a straight-line connection to a user-driven demand to work faster and more efficiently.

Head on over here for a rundown of everything that's new, but I thought I'd share my personal highlights here.

If your result contains a large vector or matrix, you can now scroll to see more data. You can also change the size of the matrix to view more or fewer rows and columns.

You can resize rows and columns if they're too large or small, and selectively enable row and column headers.

If the vector or matrix in your result contains a unit, you can now rescale units with the Context Panel (for the entire matrix) or inline (for individual entries).

A few releases ago, we introduced the Variables palette to help you keep track of all the user-defined parameters at point of the grid cursor.

You can now insert variables into the worksheet from the Variables palette. Just double-click on the appropriate name.

Maple Flow already features command completion - just type the first few letters of a command, and a list of potential completions appears. Just pick the completion you need with a quick tap of the Tab key.

We've supercharged this feature to give potential arguments for many popular functions. Type a function name followed by an opening bracket, and a list appears.

In case you've missed it, the argument completion list also features (when they make sense) user-defined variables.