[go: up one dir, main page]

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
  • In this post, I would like to share some exercises that I recently taught to an undergraduate student using Maple. These exercises aimed to deepen their understanding of mathematical concepts through computational exploration and visualization. With its powerful symbolic computation capabilities, Maple proved to be an excellent tool for this purpose. Below, I present a few of the exercises and the insights they provided. Interestingly, the student found Maple to be more user-friendly and efficient compared to the software he usually uses for his studies. Below, I present a few of the exercises and the insights they provided.

    One of the first topics we tackled was the Fourier series. We used Maple to illustrate how the Fourier series approximates a given function as more terms are added. We explored this through both static plots and interactive animations.

    To help the student understand the behavior of different types of functions, we defined piecewise functions using Maple's piecewise command. This allowed us to model functions that behave differently over various intervals, such as the following cubic function exercise

    Maple's Explore command was an effective tool for creating an interactive learning environment. We used it to create sliders that allowed the student to vary parameters, such as the number of terms in a Fourier series, and see the immediate impact on the plot.

    restart; with(plots)

    " F(x):={[[-1,-1<x<0],[1,0<x<1]];  "

    proc (x) options operator, arrow, function_assign; piecewise(-1 < x and x < 0, -1, 0 < x and x < 1, 1) end proc

    (1)

    p1 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

     

    L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

    0

    (2)

    a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (3)

    b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (4)

    " #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

    proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

    (5)

    p2 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

    display([p1, p2])

     

    Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

    restart; with(plots)

    " #` Define the piecewise function`  F(x):={[[0,-1<x<0],[x^(2),0<x<1]];  "

    proc (x) options operator, arrow, function_assign; piecewise(-1 < x and x < 0, 0, 0 < x and x < 1, x^2) end proc

    (6)

    p3 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

     

    L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

    1/6

    (7)

    a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (8)

    b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (9)

    " #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

    proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

    (10)

    p4 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

    display([p3, p4])

     

    Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

    restart; with(plots)

    " #` Define the piecewise function`  F(x):={[[x+2,-2<x<0],[2-2 x,0<x<2]]; "

    proc (x) options operator, arrow, function_assign; piecewise(-2 < x and x < 0, x+2, 0 < x and x < 2, 2-2*x) end proc

    (11)

    p5 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

     

    L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

    5/4

    (12)

    a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (13)

    b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (14)

    " #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

    proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

    (15)

    p6 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

    display([p5, p6])

     

    Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

    restart; with(plots)

    F := proc (x) options operator, arrow; piecewise(-1 < x and x < 1, x-x^3, 0) end proc

    proc (x) options operator, arrow; piecewise(-1 < x and x < 1, x-x^3, 0) end proc

    (16)

    p7 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

     

    L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

    0

    (17)

    a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (18)

    b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

    (19)

    b__n(n)

    -4*(n^2*Pi^2*sin(n*Pi)+3*cos(n*Pi)*Pi*n-3*sin(n*Pi))/(n^4*Pi^4)

    (20)

    " #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));      #` Plot the Fourier series approximation`  p8:=plot([`F__fourier`(x,40)],x = -3.. 3 ,numpoints=200, color=[red]) :"

    proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

    (21)

    display([p7, p8])

     

    Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

    NULL

    Download Fourier_Series.mw

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

    MaxGapTheorem2.pdf

    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

    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

    From a discussion about expanding unit expressions with compound units I concluded that expanding derived units such as Newton, Watt, Volt, Tesla,... to SI base units is difficult in Maple.

    Unintentionally, I came across a rather simple solution for SI units.

    toSIbu := x -> x = Units:-Unit(simplify(x/Unit('kg'))*Unit('kg'));

    converts derived SI units to SI base units. It’s the inverse of what the units packages and simplify do (i.e. simplification to derived units).

    What makes it maybe more interesting: It also works, again unintentionally, on other units than SI units. If, one day, you come along an erg or a hartree or or a kyne and you cannot guess the SI units convert/units needs, try

    toSIbu(Unit('pound'));
    toSIbu(Unit('hp'));
    toSIbu(Unit('electron'));
    toSIbu(Unit('hartree'));
    toSIbu(Unit('bohr'));
    toSIbu(Unit('barye'));
    toSIbu(Unit('kyne'));
    toSIbu(Unit('erg'));
    toSIbu(Unit(mile/gal(petroleum)));

    Maybe handy one day when you do not trust AI or the web.


     

    NULL 

    toSIbu := x -> x = Units:-Unit(simplify(x/Unit('kg'))*Unit('kg')):
    toSIbu(Unit('N'));
    toSIbu(Unit('J'));
    toSIbu(Unit('W'));
    toSIbu(Unit('Pa'));
    toSIbu(Unit('C'));
    toSIbu(Unit('F'));
    toSIbu(Unit('S'));
    toSIbu(Unit('H'));
    toSIbu(Unit('T'));
    toSIbu(Unit('V'));
    toSIbu(Unit('Wb'));
    toSIbu(Unit('Omega'));
    toSIbu(Unit('lx'));
    toSIbu(Unit('lm'));
    toSIbu(Unit('degC'));
    toSIbu(Unit('rad'));
    toSIbu(Unit('sr'));

    Units:-Unit(N) = Units:-Unit(m*kg/s^2)

     

    Units:-Unit(J) = Units:-Unit(m^2*kg/s^2)

     

    Units:-Unit(W) = Units:-Unit(m^2*kg/s^3)

     

    Units:-Unit(Pa) = Units:-Unit(kg/(m*s^2))

     

    Units:-Unit(C) = Units:-Unit(A*s)

     

    Units:-Unit(F) = Units:-Unit(A^2*s^4/(m^2*kg))

     

    Units:-Unit(S) = Units:-Unit(A^2*s^3/(m^2*kg))

     

    Units:-Unit(H) = Units:-Unit(m^2*kg/(A^2*s^2))

     

    Units:-Unit(T) = Units:-Unit(kg/(A*s^2))

     

    Units:-Unit(V) = Units:-Unit(m^2*kg/(A*s^3))

     

    Units:-Unit(Wb) = Units:-Unit(m^2*kg/(A*s^2))

     

    Units:-Unit(`&Omega;`) = Units:-Unit(m^2*kg/(A^2*s^3))

     

    Units:-Unit(lx) = Units:-Unit(cd/m^2)

     

    Units:-Unit(lm) = Units:-Unit(cd)

     

    Units:-Unit(`&deg;C`) = Units:-Unit(K)

     

    Units:-Unit(rad) = Units:-Unit(m/m(radius))

     

    Units:-Unit(sr) = Units:-Unit(m^2/m(radius)^2)

    (1)

    NULL


     

    Download toSIbu.mw


    (All done with Maple 2024 without loading any package)

     

     

     

    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:

    dx/dt = rx-bx^2-cxy-`&beta;xz`/(a+x)-a[1]*yz/(e+y)

    dy/dt = -`&mu;y`+`&beta;xy`/(a+x)-a[2]*yz/(d+y)

    " (dz)/(dt)=-mz+((c[1 ]a[1])[ ]xz)/(e[]+x)+((c[1 ]a[2])[ ]yz)/(d+y)"

     

    where r, b, c, β, α,a[1],a[2], e, d, m, c[1], c[2], μ>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:

     

    "r=1,` b`=1,` c`=0.01, a=0.36 ,` a`[1]=0.01,` a`[2]=0.05,` e`[]=15,` m`=0.01,` d`=0.5,` c`[1]=2,` `c[2]==1,` mu`=0.4."

    NULL

    Task (a)

    • 

    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).

     

    restart

    r := 1; b := 1; f := 0.1e-1; alpha := .36; a[1] := 0.1e-1; a[2] := 0.5e-1; e := 15; m := 0.1e-1; d := .5; c[1] := 2; c[2] := 1; mu := .4; beta := .6

    sys := {diff(x(t), t) = r*x(t)-b*x(t)^2-f*x(t)*y(t)-beta*x(t)*y(t)/(alpha+x(t))-a[1]*x(t)*z(t)/(e+x(t)), diff(y(t), t) = -mu*y(t)+beta*x(t)*y(t)/(alpha+x(t))-a[2]*y(t)*z(t)/(d+y(t)), diff(z(t), t) = -m*z(t)+c[1]*a[1]*x(t)*z(t)/(e+x(t))+c[2]*a[2]*y(t)*z(t)/(d+y(t))}

    {diff(x(t), t) = x(t)-x(t)^2-0.1e-1*x(t)*y(t)-.6*x(t)*y(t)/(.36+x(t))-0.1e-1*x(t)*z(t)/(15+x(t)), diff(y(t), t) = -.4*y(t)+.6*x(t)*y(t)/(.36+x(t))-0.5e-1*y(t)*z(t)/(.5+y(t)), diff(z(t), t) = -0.1e-1*z(t)+0.2e-1*x(t)*z(t)/(15+x(t))+0.5e-1*y(t)*z(t)/(.5+y(t))}

    (1)

    ics := {x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1}

    {x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1}

    (2)

    NULL

    sol := dsolve(`union`(sys, ics), {x(t), y(t), z(t)}, numeric, range = 0 .. 20000, maxfun = 0, output = listprocedure, abserr = 0.1e-7, relerr = 0.1e-7)

    `[Length of output exceeds limit of 1000000]`

    (3)

    X := subs(sol, x(t)); Y := subs(sol, y(t)); Z := subs(sol, z(t))

    ``

    plot('[X(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory of x(t)", axes = boxed, gridlines, color = ["#40e0d0"])

     

    plot('[Y(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory", axes = boxed, gridlines, title = "Trajectory of y(t)", color = ["SteelBlue"])

     

    ``

    plot('[Z(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory", axes = boxed, gridlines, title = "Trajectory of Z(t)", color = "Black"); with(DEtools)

     

    with(DEtools)

    DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 20000, [[x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1]], numpoints = 35000, color = blue, thickness = 1, linestyle = solid)

     

    Task (b)

    • 

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

    NULL

    restart

    r := 1; b := 1; f := 0.1e-1; alpha := .36; a[1] := 0.1e-1; a[2] := 0.5e-1; e := 15; m := 0.1e-1; d := .5; c[1] := 2; c[2] := 1; mu := .4; beta := .61

    NULL

    sys := {diff(x(t), t) = r*x(t)-b*x(t)^2-f*x(t)*y(t)-beta*x(t)*y(t)/(alpha+x(t))-a[1]*x(t)*z(t)/(e+x(t)), diff(y(t), t) = -mu*y(t)+beta*x(t)*y(t)/(alpha+x(t))-a[2]*y(t)*z(t)/(d+y(t)), diff(z(t), t) = -m*z(t)+c[1]*a[1]*x(t)*z(t)/(e+x(t))+c[2]*a[2]*y(t)*z(t)/(d+y(t))}

    {diff(x(t), t) = x(t)-x(t)^2-0.1e-1*x(t)*y(t)-.61*x(t)*y(t)/(.36+x(t))-0.1e-1*x(t)*z(t)/(15+x(t)), diff(y(t), t) = -.4*y(t)+.61*x(t)*y(t)/(.36+x(t))-0.5e-1*y(t)*z(t)/(.5+y(t)), diff(z(t), t) = -0.1e-1*z(t)+0.2e-1*x(t)*z(t)/(15+x(t))+0.5e-1*y(t)*z(t)/(.5+y(t))}

    (4)

    NULL

    ics := {x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1}

    {x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1}

    (5)

    sol := dsolve(`union`(sys, ics), {x(t), y(t), z(t)}, numeric, range = 0 .. 20000, maxfun = 0, output = listprocedure, abserr = 0.1e-7, relerr = 0.1e-7)

    `[Length of output exceeds limit of 1000000]`

    (6)

    X := subs(sol, x(t)); Y := subs(sol, y(t)); Z := subs(sol, z(t))

    NULL

    plot('[X(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory of x(t)", axes = boxed, gridlines, color = ["Blue"])

     

    plot('[Y(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory of  Y(t)", axes = boxed, gridlines, color = "Red")

     

    plot('[Z(t)]', t = 0 .. 20000, numpoints = 350, title = "Trajectory of  Y(t)", axes = boxed, gridlines, color = "Black")

     

    NULL

    with(DEtools)

    DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 20000, [[x(0) = .2, y(0) = 0.5e-1, z(0) = 0.5e-1]], maxfun = 0, numpoints = 35000, color = blue, thickness = 1, linestyle = solid)

     

    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

    ``

    Download math_model_eco-epidemiology.mw

    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

     

    I'm excited to announce the creation of a new LinkedIn group, Maple Software Community! This group is dedicated to discussions about the use of Maple software and is designed to be a valuable resource for undergraduate and graduate students, researchers, and all Maple enthusiasts.

    By joining this community, you'll have the opportunity to:

    • Learn about upcoming events and workshops that can enhance your skills.
    • Stay informed on the latest projects that leverage Maple software.
    • Engage in discussions that explore the many uses of Maple across various fields.
    • Connect with Maple ambassadors and users worldwide who are eager to share their knowledge and experience.

    Whether you're a seasoned user or just starting out with Maple, your contributions to this group are welcome and encouraged. Let's build a thriving community together!


    Looking forward to seeing you there! 

    Maple Software Community

    I'm excited to share some valuable resources that I've found incredibly helpful for anyone looking to enhance their Maple skills. Whether you're just starting, studying as a student, or are a seasoned professional, these guides and books offer a wealth of information to aid your learning journey.

    Exploring Discrete Mathematics With Maple

    These materials are freely available and can be a great addition to your learning resources. They cover a wide range of topics and are designed to help users at all levels improve their Maple proficiency.

    You can add your own sources in a comment!

    Happy learning and I hope you find these resources as useful as I have!

    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);

    true

    GetVerification(length_not_increased);

    proc (a, b) options operator, arrow; evalb(length(a) <= length(b)) end proc

    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);

    true

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

    IsVerification(boolean = length_not_increased);

    true

    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);

    true

    Now, let's use the new verification:

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

    true

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

    false

    Finally, let's remove the verification:

    RemoveVerification(length_not_increased);

    Exists(length_not_increased);

    false

    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();

    [Array, FAIL, FrobeniusGroupId, Global, Matrix, MultiSet, PermGroup, RootOf, SmallGroupId, Vector, address, after, approx, array, as_list, as_multiset, as_set, attributes, boolean, box, cbox, curve, curves, dataframe, dataseries, default, default, dummyvariable, equal, evala, evalc, expand, false, float, function, function_bounds, function_curve, function_shells, greater_equal, greater_than, in_convex_polygon, indef_int, interval, less_equal, less_than, list, listlist, matrix, member, multiset, neighborhood, neighbourhood, normal, permute_elements, plot, plot3d, plot_distance, plotthing_compile_result, polynom, procedure, ptbox, range, rational, record, relation, reverse, rifset, rifsimp, rtable, set, sign, simplify, sublist, `subset`, subtype, superlist, superset, supertype, symbol, table, table_indices, testeq, text, true, truefalse, type, undefined, units, vector, verifyfunc, wildcard, xmltree, xvm]

    Download VerificationTools_blogpost.mw

    Austin Roche
    Software Architect
    Mathematical Software
    Maplesoft

    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


     


    Addition 09/01/24, 
    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;


    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 
      N such that D/N/1 is made of balls with identical radii?
      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


    Follow this link OneDrive Google

    As AI becomes increasingly relevant in the tech world, Maplesoft has taken steps to integrate AI into our products. We recently launched two new features: Ask AI in Maple Learn and Word Problem Solver in Maple Calculator. 

     

    Ask AI - Maple Learn

    As a Math Content Creator at Maplesoft, sometimes I find myself in a creative rut. What documents would be engaging for students? How can I address certain math topics in a fun and interactive way?

    I've had the pleasure of creating several collections during my time, including Extreme Value Theorem, Intermediate Value Theorem, and Polynomial Long Division. Nonetheless, each collection took a lot of storyboarding and creativity before I even began drafting them, and I've missed out on creating so many more collections because of this long idea generation process. Having a tool in my back pocket to reignite those creative juices would make it so much easier and faster to create new and exciting Maple Learn documents. 

    Luckily, our new Ask AI feature in Maple Learn can help with that! 

    Whenever you enter text into a Maple Learn document, a new Context Panel operation called "Ask AI" will pop up. Simply click that button to receive an AI response related to your prompt.

    One of my favourite uses of Ask AI is to pick a random subject or phrase and see what the AI responds with. The Ask AI feature is designed to respond with a mathematics-centric answer so it will twist even the least mathematical of concepts into a math problem! The prompt "tacos" resulted in some formulas about sharing tacos with friends, and a prompt of "celebrity gossip" introduced statistical functions to compute the number of celebrity mentions per day

    I also found that completing part of a tongue twister will result in some funny AI responses!

    Here are a couple of my favorites below:

    "She sells sea shells..."

    Ask AI completes this tongue twister, then offers some formulas to compute the profit of selling S shells!

    "How much wood..."

    After relating that this tongue twister is not a mathematical problem, Ask AI then builds a simple formula for computing how much wood a woodchuck would (hypothetically) chuck.

    There are many more applications of this feature, and I hope you all enjoy exploring them as you create documents on Maple Learn. If you're having trouble inputting text into your documents, or looking for a quick introduction to Maple Learn, check out the Walkthrough Tutorial. Beginner Tutorial (slide 8) addresses adding text to your document. Check out this blog post if you aren't sure how to access the Walkthrough Tutorial. 

     

    Word Problem Solver - Maple Calculator

    Maple Calculator now offers support for word problems by leveraging AI. Simply take a picture of your word problem and Maple Calculator will provide a solution generated by AI.

    Here is a quick example:

    I wrote on paper, “Alice and Bob have 17 apples total. Alice has double the number of apples as Bob plus two. How many apples does Bob have?”. Then I took a picture of this in Maple Calculator, and it gave me a breakdown of the problem using linear equations. See screenshots of my Maple Calculator below.

             

     

     

         

     

    AI can be an amazing tool, but it can also make mistakes. We ensure that all our tools that incorporate AI clearly indicate its use, so that our users can know when AI is used and choose whether to use it. We're committed to remaining transparent about AI as our journey continues and we are always open to feedback. 

    For our community of educators, a valuable exercise for students might be to show examples where AI makes mistakes and encourage students to find and explain the errors.

    As an example, here is an algebra problem answered by Ask AI in Maple Learn – but it made a mistake! See if your students can spot where it went wrong and explain what should happen instead.

    Building these skills will translate into good critical thinking skills that will benefit students inside and outside the classroom. For example, these exercises aim to help students identify their own mistakes in math and critically evaluate online sources. We would love to hear feedback about these exercises if you try them.

    We hope these features will come in handy next time you use Maple Learn and Maple Calculator! 

     

     


     

    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``with(plots); b := .20; sys := diff(x(t), t) = sin(y(t))-b*x(t), diff(y(t), t) = sin(z(t))-b*y(t), diff(z(t), t) = sin(x(t))-b*z(t); sol := dsolve({sys, x(0) = 1.1, y(0) = 1.1, z(0) = -0.1e-1}, {x(t), y(t), z(t)}, numeric); odeplot(sol, [x(t), y(t), z(t)], t = 0 .. 600, axes = boxed, numpoints = 50000, labels = [x, y, z], title = "Thomas Attractor")

     

     

     

    Dabras``

    with(plots); a := 3.00; b := 2.7; c := 1.7; d := 2.00; e := 9.00; sys := diff(x(t), t) = y(t)-a*x(t)+b*y(t)*z(t), diff(y(t), t) = c*y(t)-x(t)*z(t)+z(t), diff(z(t), t) = d*x(t)*y(t)-e*z(t); sol := dsolve({sys, x(0) = 1.1, y(0) = 2.1, z(0) = -2.00}, {x(t), y(t), z(t)}, numeric); odeplot(sol, [x(t), y(t), z(t)], t = 0 .. 100, axes = boxed, numpoints = 35000, labels = [x, y, z], title = "Dabras Attractor")

     

    Halvorsen

    NULLwith(plots); a := 1.89; sys := diff(x(t), t) = -a*x(t)-4*y(t)-4*z(t)-y(t)^2, diff(y(t), t) = -a*y(t)-4*z(t)-4*x(t)-z(t)^2, diff(z(t), t) = -a*z(t)-4*x(t)-4*y(t)-x(t)^2; sol := dsolve({sys, x(0) = -1.48, y(0) = -1.51, z(0) = 2.04}, {x(t), y(t), z(t)}, numeric, maxfun = 300000); odeplot(sol, [x(t), y(t), z(t)], t = 0 .. 600, axes = boxed, numpoints = 35000, labels = [x, y, z], title = "Halvorsen Attractor")

     

    Chen

     

     

    with(plots); alpha := 5.00; beta := -10.00; delta := -.38; sys := diff(x(t), t) = alpha*x(t)-y(t)*z(t), diff(y(t), t) = beta*y(t)+x(t)*z(t), diff(z(t), t) = delta*z(t)+(1/3)*x(t)*y(t); sol := dsolve({sys, x(0) = -7.00, y(0) = -5.00, z(0) = -10.00}, {x(t), y(t), z(t)}, numeric); odeplot(sol, [x(t), y(t), z(t)], t = 0 .. 100, axes = boxed, numpoints = 35000, labels = [x, y, z], title = "Chen Attractor")

     

    References

    1. 

    https://www.dynamicmath.xyz/strange-attractors/

    2. 

    https://en.wikipedia.org/wiki/Attractor#Strange_attractor

    ``


     

    Download Attractors.mw

     Introduction
    Maple Coding Expert is a GPT-based AI tool designed to assist with various mathematical tasks using Maple software. It offers step-by-step guidance and detailed explanations for a range of functions, making it a valuable resource for students, educators, and professionals.

     Core Features and Functions

    1.Graph Creation:

       - Function Plotting: Users can plot a wide range of mathematical functions. For instance, to plot the function y = x2, the user would input the command `plot(x^2, x = -10..10);` in Maple. The expert helps in setting up the plotting parameters to visualize the function effectively.
       - Advanced Graphing: Beyond simple functions, the expert can guide users through plotting more complex functions and customizing plots with labels, legends, and different styles.

    2. Equation Definition and Manipulation:

       - Defining Equations: The tool assists in defining equations for various calculus operations. For example, to differentiate a function, the command might be `diff(f(x), x);`. This helps in accurately modeling the equations necessary for solving real-world problems.
       - Solving Integrals: For integral calculus, users can get assistance in setting up both definite and indefinite integrals. Commands like `int(f(x), x);` are used to perform integration in Maple.

    3. Calculus Problem Solving:
       - Differentiation and Integration: The expert provides guidance on solving derivatives and integrals, which are fundamental operations in calculus. It supports both symbolic and numerical methods, allowing users to choose the best approach for their problem.
       - Differential Equations: Users can solve ordinary and partial differential equations using commands like `dsolve({equations}, {variables});`. The expert offers advice on choosing solution methods and interpreting results.

    I recently tried using the Maple Coding Expert for solving some calculus problems. It worked well overall and provided detailed solutions, though sometimes it approached the problems in a more complicated way than expected. Despite this, the accuracy and depth of the explanations were impressive and very helpful for understanding the underlying concepts.

     

    Maple Coding Expert stands out as a comprehensive tool for anyone involved with Maple software for mathematical computing. It enhances learning, supports professional tasks, and aids in solving complex mathematical problems with ease.

    For more information, you can explore the Maple Coding Expert on [GPTs Hunter](https://www.gptshunter.com/gpt-store/MzExMzI2MzYyMzJlNTAxMjM2) and [YesChat.ai](https://www.yeschat.ai).

     

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