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
  • The pendulum and the cantilever share simple-looking ordinary differential equations (ODEs), but they are challenging to solve:

    This post derives solutions from Lawden and Bisshopp by Maple commands, which (to the best of my knowledge) have not been published providing not only results but also the accompanying computer algebra techniques. A tabulated format has been chosen to better highlight similarities and differences.

    Both solutions have in common that in a first step, the unknown function is integrated and then in a second step the inverse of the unknown function (i.e., the independent variable) is integrated. Only in combination with a well-chosen set of initial/boundary conditions solutions are possible. This makes these two cases difficult to handle by generic integration methods.

    Originally, I was not looking for this insight. I was more interested in an exact solution for nonlinear deformations to benchmark numerical simulation results.  Relatively quickly, I was able to achieve this with the help of this forum, but after that I was left with some nagging questions:

    Why does Maple not provide a solution for the pendulum although one exists?

    Why isn’t there an explicit solution for the cantilever when there is one for the pendulum?

    Why is it so difficult to proof that elliptic expressions are equal?

    Repeatedly, whenever there was time, I came back to these questions and got more and more a better understanding of the two problems and the overall context. It also required me to learn more of Maple, and I had to revisit fundamentals of functions, differential equations, and integration, which was entirely possible within Maples help system. Today, I am satisfied to the point that I think it is too much to expect Maple to provide a high-level general integration method for such problems.

    I am also satisfied that I was able to combine all my findings scattered across many documents and Mapleprime questions into a single executable textbook-style document with hidden Maple code that:

    Exclusively uses and manipulates equation expressions (no assignment operators := were required),

    Avoids differentials that are often used in textbooks but (for good reasons) are not supported by Maple,

    Exclusively applies high-level commands (i.e. no extraction of subexpression, manipulation
               and subsequent re-assembly of expressions was needed).

    The solutions for the pendulum and the cantilever are substantially different although the ODEs and essential derivation steps are similar. I think that an explicit solution for the cantilever, as it exists for the pendulum, is impossible (using elliptic integrals and functions). I leave it open to comments: whether this is correct and whether it is attributable to the set of initial and boundary conditions, the different symmetry of the sine and cosine functions in the ODEs, or both. I hope that the tabular presentation will provide an easy overview, allowing to form an own opinion.

    If you are patient enough to work through the table, you will find a link between the cantilever and the pendulum that you are probably not expecting. 

    Finally, I have to give credit to Bisshopp, who was probably the first to provide a solution for the cantilever. The clarity and compactness on only 3 pages and the way how the inverse of functions was determined before the age of computers makes this paper worth studying. Also, Lawden has to be mentioned, who did the same on 3 pages for the pendulum in a marvelous book on elliptic functions and applications. It happens that he is overlooked in more recent publications and it’s unclear to me if he was the first who published an explicit solution. His book might be one of the last of its kind in this age of computers, and for that reason alone, it is worth enjoying as he enjoyed writing it.

     

    The Pendulum and the Cantilever Side by Side

    C_R, Summer 2023

    • 

    To better compare the pendulum and the cantilever, the symbol `ϕ` was chosen for the angle of the pendulum for the simple reason that this comparison started with bending theory, where `ϕ` is often used to denote a deflection angle.

    • 

    Leibniz and Newton notation was not used to make functional dependencies of variables visible. Instead functional notation  `ϕ` = `ϕ`(t) and `ϕ` = `ϕ`(s)is used.

    • 

    To create an executable document that maintains a clear representation, it is necessary to use functional notation for differential equations and remove functional notation for integration. To avoid using the same symbol for both the integration variable and the upper limit of integration, this document uses two ways to express when the upper limit of integration varies (i.e., depends on the dependent variable of the functions being searched, namely `ϕ` = `ϕ`(t) and `ϕ` = `ϕ`(s)). Both ways have their pros and cons.

     

    Typesetting:-EnableTypesetRule({"EllipticE", "EllipticE2", "EllipticF", "EllipticK", "InverseJacobiAM", "InverseJacobiSN", "JacobiSN"})

     

    ©_®

    Pendulum

    Cantilever

    Independent variable

    Time t

    Arclength s

    Dependent variable

    Angle of the pendulum with respect to direction of gravity `ϕ`(t)

    varphi(t)

    (1)

    The slope of the cantilever with respect to the unbend state `ϕ`(s)

    varphi(s)

    (2)

    Parameters

    • 

    Length l

    • 

    Gravitational constant g 

    • 

    Length L

    • 

    A force F at the free end

    • 

    A bending moment M at the free end

    • 

    The bending stiffness EI 

    ODE

    diff(varphi(t), t, t)+C*sin(varphi(t)) = 0

    diff(diff(varphi(t), t), t)+C*sin(varphi(t)) = 0

    (3)

    (for derivation see for example Wikipedia [1] or Lawden [2])

    diff(varphi(s), s, s)+C*cos(varphi(s)) = 0

    diff(diff(varphi(s), s), s)+C*cos(varphi(s)) = 0

    (4)

    (for derivation see for example Bisshopp [3] or Beléndez [4])

    Definitions

    `ϕ`(0) = 0, `ϕ`((1/4)*T) = `ϕ__0`

    varphi(0) = 0, varphi((1/4)*T) = varphi__0

    (5)

    `ϕ`(t)is periodic with the oscillation period T (i.e., the movement is bounded):

    0 < abs(`&varphi;__0`) and abs(`&varphi;__0`) < Pi

    0 < abs(varphi__0) and abs(varphi__0) < Pi

    (6)

    `&varphi;`(L) = `&varphi;__0`, Eval(diff(varphi(s), s), s = L) = 1/rho

    varphi(L) = varphi__0, Eval(diff(varphi(s), s), s = L) = 1/rho

    (7)

    For a downward force:

    0 < `&varphi;__0` and `&varphi;__0` < (1/2)*Pi

    0 < varphi__0 and varphi__0 < (1/2)*Pi

    (8)

    Parameter C

    "C=omega^(2)", where omegais the angular frequency of the pendulum for small anglular excursions

    C = g/l

    C = g/l

    (9)

    "Specific" Load

    C = F/EI

    C = F/EI

    (10)

    Initial/

    boundary
    conditions

    Eval(varphi(t), t = -(1/4)*T) = -`&varphi;__0`, Eval(diff(varphi(t), t), t = -(1/4)*T) = 0

    Eval(varphi(t), t = -(1/4)*T) = -varphi__0, Eval(diff(varphi(t), t), t = -(1/4)*T) = 0

    (11)

    Eval(varphi(s), s = 0) = 0, varphi(L) = varphi__0, Eval(diff(varphi(s), s), s = L) = 1/rho

    Eval(varphi(s), s = 0) = 0, varphi(L) = varphi__0, Eval(diff(varphi(s), s), s = L) = 1/rho

    (12)

    Only the second condition is essential.
    Additional essential condition: The length L of the cantilever beam is constant (not a boundary condition in its common sense but essential for the solution).

    #1 integration step
    with the second condition

    Method: Integration with an integration factor (and converting to D notation, not shown)

    DEtools:-intfactor(diff(diff(varphi(t), t), t)+C*sin(varphi(t)) = 0, `&varphi;`(t)); DETools:-firint((diff(diff(varphi(t), t), t)+C*sin(varphi(t)) = 0)*%, `&varphi;`(t))

    -2*C*cos(varphi(t))+(diff(varphi(t), t))^2+c__1 = 0

    (13)

    Substituting initial conditions (11)

    eval(convert(-2*C*cos(varphi(t))+(diff(varphi(t), t))^2+c__1 = 0, D), t = -(1/4)*T); convert(value({Eval(diff(varphi(t), t), t = -(1/4)*T) = 0, Eval(varphi(t), t = -(1/4)*T) = -varphi__0}), D); isolate(eval(`%%`, %), c__1)

    c__1 = 2*C*cos(varphi__0)

    (14)

    and isolating diff(`&varphi;`(t), t)in (13) yields

    convert(isolate(subs(c__1 = 2*C*cos(varphi__0), -2*C*cos(varphi(t))+(diff(varphi(t), t))^2+c__1 = 0), diff(`&varphi;`(t), t)), radical)

    diff(varphi(t), t) = (2*C*cos(varphi(t))-2*C*cos(varphi__0))^(1/2)

    (15)

    Alternative method [5]: Integration to an implicit representation

    dsolve({(Eval(varphi(s), s = 0) = 0, varphi(L) = varphi__0, Eval(diff(varphi(s), s), s = L) = 1/rho)[3], diff(diff(varphi(s), s), s)+C*cos(varphi(s)) = 0}, `&varphi;`(s), implicit)[1]

    Int(1/(-2*C*sin(_a)+(2*C*sin(varphi(L))*rho^2+1)/rho^2)^(1/2), _a = 0 .. varphi(s))-s-c__2 = 0

    (16)

    and differentiation w.r.t. to s 

    diff(Int(1/(-2*C*sin(_a)+(2*C*sin(varphi(L))*rho^2+1)/rho^2)^(1/2), _a = 0 .. varphi(s))-s-c__2 = 0, s); isolate(%, diff(`&varphi;`(s), s)); expand(subs(varphi(L) = varphi__0, Eval(diff(varphi(s), s), s = L) = 1/rho, %))

    diff(varphi(s), s) = (-2*C*sin(varphi(s))+2*C*sin(varphi__0)+1/rho^2)^(1/2)

    (17)

    (This method works only if rho <> infinity; i.e., only with curvature/bending moment at the free end.)

    Continuing now without bending momenteval(diff(varphi(s), s) = (-2*C*sin(varphi(s))+2*C*sin(varphi__0)+1/rho^2)^(1/2), rho = infinity)

    diff(varphi(s), s) = (-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2)

    (18)

    #2 integrating the inverse function

    With the chain rule

    (diff(`&varphi;`(t), t))*(diff(t(`&varphi;`), `&varphi;`)) = 1

    (diff(varphi(t), t))*(diff(t(varphi), varphi)) = 1

    (19)

    isolate((diff(varphi(t), t))*(diff(t(varphi), varphi)) = 1, diff(`&varphi;`(t), t))

    diff(varphi(t), t) = 1/(diff(t(varphi), varphi))

    (20)

    (15) can be written as

    isolate((diff(varphi(t), t) = 1/(diff(t(varphi), varphi)))*(1/(diff(varphi(t), t) = (2*C*cos(varphi(t))-2*C*cos(varphi__0))^(1/2))), diff(t(`&varphi;`), `&varphi;`)); subs(`&varphi;`(t) = `&varphi;`, %)

    diff(t(varphi), varphi) = 1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2)

    (21)

    where the functional notation `&varphi;`(t)was removed for integration

    map(Int, diff(t(varphi), varphi) = 1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), `&varphi;` = 0 .. `&varphi;`(t), continuous); (`@`(value, lhs) = rhs)(%)

    -t(0)+t(varphi(t)) = Int(1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), varphi = 0 .. varphi(t), continuous)

    (22)

    This relation allows to determine the time t = t(`&varphi;`(t)) the pendulum takes to swing to a certain angle `&varphi;` = `&varphi;`*t__.

    Similarly, with

    (diff(`&varphi;`(s), s))*(diff(s(`&varphi;`), `&varphi;`)) = 1

    (diff(varphi(s), s))*(diff(s(varphi), varphi)) = 1

    (23)

    isolate((diff(varphi(s), s))*(diff(s(varphi), varphi)) = 1, diff(`&varphi;`(s), s))

    diff(varphi(s), s) = 1/(diff(s(varphi), varphi))

    (24)

    (16) can be written as

    isolate((diff(varphi(s), s) = 1/(diff(s(varphi), varphi)))*(1/(diff(varphi(s), s) = (-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2))), diff(s(`&varphi;`), `&varphi;`))

    diff(s(varphi), varphi) = 1/(-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2)

    (25)

    and integrated over s

    map(int, diff(s(varphi), varphi) = 1/(-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2), `&varphi;` = 0 .. `&varphi;__s`, continuous)

    -s(0)+s(varphi__s) = int(1/(-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous)

    (26)

    This expression relates the arclength s to the slope `&varphi;__s` at the location s (i.e., `&varphi;`(s) = `&varphi;__s`). It is the inverse of what we intend to solve (i.e., `&varphi;` = `&varphi;`(s)) but it is essential to derive a solution. Unlike for the pendulum, an indexed symbol `#msub(mi("&varphi;",fontstyle = "normal"),mi("s"))`has been chosen to avoid formally correct but uncommon expressions like "t(`&varphi;`(t))."

    Special cases

    Oscillation period T

    When `&varphi;`*t__ = `&varphi;__0` the pendulum has swung a quater of the period. With
    t(0) = 0, `&varphi;`(t) = `&varphi;__0`, t(`&varphi;__0`) = (1/4)*T

    t(0) = 0, varphi(t) = varphi__0, t(varphi__0) = (1/4)*T

    (27)

    (22) becomes

    subs(t(0) = 0, varphi(t) = varphi__0, t(varphi__0) = (1/4)*T, -t(0)+t(varphi(t)) = Int(1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), varphi = 0 .. varphi(t), continuous))

    (1/4)*T = Int(1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), varphi = 0 .. varphi__0, continuous)

    (28)

    where `&varphi;`(t)was replaced in the integrant by `&varphi;` to create input that can be processes by the int command. After evaluation

    isolate(`assuming`([simplify(value((1/4)*T = Int(1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), varphi = 0 .. varphi__0, continuous)))], [C > 0, 0 < `&varphi;__0` and `&varphi;__0` < Pi]), T)

    T = 4*2^(1/2)*InverseJacobiAM((1/2)*varphi__0, 2^(1/2)/(1-cos(varphi__0))^(1/2))/(C^(1/2)*(1-cos(varphi__0))^(1/2))

    (29)

    where 1/am = InverseJacobiAM denotes the inverse Jacobian amplitude function.

    Expression for `&varphi;__0`
    Calculation of the length L in order to get an expression to determine the unknown slope `&varphi;__0` at the free end of the cantilever as a function of the load parameter C. With
    s(0) = 0, s(`&varphi;__s`) = L, `&varphi;__s` = `&varphi;__0`, `&varphi;`(s) = `&varphi;`

    s(0) = 0, s(varphi__s) = L, varphi__s = varphi__0, varphi(s) = varphi

    (30)

    (26) becomessubs(s(0) = 0, s(varphi__s) = L, varphi__s = varphi__0, varphi(s) = varphi, -s(0)+s(varphi__s) = int(1/(-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous))

    L = int(1/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__0, continuous)

    (31)

    where `&varphi;`(s)is replaced by `&varphi;` to create input that can be processes by the int command. After evaluation

    `assuming`([value(L = int(1/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__0, continuous))], [C > 0, 0 < `&varphi;__0` and `&varphi;__0` < (1/2)*Pi])

    L = EllipticK((1/2)*(2*sin(varphi__0)+2)^(1/2))/C^(1/2)-EllipticF(1/(sin(varphi__0)+1)^(1/2), (1/2)*(2*sin(varphi__0)+2)^(1/2))/C^(1/2)

    (32)

    where K = EllipticK and F = EllipticF denote the complete and incomplete elliptic integrals of the first kind.

    #3 Solutions of particular interest  

    Explicit solution for `&varphi;`(t) in bounded motion.
    Rearranging (22)

    `assuming`([simplify(2*C*(-t(0)+t(varphi(t)) = Int(1/(2*C*cos(varphi)-2*C*cos(varphi__0))^(1/2), varphi = 0 .. varphi(t), continuous)))], [C > 0])/(sqrt(C)*sqrt(2))

    -C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = Int(1/(cos(varphi)-cos(varphi__0))^(1/2), varphi = 0 .. varphi(t), continuous)

    (33)

    and substituting this essential identity (expression 5.1.3 from Lawden [2])

    -cos(`&varphi;__0`)+cos(`&varphi;`) = 2*sin((1/2)*`&varphi;__0`)^2-2*sin((1/2)*`&varphi;`)^2

    cos(varphi)-cos(varphi__0) = 2*sin((1/2)*varphi__0)^2-2*sin((1/2)*varphi)^2

    (34)

    yields

    subs(cos(varphi)-cos(varphi__0) = 2*sin((1/2)*varphi__0)^2-2*sin((1/2)*varphi)^2, -C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = Int(1/(cos(varphi)-cos(varphi__0))^(1/2), varphi = 0 .. varphi(t), continuous))

    -C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = Int(1/(2*sin((1/2)*varphi__0)^2-2*sin((1/2)*varphi)^2)^(1/2), varphi = 0 .. varphi(t), continuous)

    (35)

    `assuming`([value(-C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = Int(1/(2*sin((1/2)*varphi__0)^2-2*sin((1/2)*varphi)^2)^(1/2), varphi = 0 .. varphi(t), continuous))], [0 < `&varphi;__0` and `&varphi;__0` < Pi])

    -C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = 2^(1/2)*InverseJacobiAM((1/2)*varphi(t), csc((1/2)*varphi__0))/sin((1/2)*varphi__0)

    (36)

    which simplifies further with

    t(0) = 0, t(`&varphi;`(t)) = t

    t(0) = 0, t(varphi(t)) = t

    (37)

    to

    subs(t(0) = 0, t(varphi(t)) = t, ((-C^(1/2)*2^(1/2)*(t(0)-t(varphi(t))) = 2^(1/2)*InverseJacobiAM((1/2)*varphi(t), csc((1/2)*varphi__0))/sin((1/2)*varphi__0))*(1/sqrt(2)))*sin((1/2)*`&varphi;__0`))

    sin((1/2)*varphi__0)*C^(1/2)*t = InverseJacobiAM((1/2)*varphi(t), csc((1/2)*varphi__0))

    (38)

    Mapping now sn = JacobiSN with the modulus csc((1/2)*`&varphi;__0`) to the expression above (Maple converts InverseJacobiAM to InverseJacobiSN and simplifies automatically)

    map(JacobiSN, sin((1/2)*varphi__0)*C^(1/2)*t = InverseJacobiAM((1/2)*varphi(t), csc((1/2)*varphi__0)), csc((1/2)*`&varphi;__0`))

    JacobiSN(sin((1/2)*varphi__0)*C^(1/2)*t, csc((1/2)*varphi__0)) = sin((1/2)*varphi(t))

    (39)

    the angle `&varphi;`as a function of time is obtained explicitly

    convert(isolate(JacobiSN(sin((1/2)*varphi__0)*C^(1/2)*t, csc((1/2)*varphi__0)) = sin((1/2)*varphi(t)), `&varphi;`(t)), sincos)

    varphi(t) = 2*arcsin(JacobiSN(sin((1/2)*varphi__0)*C^(1/2)*t, 1/sin((1/2)*varphi__0)))

    (40)

    Bending curve of the cantilever for a given load (i.e., for a given `&varphi;__0`, obtainable from (32)).

    To obtain a parametric form x(p), y(p)of the bending curve, the following two ODEs have to be integrated

    diff(x(s), s) = cos(`&varphi;`(s)), diff(y(s), s) = sin(`&varphi;`(s))

    diff(x(s), s) = cos(varphi(s)), diff(y(s), s) = sin(varphi(s))

    (41)

    Applying

    diff(x(s), s) = (diff(x(`&varphi;`), `&varphi;`))*(diff(`&varphi;`(s), s)), diff(y(s), s) = (diff(y(`&varphi;`), `&varphi;`))*(diff(`&varphi;`(s), s))

    diff(x(s), s) = (diff(x(varphi), varphi))*(diff(varphi(s), s)), diff(y(s), s) = (diff(y(varphi), varphi))*(diff(varphi(s), s))

    (42)

    in the following way to (41)

    subs({diff(x(s), s) = (diff(x(varphi), varphi))*(diff(varphi(s), s)), diff(y(s), s) = (diff(y(varphi), varphi))*(diff(varphi(s), s))}, diff(varphi(s), s) = 1/(diff(s(varphi), varphi)), {diff(x(s), s) = cos(varphi(s)), diff(y(s), s) = sin(varphi(s))})[]

    (diff(x(varphi), varphi))/(diff(s(varphi), varphi)) = cos(varphi(s)), (diff(y(varphi), varphi))/(diff(s(varphi), varphi)) = sin(varphi(s))

    (43)

    isolate(((diff(x(varphi), varphi))/(diff(s(varphi), varphi)) = cos(varphi(s)), (diff(y(varphi), varphi))/(diff(s(varphi), varphi)) = sin(varphi(s)))[1], diff(x(`&varphi;`), `&varphi;`)), isolate(((diff(x(varphi), varphi))/(diff(s(varphi), varphi)) = cos(varphi(s)), (diff(y(varphi), varphi))/(diff(s(varphi), varphi)) = sin(varphi(s)))[2], diff(y(`&varphi;`), `&varphi;`))

    diff(x(varphi), varphi) = cos(varphi(s))*(diff(s(varphi), varphi)), diff(y(varphi), varphi) = sin(varphi(s))*(diff(s(varphi), varphi))

    (44)

    yields two ODEs where x and y depend on the variable `&varphi;`(s). Substituting (25) and `&varphi;`(s) = `&varphi;` 

    subs(diff(s(varphi), varphi) = 1/(-2*C*sin(varphi(s))+2*C*sin(varphi__0))^(1/2), `&varphi;`(s) = `&varphi;`, [diff(x(varphi), varphi) = cos(varphi(s))*(diff(s(varphi), varphi)), diff(y(varphi), varphi) = sin(varphi(s))*(diff(s(varphi), varphi))])[]

    diff(x(varphi), varphi) = cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), diff(y(varphi), varphi) = sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2)

    (45)

    map(Int, (diff(x(varphi), varphi) = cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), diff(y(varphi), varphi) = sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2))[1], `&varphi;` = 0 .. `&varphi;__s`, continuous), map(Int, (diff(x(varphi), varphi) = cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), diff(y(varphi), varphi) = sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2))[2], `&varphi;` = 0 .. `&varphi;__s`, continuous)

    Int(diff(x(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous), Int(diff(y(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous)

    (46)

    results in a parametric solution with parameter `#mrow(mi("p"),mo("&equals;"),mi("\`&varphi;__s\`"))` where "0<= `&varphi;__s`<=`&varphi;__0`." 
    For the x coordinate

    subs(`assuming`([x(0) = 0, simplify(value((Int(diff(x(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous), Int(diff(y(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous))[1]))], [0 < `&varphi;` and `&varphi;` < (1/2)*Pi, C > 0]))

    x(varphi__s) = (2^(1/2)*sin(varphi__0)^(1/2)-(-2*sin(varphi__s)+2*sin(varphi__0))^(1/2))/C^(1/2)

    (47)

    For the y coordinate a long expression with the following structure

    subs(`assuming`([y(0) = 0, simplify(value((Int(diff(x(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous), Int(diff(y(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous))[2]), radical)], [0 < `&varphi;` and `&varphi;` < (1/2)*Pi, 0 < `&varphi;__0` and `&varphi;__0` < (1/2)*Pi, 0 < `&varphi;__s` and `&varphi;__s` < (1/2)*Pi, C > 0])); y(`&varphi;__s`) = (A__1*EllipticE(z__1, k)+A__2*EllipticF(z__1, k)+A__3*EllipticE(z__2, k)+A__4*EllipticF(z__2, k))/sqrt(C)

    y(varphi__s) = (A__1*EllipticE(z__1, k)+A__2*EllipticF(z__1, k)+A__3*EllipticE(z__2, k)+A__4*EllipticF(z__2, k))/C^(1/2)

    (48)

    is obtained where A__i = A__i(`&varphi;__s`, `&varphi;__0`), z__i = z__i(`&varphi;__s`, `&varphi;__0`) and k = k(`&varphi;__0`).

    NULL

    Not required in the above: To derive an explicit solution, Lawden performed a change of variable of this kind

    sin((1/2)*`&varphi;`) = sin((1/2)*`&varphi;__0`)*sin(u)

    sin((1/2)*varphi) = sin((1/2)*varphi__0)*sin(u)

    (49)

     

    which is not needed with Maple commands.

     

    Furthermore: Formally, it would have been nice to have the pendulum start its movement at t=0 at an angle -`&varphi;__0`. However, this leads to an output in (36) with two inverse elliptic functions where `&varphi;`(t) is difficult if not impossible to isolate.

     

    Solution for the free end of the cantilever (i.e., `&varphi;__s` = `&varphi;__0`and s = L)

    subs(x(0) = 0, `&varphi;__s` = `&varphi;__0`, x(`&varphi;__0`) = x(L), x(varphi__s) = (2^(1/2)*sin(varphi__0)^(1/2)-(-2*sin(varphi__s)+2*sin(varphi__0))^(1/2))/C^(1/2))

    x(L) = 2^(1/2)*sin(varphi__0)^(1/2)/C^(1/2)

    (50)

    subs(`assuming`([y(0) = 0, y(`&varphi;__0`) = y(L), simplify(value(subs(`&varphi;__s` = `&varphi;__0`, (Int(diff(x(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(cos(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous), Int(diff(y(varphi), varphi), varphi = 0 .. varphi__s, continuous) = Int(sin(varphi)/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__s, continuous))[2])))], [0 < `&varphi;` and `&varphi;` < (1/2)*Pi, 0 < `&varphi;__0` and `&varphi;__0` < (1/2)*Pi, 0 < `&varphi;__s` and `&varphi;__s` < (1/2)*Pi, C > 0]))

    y(L) = (EllipticK((1/2)*(2*sin(varphi__0)+2)^(1/2))-EllipticF(1/(sin(varphi__0)+1)^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2))-2*EllipticE((1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2))+2*EllipticE(1/(sin(varphi__0)+1)^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2)))/C^(1/2)

    (51)

    ``

    Some remarks

    NULL

    NULL

     

    Comparison to the solution from Lawden

    Expression (39) compared to sin((1/2)*theta(t)) = sin((1/2)*alpha)*sn(t+K, sin((1/2)*alpha))

    sin((1/2)*theta(t)) = sin((1/2)*alpha)*sn(t+K, sin((1/2)*alpha))

    (52)

    (pasted from DLMF 22.19.2 for the case C = 1). The same with adapted variables  subs(alpha = `&varphi;__0`, sn = JacobiSN, K = 0, theta(t) = `&varphi;__t`, sin((1/2)*theta(t)) = sin((1/2)*alpha)*sn(t+K, sin((1/2)*alpha)))

    sin((1/2)*varphi__t) = sin((1/2)*varphi__0)*JacobiSN(t, sin((1/2)*varphi__0))

    (53)

    Now equating the left hand side of (39) to JacobiSN(z, k)and identifying the parameters z and k

    subs(C = 1, lhs(JacobiSN(sin((1/2)*varphi__0)*C^(1/2)*t, csc((1/2)*varphi__0)) = sin((1/2)*varphi(t)))) = JacobiSN(z, k)

    JacobiSN(sin((1/2)*varphi__0)*t, csc((1/2)*varphi__0)) = JacobiSN(z, k)

    (54)

    map(op, JacobiSN(sin((1/2)*varphi__0)*t, csc((1/2)*varphi__0)) = JacobiSN(z, k)); solve([(rhs-lhs)(%)], {k, z})[]

    k = csc((1/2)*varphi__0), z = sin((1/2)*varphi__0)*t

    (55)

    Using the following identity from Maple's FunctionAdvisor and the correspondence in (55)

    FunctionAdvisor(identities, JacobiSN(z, 1/k))[5]

    JacobiSN(z, k) = JacobiSN(z*k, 1/k)/k

    (56)

    yields

    convert(subs(k = csc((1/2)*varphi__0), z = sin((1/2)*varphi__0)*t, JacobiSN(z, k) = JacobiSN(z*k, 1/k)/k), sincos)

    JacobiSN(sin((1/2)*varphi__0)*t, 1/sin((1/2)*varphi__0)) = sin((1/2)*varphi__0)*JacobiSN(t, sin((1/2)*varphi__0))

    (57)

    Comparing this with (53) confirms that (40) is correct.

    Equivalent expressions to determine `&varphi;__0` 

    As returned by value:

    normal(L = EllipticK((1/2)*(2*sin(varphi__0)+2)^(1/2))/C^(1/2)-EllipticF(1/(sin(varphi__0)+1)^(1/2), (1/2)*(2*sin(varphi__0)+2)^(1/2))/C^(1/2))

    L = (EllipticK((1/2)*(2*sin(varphi__0)+2)^(1/2))-EllipticF(1/(sin(varphi__0)+1)^(1/2), (1/2)*(2*sin(varphi__0)+2)^(1/2)))/C^(1/2)

    (58)

    simplify instead of value:

    convert(`assuming`([simplify(L = int(1/(-2*C*sin(varphi)+2*C*sin(varphi__0))^(1/2), varphi = 0 .. varphi__0, continuous))], [0 < `&varphi;__0` and `&varphi;__0` < (1/2)*Pi]), sincos)

    L = -I*2^(1/2)*EllipticF(I*sin(varphi__0)^(1/2)/(1-sin(varphi__0))^(1/2), I*(1-sin(varphi__0))^(1/2)/(sin(varphi__0)+1)^(1/2))/(C^(1/2)*(sin(varphi__0)+1)^(1/2))

    (59)

    With integration tools and change of variables using x = sin(`&varphi;`):

    Int(1/sqrt(-2*C*sin(`&varphi;`)+2*C*sin(`&varphi;__0`)), `&varphi;` = 0 .. `&varphi;__0`); L = IntegrationTools:-Change(%, x = sin(`&varphi;`), x); simplify(subs(isolate(x__0 = sin(`&varphi;__0`), `&varphi;__0`), %)); subs(x__0 = sin(`&varphi;__0`), `assuming`([value(%)], [0 < x and x < 1, 0 < x__0 and x__0 < 1]))

    L = 2^(1/2)*EllipticF(sin(varphi__0)^(1/2)/(sin(varphi__0)+1)^(1/2), I*(-sin(varphi__0)^2+1)^(1/2)/(-1+sin(varphi__0)))/(C^(1/2)*(1-sin(varphi__0))^(1/2))

    (60)

    Without having a Maple way: Christian Wolinski has provided 3 additional expressions where one is of particular simplicity [6]

      L = EllipticF(sqrt(1-1/(sin(`&varphi;__0`)+1))*sqrt(2), (1/2)*sqrt(2)*sqrt(sin(`&varphi;__0`)+1))/sqrt(C)

    L = EllipticF((1-1/(sin(varphi__0)+1))^(1/2)*2^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2))/C^(1/2)

    (61)

     

     

    Useful identities

    FunctionAdvisor(identities, InverseJacobiSN)[3]

    InverseJacobiSN(z, k) = InverseJacobiAM(arcsin(z), k)

    (62)

    InverseJacobiSN(z, k) = InverseJacobiAM(arcsin(z), k)

    InverseJacobiSN(z, k) = EllipticF(z, k)

    (63)

    FunctionAdvisor(identities, InverseJacobiSN)[1]

    JacobiSN(InverseJacobiSN(z, k), k) = z

    (64)

    FunctionAdvisor(identities, JacobiSN)[5]

    JacobiSN(z, 1/k) = k*JacobiSN(z/k, k)

    (65)

     

    Explicit solution for `&varphi;__0`

    Since Maple's solve does not solve (32) for `&varphi;__0`, one could try to isolate `&varphi;__0` in expression (32) by combining "somehow" the two elliptic expression into a single expression and to apply an inverse operation to it.

    Maple's simplify or combine do not seem to be able to help in this respect. There might be addition theorems that could be applied but identifying them in Maple or in DLMF requires expertise in this field of special functions.

    Easier is to try to evaluate (31) in different ways (see above) and hope for success. This yielded equivalent expressions with only one elliptic integral EllipticF.

    Using identities such elliptic integrals can be converted to inverse elliptic functions where elliptic functions can be applied to. Trying this exemplarily for (61)  

     

    L/sqrt(C) = InverseJacobiSN(sqrt(1-1/(sin(`&varphi;__0`)+1))*sqrt(2), (1/2)*sqrt(2)*sqrt(sin(`&varphi;__0`)+1))

    L/C^(1/2) = InverseJacobiSN((1-1/(sin(varphi__0)+1))^(1/2)*2^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2))

    (66)

    map(JacobiSN, L/C^(1/2) = InverseJacobiSN((1-1/(sin(varphi__0)+1))^(1/2)*2^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2)), (1/2)*sqrt(2)*sqrt(sin(`&varphi;__0`)+1))

    JacobiSN(L/C^(1/2), (1/2)*2^(1/2)*(sin(varphi__0)+1)^(1/2)) = (1-1/(sin(varphi__0)+1))^(1/2)*2^(1/2)

    (67)

    does not isolate `&varphi;__0`in the same way `&varphi;`(t)could be separated for the pendulum. The reason why such attempts are deemed to fail is simple. Differently to the pendulum, `#msub(mi("&varphi;",fontstyle = "normal"),mi("0"))` is not a constant "input" to the system but, causally speaking, an "output". While C in the case of the pendulum is constant and independent of `&varphi;__0`, C and `&varphi;__0`functionally depend on each other for the cantilever; i.e., `&varphi;__0` = `&varphi;__0`(C). This fundamentally makes the two cases different although many derivation steps are similar.

    Student:-ODEs

    Student:-ODEs:-ODESteps(diff(diff(varphi(t), t), t)+C*sin(varphi(t)) = 0)

    Error, (in Student:-ODEs:-OdeSolveOrder2) ODE is not supported

     

    Student:-ODEs:-ODESteps(diff(diff(varphi(s), s), s)+C*cos(varphi(s)) = 0)gives a solution for `&varphi;` = `&varphi;`(s)with two integration constants C1 and C2, but determining the integration constants with the first two boundary conditions of (12) is probably impossible. odetest confirms that the solution is correct but one of the arguments of an elliptic function is not unitfree (which raises more questions): JacobiSN((1/2)*sqrt(2*C-2*C1)*(-s+C2), sqrt(-(C1+C)/(-C1+C))).

    Links

    https://www.mapleprimes.com/questions/232863-Testing-Maples-Solution-Of-The-Nonlinear

    https://www.mapleprimes.com/questions/131520-Animation-Of-A-Simple-Pendulum

     

    Applying a horizontal load instead of a vertical bends the cantilever in an arc-like fashion. For this load case the corresponding ODE is that of the pendulum (see [2], chapter 5, exercise 8). The parametric equation (bending curve) of the arc becomes simpler but still no explicit solution `&varphi;__0` = `&varphi;__0`(C)seems possible.

    Alternative symbols for 4

    θ

    phi, theta

    References

    [1] https://en.wikipedia.org/wiki/Pendulum_(mechanics)
    [2] Lawden, Derek F. “Elliptic Functions and Applications.” Acta Applicandae Mathematica 24 (1989): 201-202.
    [3] Bisshopp, K.E. and Drucker, D.C. (1945) Large Deflection of Cantilever Beams. Quarterly of Applied Mathematics, 3, 272-275.
    [4] BELÉNDEZ, Tarsicio; NEIPP, Cristian; BELÉNDEZ, Augusto. "Large and small deflections of a cantilever beam". European Journal of Physics. Vol. 23, No. 3 (May 2002). ISSN 0143-0807, pp. 371-379
    [5] Rouben Rostamian, https://www.mapleprimes.com/questions/236511-How-To-Integrate-This-Ode-And-How-To#answer295192
    [6] Christian Wolinski, https://www.mapleprimes.com/questions/233304-How-To-Find-The-Inverse-Function-Of#comment283638

     

     

    Download Cantilever_and_pendulum_side_by_side_-_input_hidden.mw

    Disability Pride Month happens every July to celebrate people with disabilities, combat the stigma surrounding disability, and to fight to create a world that is accessible to everyone. Celebrating disability pride isn’t necessarily about being happy about the additional difficulties caused by being disabled in an ableist society: as disabled blogger Ardra Shephard puts it, “Being proud to be disabled isn’t about liking my disability… [It] is a rejection of the notion that I should feel ashamed of my body or my disability. It’s a rejection of the idea that I am less able to contribute and participate in the world, that I take more than I give, that I have less inherent value and potential than the able-bodied Becky next to me.” The celebration started in the US to commemorate the passing of the Americans with Disabilities Act, which prohibits discrimination based on disability, and since then it has spread around the world.

    An image of the disability pride flag. The caption reads, 'The disability pride flag, redesigned in 2021 by Ann Magill to be safe for those with visually triggered disabilities.'

    So what does any of this have to do with us here in the math community? Well, while it’s easy to think of mathematics as an objective field of study that contains no barriers, the institutions and tools used to teach math are not always so friendly. For an obvious example, if there's a few steps leading up to your math classroom and you use a wheelchair, that's going to be a challenge. And that's just scratching the surface—there are countless ways to be disabled, many of which are invisible, and many of which make a typical classroom environment very challenging to learn in for a variety of different reasons. As well, it can be difficult for prospective mathematicians to ask for accommodations, because of both the stigma against disability and the systemic barriers to receiving the proper accommodations. Just ask Daniel Reinholz, a disabled math professor at San Diego State University, whose health forced them to drop out of several engineering courses during their undergraduate degree: “Throughout it all, I never had a notion that I could receive accommodation or support, or that I deserved it. (Even though I’ve never really fit into the “right” category of disabled to be accommodated, so who knows what difference it really would have made.)” While Daniel was lucky enough to find a path to mathematics that worked for them, not all disabled people currently have that path available to them. As math professor Allison Miller puts it in her AMS blog post about disability in math, “Success in mathematics should not depend on whether someone’s needs happen to mesh sufficiently well with institutional structures and spaces that have been designed to serve only certain kinds of minds and bodies.”

    While we can’t make systemic changes on our own, we here at Maplesoft can still do our part to make tools for math that are something everyone can use and enjoy. As such, we’re excited to share that Maple Learn is now compatible with the screen reader NVDA. By using this screen reader, and with our extensive keyboard shortcuts that negate the need for a mouse, individuals with low or no vision can now use Maple Learn to help them explore mathematics. All you need to do is select “Enable Accessibility” from the hamburger menu, and you’ll be ready to go! Maple Learn also includes the colour palette CVD, which is designed to be accessible to colourblind users. To learn how to access the colour palettes, check out this How-To document.

    A screenshot of Maple Learn's hamburger menu, which is found in the top lefthand corner. The last item on the list reads 'Enable Accessibility', and is circled in red.


    There is still more work for us to be done to ensure that we’re doing our part to make math accessible to everyone. Not only are there still ways in which we’re working to improve the accessibility of our products, but we all as a math community need to strive towards recognizing the barriers we may have previously overlooked and finding ways to provide accommodation for all mathematicians. One organization, called Sines of Disability, is already working towards that very goal. They are a community of disabled mathematicians dedicated to dismantling the systemic ableism present in mathematics. For this Disability Pride Month, consider taking the time to check out these resources and learn more about this issue.

    aRandStep2D := proc(X0, Y0, dx, dy)
      local X, Y, P, R;
      P := Array(1 .. 2);
      R := rand(1 .. 8)();
      if R = 1 then X := X0 - dx; Y := Y0 + dy; end if;
      if R = 2 then X := X0; Y := Y0 + dy; end if;
      if R = 3 then X := X0 + dx; Y := Y0 + dy; end if;
      if R = 4 then X := X0 - dx; Y := Y0; end if;
      if R = 5 then X := X0 + dx; Y := Y0; end if;
      if R = 6 then X := X0 - dx; Y := Y0 - dy; end if;
      if R = 7 then X := X0; Y := Y0 - dy; end if;
      if R = 8 then X := X0 + dx; Y := Y0 - dy; end if;
      P[1] := X; P[2] := Y;
      return P;
    end proc 

    SetStart := proc(b)
      local alpha, R, P;
      P := Array(1 .. 2);
      alpha := rand(1 .. b)();
      P[1] := alpha*b;
      P[2] := alpha*b;
      return P;
    end proc 

    RandomFactTpq := proc(N, pb, dx, dy)
      local alpha, X, Y, f, P, counter, B, n, T;
      P := Array(1 .. 2);
      counter := 0; f := 1;
      B := floor(evalf(sqrt(N))); #Set maximal searching steps
      T := floor(evalf(sqrt(N))); #For SetStart's use
      P := SetStart(T);
      X := P[1]; Y := P[2];
      while f = 1 and counter < B do  #loop
        n := pb - X - Y;
        f := gcd(N, n);
        if f > 1then break; end if;
        P := aRandStep2D(X, Y, dx, dy); #A random move
        X := P[1]; Y := P[2];
        if X < 1 or Y < 1 or N - pb - 1 < X or X <= Y then
          P := SetStart(T);       # Restart when out of borders
          X := P[1]; Y := P[2];
        end if;
        counter := counter + 1;    #Counting the searched steps
      end do;
      if  f>1  then print(Find at point (X, Y), found divisor = f, searching steps = counter);
      else print(This*time*finds*no*result, test*again!); end if;
    end proc


    wxbRandWalkTpqNew4.pdf

    Hi
    It's been years since expressions like A %* B %+ C involving inert arithmetic operators used in infix form are correctly understood (parsed) when written on a 1D-Math input line. The idea is simple: have the operators %. %*, %+, %-, %^, %/ work on input as infix operators the same way their active forms: ., *, +, -, ^, / do. This useful functionality, however, remained elusive when using 2D-Math input notation, so one would have to resort to using the functional form of the operators. E.g., input the above as `%+`(`%*`(A, B) ,C), which for me is really ugly. Besides being a bit demoralizing: we do all this fuzz about how great computer algebra and 2D-Math input notation is, and then input things in that way …

    So this is to mention that this elusive functionality of inert arithmetic operators used in infix form within a 2D-Math input line now works. The novelty is present in the latest Maplesoft Physics Updates for Maple 2023, which is version 1490. As usual, to install the Updates open a Maple worksheet and input Physics:-Version(latest).

    Here is an image (worksheet at the end) showing the new thing


    The implementation is pretty new; reports of anything related to these inert operators not displayed/working as you'd expect are much appreciated. 


    Download Inert_arithmetic_operators_in_2D_Math.mw

    Edgardo S. Cheb-Terrab
    Physics, Differential Equations and Mathematical Functions, Maplesoft

    Can’t seem to find the mistake in your math? Instead of painfully combing through each line, let the new “Check my work” operation in Maple Learn help! Now in Maple Learn, you can type out a solution to a variety of math problems, and let Maple Learn check your work! Additionally, by signing on to Maple Learn and the Maple Calculator app, you can take a photo of your handwritten math, import it into Maple Learn, and check your work with the click of a button.

    Whether you’re solving a system of linear equations or an algebra problem, computing an integral or a partial derivative, “Check my work” can help. Maple Learn will tell you which steps are “Ok” and which steps to double-check. If you get a step wrong, Maple Learn will point out which line has an error, then proceed to check whether the rest of your work followed the right procedure.

    Here’s an example of a solution to a system of linear equations written out by hand. All I had to do was snap a picture in the Maple Calculator app, and Maple Learn instantly had my equation set ready to go in the Cloud Expressions menu. Then, I just clicked “Check my work” in the Context Panel.

    Screenshot of a handwritten solution to a system with three linear equations and a screenshot of how the expressions appear in Maple Learn through the Cloud Expressions feature.

    Maple Learn identified that I was trying to solve a system with 3 equations, checked my steps, and concluded my solution set was correct.

    Screenshot of the feedback "Check my work" gives to the steps that correctly solve a system of three linear equations. "Ok" for correct steps, and a concluding message once completed.

    What happens if you make a mistake? Here’s an example of evaluating an improper integral with a u-substitution that involves a limit. This time, I directly typed my steps into Maple Learn and pressed “Check my work” in the Context Panel. Check my work recognized the substitution step and noted what step was incorrect; can’t forget to change the limits of integration! After pointing out where my mistake was, Maple Learn continued to evaluate the rest of my steps while taking my error into account. It confirmed that the rest of the process was correct, even though the answer wasn’t.

    Screenshot of incorrect steps in Maple Learn attempting to solve an improper integral. The error is highlighted with the feedback of "Check this step" from "Check my work"

    After making my change in Maple Learn and checking again, I’ve found the correct value.

    Screenshot of the corrected steps to solving the improper integral, with the positive feedback from Check my work indicating these steps are correct.

    Checking your work has never been easier with Maple Learn. Whether you want to type your solution directly in Maple Learn or import math with Maple Calculator, the new “Check my work” feature has you covered. Visit the how-to document for more examples using this new feature and let us know what you think!

     

    Maple introduced "Copy as LaTeX" a few versions ago and I have used this feature exensively when it suddenly stopped working.

    After som experiments I found the root cause and easy (but irritating) workaround for OSX

    Problem:

    "Copy as LaTeX" suddenly stops working ("Copy as MathML" still works fine)

    Cause:

    This problem appears if in “Display Setting”-tab in settings dialogue the “Input display” is set to “Maple Notation

    In that case all attempts on “Copy as LaTeX” will be a null-function and not move anything at all into the copy buffer.

    The “Copy as MathML” is not affected by this in the same way.

    I have confirmed this on OSX in Maple versions 2022, 2023, and 2024

    Workaround:

    Adjusting “Display Setting”-tab in settings dialogue so that the “Input display” is set to “2-D Math” and “Apply Globally” makes it work again.

    A bit annoying as a prefer the maple notation input and I cannot have this setting if I want the copy to latex to work.

    Note:

    in OSX this can also be fixed by removing the Maple preferences file and letting Maple restore it.

    ~/Library/Preferences/Maple/2023/Maple Preferences

    Edit: Added 2024 as affected version.

    Hi everyone,

    I'd like to draw your attention to a package we recently uploaded to the Maple Cloud, here. You can download the package from the linked Cloud page, or directly from here as a workbook file: NaturalLanguage.maple. I'll include a lightly edited version of the "cover sheet" that introduces the package below. I have left the first four sections folded closed - you can see those in the linked Maple Cloud page or the workbook - because I think the last section is the most interesting.
     

    Using natural language models in Maple


    This package explores using large language models such as ChatGPT for processing natural language in Maple. Let's load the package from source, save it in this workbook, and load it.

    restart

    read "this:///lib/NaturalLanguage.mpl"

    savelib('NaturalLanguage', "this://")

    with(NaturalLanguage)

    Warning, the NaturalLanguage package is an experimental package designed as an interface to publicly available large language models such as ChatGPT. Use of this package is entirely at the user's risk. Results may be inconsistent, misleading, or flat out incorrect. 

    [Explain, GetCommand, GetMath, Query, RawQuery]

    (1)

    We note there is a warning: we will see output of large language models, which will often include inaccurate statements. Please keep this in mind - this is not (yet?) technology that you want to use to build a bridge!

    We also note that there are five publically exposed commands. Let's look at them in turn.

    RawQuery

       

    Query

       

    GetMath

       

    GetCommand

       

    Explain

     
    • 

    The Explain command asks the given model to explain the item in the query. After an explanation, you can ask for more detail by issuing the command Explain(more), Explain("go on"), Explain(elaborate), Explain(further), Explain("continue"), or minor variations. The item you ask about can be a mathematical expression, equation, list of equations, or a string.

    • 

    The default model is GPT-4; you can select the other model by using the model = ChatGPT option, or forcing use of the GPT-4 model by using the model = GPT4 option. Note that OpenAI may deprecate and disable models, so the set of models supported may change in the future.

    display(Explain(x^2+y^2=1));display(Explain(x^2+y^2 = 1))

    This equation represents a circle with a radius of 1 centered at the origin (0,0) on a coordinate plane.

     

    display(Explain(more));display(Explain(more))

    The equation x^2 + y^2 = 1 represents a circle in a two-dimensional plane (specifically, a Cartesian plane).

    The center of the circle is at the origin of the coordinates (0,0) and its radius is 1. This is because any point (x, y) on the circle is a distance r (the radius) away from the center, and by the Pythagorean theorem, this distance is given by the square root of (x^2 + y^2). The fact that x^2 + y^2 = 1 implies that the radius r = sqrt(1) = 1.

    This fundamental equation is also the unit circle in trigonometry, where angles are measured in radians. The coordinates (x, y) represent the cosine and sine of the angle respectively. The unit circle is a crucial concept in trigonometry, complex number theory, and calculus. It simplifies many mathematical concepts and provides a geometric interpretation of a variety of phenomena in physical sciences and engineering.

     

    display(Explain(Re(exp(x*I + y*I)) = Re(exp(x*I)) * Re(exp(y*I)) - Im(exp(x*I)) * Im(exp(y*I))));display(Explain(Re(exp(I*x+I*y)) = Re(exp(I*x))*Re(exp(I*y))-Im(exp(I*x))*Im(exp(I*y))))

    The equation seems to be using Euler's formula, which states that e^(ix) = cos(x) + i*sin(x). The 'Re' refers to the real part of a complex number, and 'Im' refers to the imaginary part. So, if you put Euler's formula in there your equation is equivalent to cos(x + y) = cos(x)cos(y) - sin(x)sin(y), which is basically the well-known trigonometric formula for the cosine of a sum. In a nutshell, it's dealing with the trigonometric identities and properties of exponential functions with complex numbers.

     

    display(Explain("go on", model = ChatGPT));display(Explain("go on", model = ChatGPT))

    The given equation appears to be dealing with the real part of a complex exponential expression. Let's break it down step by step to understand its meaning:

    1. The equation involves the expression e^(i*x+i*y), where e represents Euler's number (~2.718), i is the imaginary unit (√(-1)), and x and y are real numbers.
    2. The expression e^(i*x+i*y) can be rewritten using Euler's formula: e^(i*x+i*y) = cos(x+y) + i*sin(x+y). This is a complex number in the form a + bi, where 'a' represents the real part (Re) and 'b' represents the imaginary part (Im).
    3. The real part of e^(i*x+i*y) is, therefore, Re(e^(i*x+i*y)) = cos(x+y).
    4. The right side of the equation consists of the product of two complex exponential expressions: Re(e^(i*x))*Re(e^(i*y))-Im(e^(i*x))*Im(e^(i*y)).
    5. The expression Re(e^(i*x)) represents the real part of e^(i*x), which is cos(x), and Im(e^(i*x)) represents the imaginary part of e^(i*x), which is sin(x).
    6. Similarly, Re(e^(i*y)) represents the real part of e^(i*y), which is cos(y), and Im(e^(i*y)) represents the imaginary part of e^(i*y), which is sin(y).
    7. Therefore, the right side becomes: (cos(x)*cos(y)) - (sin(x)*sin(y)).

    So, the equation Re(e^(i*x+i*y)) = Re(e^(i*x))*Re(e^(i*y))-Im(e^(i*x))*Im(e^(i*y)) essentially states that the real part of e^(i*x+i*y) (i.e., cos(x+y)) is equal to the real part of e^(i*x) (i.e., cos(x)) multiplied by the real part of e^(i*y) (i.e., cos(y)), minus the imaginary part of e^(i*x) (i.e., sin(x)) multiplied by the imaginary part of e^(i*y) (i.e., sin(y)).

    In simpler terms, the equation is connecting the real part of the sum of two complex exponential expressions with the product of the real parts and the difference of the imaginary parts of those individual expressions.

     

    display(Explain(Re(sigma) < 0));display(Explain(Re(sigma) < 0))

    The inequality "Re(sigma) < 0" is a statement in complex number theory. It is saying that the real part (Re) of a complex number sigma is less than zero. This means that the complex number is to the left of the imaginary axis in the complex number plane. This kind of inequality is often used in the study of complex functions, in areas such as control systems or signal processing in electrical engineering, and also in number theory and the study of dynamical systems in mathematics.

     

    display(Explain(continue));display(Explain(continue))

    The inequality "Re(sigma) < 0" is typically related to the field of complex numbers. Here, "Re" stands for the real part of a complex number and "sigma" is usually used to represent a complex number. So, "Re(sigma) < 0" is saying that the real part of the complex number sigma is negative.

    Complex numbers are usually written in the form a + bi, where a and b are real numbers and i is the imaginary unit. The "Re" in "Re(sigma)" refers to the a part of this form, i.e. the real part of the complex number.

    This inequality is often found in fields like control systems engineering or signal processing. For instance, in control systems, all the poles of a stable system must have a negative real part. Another context you might come across this inequality is in complex analysis, one might examine the region where the real part of a complex function is negative. So, the inequality "Re(sigma) < 0" expresses that a complex number is in the left half of the complex plane, which is often crucial for the stability of many systems in engineering.

     

    display(Explain("The Maple command simplify"));display(Explain("The Maple command simplify"))

    The Maple command "simplify" is used to simplify mathematical expressions. In Maple, this command applies various rules to reduce an equation or expression to its simplest or most compact form.

    For example, if you have an equation like `(x^3 - x^2)/x^2`, using the simplify command would reduce it to `x - 1`. It simplifies algebraic expressions, performs factorization, combines like terms, cancel out common factors, etc.

    The general syntax is `simplify(expr)`, where `expr` is the expression that you want to simplify. The simplified expression is returned as output.

    Please note that the simplifications made by this command are based on general rules and may not always give the expected results for some specific expressions due to the complexity of mathematical simplifications.

     

    display(Explain(continue, model=ChatGPT));display(Explain(continue, model = ChatGPT))

    The Maple command "simplify" is used to simplify mathematical expressions. It takes an expression as input and attempts to find a simplified form by applying various algebraic rules and simplification techniques.

    When you use the "simplify" command, Maple applies a series of simplification steps, which can include:

    1. Expanding and factoring polynomials: This step expands products of terms and factors out common terms.
    2. Simplifying fractions: The command simplifies fractions by canceling common factors in the numerator and denominator.
    3. Simplifying trigonometric expressions: Maple applies trigonometric identities to simplify expressions involving trigonometric functions.
    4. Simplifying logarithmic and exponential expressions: The command applies rules of logarithms and exponents to simplify expressions with these functions.
    5. Simplifying square roots and radicals: It simplifies square roots by expressing them in simplest radical form.
    6. Simplifying expressions involving absolute values: Maple simplifies absolute value expressions by considering different cases based on the sign of the argument.
    7. Applying mathematical identities and rules: The command uses various mathematical identities and rules to simplify expressions further.

    The "simplify" command in Maple is very powerful and can handle a wide range of mathematical expressions. However, it may not always produce the most simplified form, as simplification can sometimes be a subjective task. In such cases, you can try using other commands or options available in Maple to refine the simplification process.

    To use the "simplify" command in Maple, you can simply type "simplify(expression)" where "expression" represents the mathematical expression you want to simplify.

     

    display(Explain("Weight of a W10X54 beam?"))

    The weight of a W10X54 beam refers to the weight specification of a beam in the W Beam series, commonly used in construction and engineering projects. The nomenclature "W10X54" is decoded as follows:

    - W: it stands for 'wide flange', a type of structural steel beam where the flanges are parallel to each other.
    - 10: it indicates the nominal depth of the wide flange, which is about 10 inches.
    - 54: it indicates the weight of the beam per linear foot, which is about 54 pounds.

    So, a W10X54 beam weighs 54 pounds per foot.

     

    display(Explain(further))

    "Weight of a W10X54 beam" refers to the weight of a specific kind of structural steel beam used in construction and architecture. The "W" stands for "wide flange", which is a particular type of I-beam.

    The "10" means the nominal depth of the beam in inches (also known as its height when standing upright).

    The "54" represents the beam's weight per foot in pounds. In other words, for every foot of length the beam has, it weighs 54 pounds.

     So if you have a W10X54 beam that is 10 feet long, its total weight would be 540 pounds (10 feet times 54 pounds per foot).

    Please note that these are nominal dimensions and may not exactly match the true dimensions of the beam due to manufacturing variables.

     

    NULL

     

    What do you think? Will this be an important part of mathematical software in the near future, or are we still far away from that point? We'd love to hear your opinions.

    What was established in 1788 in Prussia, is derived from the Latin word for “someone who is going to leave”, and can be prepared for using the many capabilities of Maple Learn? Why, it’s the Abitur exam! The Abitur is a qualification obtained by German high school students that serves as both a graduation certificate and a college entrance exam. The exam covers a variety of topics, including, of course, mathematics.

    So how can students prepare for this exam? Well, like any exam, writing a previous year’s exam is always helpful. That’s exactly what Tom Rocks Math does in his latest video—although, with him being a math professor at Oxford University, I’d wager a guess that he’s not doing it as practice for taking the exam! Instead, with his video, you can follow along with how he tackles the problems, and see how the content of this particular exam differs from what is taught in other countries around the world.

    Oh, but what’s this? On question 1 of the geometry section, Tom comes across a problem that leaves him stumped. It happens to the best of us, even university professors writing high school level exams. So what’s the next step?  Well, you could use the strategy Tom uses, which is to turn to Maple Learn. With this Maple Learn document, you can see how Maple Learn allows you to easily add a visualization of the problem right next to your work, making the problem much easier to wrap your head around. What’s more, you don’t have to worry about any arithmetic errors throwing your whole solution off—Maple Learn can take care of that part for you, so you can focus on understanding the solution! And that’s just what Tom does. In his video, after he leaves his attempt at the problem behind, he turns to this document to go over the full solution, making it easy for the viewer (and any potential test-takers!) to understand where he went wrong and how to better approach problems like that in the future.

    A screenshot of a Maple Learn document, showing a 3D plot depicting the intersection of 2 spheres. A text box describes how the plot relates to the problem.

    So to all you Abitur takers out there—that’s just one problem that can be transformed with the power of Maple Learn. The next time you find yourself getting stuck on a practice problem, why not try your hand at using Maple Learn to solve it? After that, you’ll be able to fly through your next practice exam—and that’ll put you one step ahead of an Oxford math professor, so it’s a win all around!

    Maple's fsolve command can quickly solve expressions involving large floating point numbers where the (symbolic) solve command can take much longer attempting to solve the equivalent rational expression. For example, consider the following worksheet:

    restart;

    sys := {a + b^0.2784982189 = c+1, b + c^0.9575068354 = a+2, c + a^0.1576130817 = b+3};

    {a+b^.2784982189 = c+1, b+c^.9575068354 = a+2, c+a^.1576130817 = b+3}

    (1)

    fsolve_start:=time[real]():

    fsolve(sys);

    {a = 3.561242843, b = 1.994950678, c = 3.773320855}

    (2)

    fsolve_elapsed_seconds:= time[real]()-fsolve_start;

    0.50e-1

    (3)

    solve_start:=time[real]():

    ###warning, the following command may crash and/or execute indefinitely###

    solve(sys);

    solve_elapsed_hours:=(time[real]()-solve_start)/3600;


     

    Download solve-fsolve-primes.mw

    We have just released updates to Maple and MapleSim.

    Maple 2023.1 includes improvements to the math engine, Plot Builder, import/export, and moreWe recommend that all Maple 2023 users install this update.

    This update is available through Tools>Check for Updates in Maple, and is also available from the Maple 2023.1 download page, where you can find more details.

    In particular, please note that this update includes fixes to problems with Quantifier Elimination and Group  Theory, and improves performance after a period of inactivity, all of which were reported on MaplePrimes. Thanks for the feedback!

    At the same time, we have also released an update to MapleSim, which contains a variety of improvements to MapleSim and its add-ons. You can find more information on the MapleSim 2023.1 download page.

    Sometimes, it’s the little things. Those little improvements that make a good tool even better. Sometimes, it’s as simple as an easy shorthand notation that allows you to create and label points on a graph with a single command. Just to pick a totally random example.

     

    A screenshot of a Maple Learn document containing a math cell and a plot. The math cell reads 'A(1,2)'. The plot show a point plotted at (1,2) with the label 'A'.

    Okay, maybe it’s not totally random. Maybe this new point notation is one of our newest features in Maple Learn, and maybe it’s now easy and quick for you to create labeled points to your heart’s content. Maybe you could learn more about all the ins and outs of this new feature by checking out the how-to document.

    But I can’t make any guarantees, of course.

    That said, if this hypothetical scenario were true, you would also be able to see it in action in our new document on the proof of the triangle inequality.

    A screenshot of a Maple Learn document. The left side shows an explanation of how the triangles are constructed for Euclid's proof of the triangle inequality. The right side shows an adjustable graph of said triangles.

    With this document, you can explore a detailed (and interactive!) visualization of the proof using Euclidean geometry. You can adjust the triangles to see for yourself that the sum of the lengths of any two sides must be greater than the third side, read through the explanation to see the mathematical proof, and challenge yourself with the questions it leaves you to answer. And those points on those triangles? Labeled. Smoothly and easily. I wonder how they might have done it?

    We hope you enjoy the new update! Let us know what other features you want to see in Maple Learn, and we’ll do our best to turn those dreams into reality.

    This is a reminder that we are seeking presentation proposals for the Maple Conference.

    Details on how to submit your proposal can be found on the Call for Participation page. Applications are due July 11, 2023.

    We would love to hear about your work and experiences with Maple! Presentations about your work with Maple Learn are also welcome.

    We’re now coming to the end of Pride Month, but that doesn’t mean it’s time to stop celebrating! In keeping with our celebration of queer mathematicians this month, we wanted to take some time to highlight the works of LGBT+ mathematicians throughout history. While it’s impossible to say how some of these individuals would have identified according to our modern labels, it’s still important to recognize that queer people have always existed, and have made and continue to make valuable contributions to the field of mathematics. It’s challenging to find records of LGBT+ people who lived in times when they would have been persecuted for being themselves, and because of that many contributions made by queer individuals have slipped through the cracks of history. So let’s take the time to highlight the works we can find, acknowledge the ones we can’t, and celebrate what the LGBT+ community has brought to the world of mathematics.

    If you ask anyone to name a queer mathematician, chances are—well, chances are they won’t have an answer, because unfortunately the LGBT+ community is largely underrepresented in mathematics. But if they do have an answer, they’ll likely say Alan Turing. Turing (1912-1954) is widely considered the father of theoretical computer science, largely due to his invention of the Turing machine, which is a mathematical model that can implement any computer algorithm. So if you’re looking for an example of his work, look no further than the very device you’re using to read this! He also played a crucial role in decoding the Enigma machine in World War II, which was instrumental in the Allies’ victory. If you want to learn more about cryptography and how the field has evolved since Turing’s vital contributions, check out these Maple MathApps on Vigenère ciphers, password security, and RSA encryption. And as if that wasn’t enough, Turing also made important advances in the field of mathematical biology, and his work on morphogenesis remains a key theory in the field to this day. His mathematical model was confirmed using living vegetation just this year!

    In 1952, Turing’s house was burgled, and in the course of the investigation he acknowledged having a relationship with another man. This led to both men being charged with “gross indecency”, and Turing was forced to undergo chemical castration. He was also barred from continuing his work in cryptography with the British government, and denied entry to the United States. He died in 1954, from what was at the time deemed a suicide by cyanide poisoning, although there is also evidence to suggest his death may have been accidental. Either way, it’s clear that Turing was treated unjustly. It’s an undeniable tragedy that a man whose work had such a significant impact on the modern era was treated as a criminal in his own time just because of who he loved.

    An image of Alan Turing next to a diagram of a Turing machine computing the busy beaver problem.

    Antonia J. Jones (1943-2010) was a mathematician and computer scientist. She worked at a variety of universities, including as a Professor of Evolutionary and Neural Computing at Cardiff University, and lived in a farmhouse with her partner Barbara Quinn. Along with her work with computers and number theory, she also wrote the textbook Game Theory: Mathematical Models of Conflict. If you want to learn more about that field, check out this collection of Maple Learn documents on game theory. As a child, Jones contracted polio and lost the use of both of her legs. This created a barrier to her work with computers, as early computers were inaccessible to individuals with physical disabilities. Luckily, as the technology developed and became more accessible, she was able to make more contributions to the field of computing. And that’s especially lucky for banks who like having their money be secure—she then exposed several significant security flaws at HSBC! That just goes to show you the importance of making mathematics accessible to everyone—who knows how many banks’ security flaws aren’t being exposed because the people who could find them are being stopped by barriers to accessibility?

    An image of Antonia J. Jones next to the cover of the textbook she wrote: Game Theory: Mathematical models of conflict.

    James Stewart (1941-2014) was a gay Canadian mathematician best known for his series of calculus textbooks—yes, those calculus textbooks, the Stewart Calculus series. I’m a 7th edition alumni myself, but I have to admit the 8th edition has the cooler cover. To give you a sense of his work, here’s an example of an optimization problem that could have come straight from the pages of Stewart Calculus. Questions just like this have occupied the evenings of high school and university students for over 25 years. I suspect not all of those students really appreciate that achievement, but nonetheless his works have certainly made an impact! Stewart was also a violinist in the Hamilton Philharmonic Orchestra, and got involved in LGBT+ activism. In the early 1970s, a time where acceptance for LGBT+ people was not particularly widespread (to put it lightly), he brought gay rights activist George Hislop to speak at McMaster University. Stewart is also known for the Integral House, which he commissioned and had built in Toronto. Some may find the interior of the house a little familiar—it was used to film the home of Vulcan ambassador Sarek in Star Trek: Discovery!

    An image of James Stewart next to the cover of the 8th edition Stewart Calculus textbook.

    Agnes E. Wells (1876-1959) was a professor of mathematics and astronomy at Indiana University. She wrote her dissertation on the relative proper motions and radial velocities of stars, which you can learn more about from this document on the speed of orbiting bodies and this document on linear and angular speed conversions. Wells was also a woman’s rights activist, and served as the chair of the National Woman’s Party. In her activism, she argued that the idea of women “belonging in the home” overlooked unmarried women who needed to earn a living—and women like her who lived with another woman as their partner, although she didn’t mention that part. There is a long-standing prejudice against women in mathematics, and it’s the work of women like Wells that has helped our gradual progress towards eliminating that prejudice. To be a queer woman on top of that only added more barriers to Wells’ career, and by overcoming them, she helped pave the way for all queer women in math.

    An image of Agnes E. Wells next to a table from her dissertation on the movement of stars.

    Now, there is a fair amount of debate as to whether or not our next mathematician really was LGBT+, but there is sufficient possibility that it’s worth giving Sir Isaac Newton a mention. Newton (1642-1727) is most known for his formulation of the laws of gravity, his invention of calculus (contended as it is), his work on optics and colour, the binomial theorem, his law of temperature change… I could keep going; the list goes on and on. It’s unquestionable that he had a significant impact on the field of mathematics, and on several other fields of study to boot. While we can’t know how Newton may have identified with any of our modern labels, we do know that he never married, nor “had any commerce with women”[a], leading some to believe he may have been asexual. He also had a close relationship with mathematician Nicolas Fatio de Duillier, which some believe may have been romantic in nature. In the end, we can never say for sure, but it’s worth acknowledging the possibility. After all, now that more and more members of the LGBT+ community are feeling safe enough to tell the world who they are, we’re getting a better sense of just how many people throughout history were forced to hide. Maybe Newton was one of them. Or maybe he wasn’t, but maybe there’s a dozen other mathematicians who were and hid it so well we’ll never find out. In the end, what matters more is that queer mathematicians can see themselves in someone like Newton, and we don’t need historical certainty for that.

    An image of Isaac Newton next to a Maple Learn document depicting how light passing through a prisim becomes a rainbow.

    So there you have it! Of course, this is by no means a comprehensive list, and it’s important to recognize who’s missing from it—for example, this list doesn’t include any people of colour, or any transgender people. Sadly, because of the historical prejudices and modern biases against these groups, they often face greater barriers to entry into the field of mathematics, and their contributions are frequently buried. It’s up to us in the math community to recognize these contributions and, by doing so, ensure that everyone feels like they can be included in the study of mathematics.

    Some texts distinguish between unary and binary negation signs, using short dashes for unary negation and a longer dash for binary subtraction. How important is this distinction to users of Maple?

    Some earlier versions of Maple used to have short dashes for negation (in some places). Maple 2023 has apparently abandoned the short dash for unary negation, and all such signs are now a long dash.

    How about math books? Do all texts make this short-long distinction? The typesetters for my 2001 Advanced Engineering Math book also opted for all long dashes and that book was set from the LaTeX exported from Maple 20+ years ago. But I also have texts in my library that use a short dash for unary negation, on the grounds that -a, the additive inverse of "a" is a complete symbol unto itself, the short dash being part of the symbol for that additive inverse.

    Apparently, this issue bugs me. Am I making a tempest in a teapot?

    What do you think is the acceptable limit to the effort required to answer a question?

    At what point does the question-and-answer game between two contributors become unreasonable?

    How do you, the most highly ranked, deal with situations that last for days?

    First 12 13 14 15 16 17 18 Last Page 14 of 306