1444 Reputation

19 Badges

4 years, 0 days

MaplePrimes Activity

These are Posts that have been published by C_R

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"})





Independent variable

Time t

Arclength s

Dependent variable

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



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





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 


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

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


(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


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


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

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


`ϕ`(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


`&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


For a downward force:

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

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


Parameter C

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

C = g/l

C = g/l


"Specific" Load

C = F/EI

C = F/EI




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


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


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


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)


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)


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


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)


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


#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


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

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


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


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)


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


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

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


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


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)


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


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


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


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


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


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)


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)


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



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)


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


which simplifies further with

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