Mechanics - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Physics Courseware Support: Mechanics

 Explore. While learning, having success is a secondary goal: using your curiosity as a compass is what matters. Things can be done in many different ways, take full permission to make mistakes. Computer algebra can transform the algebraic computation part of physics into interesting discoveries and fun.
 The following material assumes knowledge of how to use Maple. If you feel that is not your case, for a compact introduction on reproducing in Maple the computations you do with paper and pencil, see sections 1 to 5 of the Mini-Course: Computer Algebra for Physicists. Also, the presentation assumes an understanding of the subjects and the style is not that of a textbook. Instead, it focuses on conveniently using computer algebra to support the practice and learning process. The selection of topics follows references [1] and [2] at the end. Maple 2023.0 includes Part I. Part II is forthcoming.

Part I

 d.
 1
 a.
 A.
 B.
 A.
 B.
 a.
 i.
 ii.
 a.
 i.
 1 Conservation laws
 a.
 e.
 a.
 b.
 i.
 ii.
 a.
 b.
 1
 b.
 1
 a.
 b.

Part II (forthcoming)

 2
 3

Position, velocity and acceleration in Cartesian, cylindrical and spherical coordinates

Load the Physics:-Vectors package

$\mathrm{with}\left(\mathrm{Physics}:-\mathrm{Vectors}\right)$

 $\left[{\mathrm{&x}}{,}{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{Assume}}{,}{\mathrm{ChangeBasis}}{,}{\mathrm{ChangeCoordinates}}{,}{\mathrm{CompactDisplay}}{,}{\mathrm{Component}}{,}{\mathrm{Curl}}{,}{\mathrm{DirectionalDiff}}{,}{\mathrm{Divergence}}{,}{\mathrm{Gradient}}{,}{\mathrm{Identify}}{,}{\mathrm{Laplacian}}{,}{\nabla }{,}{\mathrm{Norm}}{,}{\mathrm{ParametrizeCurve}}{,}{\mathrm{ParametrizeSurface}}{,}{\mathrm{ParametrizeVolume}}{,}{\mathrm{Setup}}{,}{\mathrm{Simplify}}{,}{\mathrm{^}}{,}{\mathrm{diff}}{,}{\mathrm{int}}\right]$ (1)

Depending on the geometry of a problem, it can be convenient to work with either Cartesian or curvilinear coordinates. In an arbitrary reference system, the position in Cartesian coordinates and the basis of unitary vectors$\left(\stackrel{\wedge }{i},\stackrel{\wedge }{j},\stackrel{\wedge }{k}\right)$is given by

 $\stackrel{{\to }}{{r}}{=}{x}\stackrel{{\wedge }}{{i}}{+}{y}\stackrel{{\wedge }}{{j}}{+}{z}\stackrel{{\wedge }}{{k}}$ (2)

Problem

Rewrite the position vector $\stackrel{\to }{r}$ in cylindrical and spherical coordinates

Starting from the position in the Cartesian system, now as functions of the time to allow for differentiation, first note that the Cartesian unit vectors $\left(\stackrel{\wedge }{i},\stackrel{\wedge }{j},\stackrel{\wedge }{k}\right)$ do not depend on time, they are constant vectors. So $\stackrel{\to }{r}\left(t\right)$ is entered as

 $\stackrel{{\to }}{{r}}\left({t}\right){=}{x}\left({t}\right)\stackrel{{\wedge }}{{i}}{+}{y}\left({t}\right)\stackrel{{\wedge }}{{j}}{+}{z}\left({t}\right)\stackrel{{\wedge }}{{k}}$ (20)

Before proceeding further, use a compact display to more clearly visualize the following expressions. When in doubt about the contents behind a given display, input show as shown below.

$\mathrm{CompactDisplay}\left(\left(x,y,z,\mathrm{ρ},r,\mathrm{θ},\mathrm{φ},\mathrm{_ρ},\mathrm{_r},\mathrm{_θ},\mathrm{_φ}\right)\left(t\right)\right)$

 $\stackrel{{\wedge }}{{\mathrm{\phi }}}\left({t}\right){\mathrm{will now be displayed as}}\stackrel{{\wedge }}{{\mathrm{\phi }}}$ (21)

For the velocity and acceleration, note the dot notation for derivatives with respect to $t$

 ${\mathrm{v_}}\left({t}\right){=}\left({\mathrm{diff}}\left({x}\left({t}\right){,}{t}\right)\right){\mathrm{_i}}{+}\left({\mathrm{diff}}\left({y}\left({t}\right){,}{t}\right)\right){\mathrm{_j}}{+}\left({\mathrm{diff}}\left({z}\left({t}\right){,}{t}\right)\right){\mathrm{_k}}$ (22)

$\mathrm{show}$

 $\stackrel{{\to }}{{v}}\left({t}\right){=}\stackrel{{\mathbf{.}}}{{x}}\left({t}\right)\stackrel{{\wedge }}{{i}}{+}\stackrel{{\mathbf{.}}}{{y}}\left({t}\right)\stackrel{{\wedge }}{{j}}{+}\stackrel{{\mathbf{.}}}{{z}}\left({t}\right)\stackrel{{\wedge }}{{k}}$ (23)

 ${\mathrm{a_}}\left({t}\right){=}\left({\mathrm{diff}}\left({\mathrm{diff}}\left({x}\left({t}\right){,}{t}\right){,}{t}\right)\right){\mathrm{_i}}{+}\left({\mathrm{diff}}\left({\mathrm{diff}}\left({y}\left({t}\right){,}{t}\right){,}{t}\right)\right){\mathrm{_j}}{+}\left({\mathrm{diff}}\left({\mathrm{diff}}\left({z}\left({t}\right){,}{t}\right){,}{t}\right)\right){\mathrm{_k}}$ (24)

The position $\stackrel{\to }{r}\left(t\right)$as a function of time

Problem

Given the position vector as a function of the time t, rewrite it in cylindrical and spherical coordinates while making the curvilinear unit vectors' time dependency explicit.

The velocity $\stackrel{\to }{v}\left(t\right)$

Problem

Rewrite the velocity $\stackrel{\to }{v}\left(t\right)=\stackrel{\mathbf{.}}{\stackrel{\to }{r}}\left(t\right)$ in cylindrical and spherical coordinates while making the curvilinear unit vectors' time dependency explicit .

The acceleration $\stackrel{\to }{a}\left(t\right)$

Problem

Rewrite the acceleration $\stackrel{\to }{a}\left(t\right)=\stackrel{\mathbf{..}}{\stackrel{\to }{r}}\left(t\right)$in cylindrical and spherical components while making the curvilinear unit vectors' time dependency explicit.

Deriving these formulas

All these results for the position $\stackrel{\to }{r}$, velocity $\stackrel{\to }{v}$ and acceleration $\stackrel{\to }{a}$ are based on the differentiation rules for cylindrical and spherical unit vectors. It is thus instructive to also be able to derive any of these formulas; for that, we need the differentiation rule for the unit vectors. For example, for the spherical ones

 $\left[{\mathrm{%diff}}\left({\mathrm{_r}}\left({t}\right){,}{t}\right){=}\left({\mathrm{diff}}\left({\mathrm{θ}}\left({t}\right){,}{t}\right)\right){\mathrm{_θ}}\left({t}\right){+}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right){\mathrm{sin}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_φ}}\left({t}\right){,}{\mathrm{%diff}}\left({\mathrm{_θ}}\left({t}\right){,}{t}\right){=}{-}\left({\mathrm{diff}}\left({\mathrm{θ}}\left({t}\right){,}{t}\right)\right){\mathrm{_r}}\left({t}\right){+}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right){\mathrm{cos}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_φ}}\left({t}\right){,}{\mathrm{%diff}}\left({\mathrm{_φ}}\left({t}\right){,}{t}\right){=}{-}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right){\mathrm{_ρ}}\left({t}\right)\right]$ (38)

The above result contains, in the last equation, the cylindrical radial unit vector $\stackrel{\wedge }{\mathrm{\rho }}\left(t\right)$; rewrite it in the spherical basis

 ${\mathrm{_ρ}}\left({t}\right){=}{\mathrm{sin}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_r}}\left({t}\right){+}{\mathrm{cos}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_θ}}\left({t}\right)$ (39)

So the differentiation rules for spherical unit vectors, with the result expressed in the spherical system, are

$\mathrm{subs}\left(,\right)$

 $\left[{\mathrm{%diff}}\left({\mathrm{_r}}\left({t}\right){,}{t}\right){=}\left({\mathrm{diff}}\left({\mathrm{θ}}\left({t}\right){,}{t}\right)\right){\mathrm{_θ}}\left({t}\right){+}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right){\mathrm{sin}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_φ}}\left({t}\right){,}{\mathrm{%diff}}\left({\mathrm{_θ}}\left({t}\right){,}{t}\right){=}{-}\left({\mathrm{diff}}\left({\mathrm{θ}}\left({t}\right){,}{t}\right)\right){\mathrm{_r}}\left({t}\right){+}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right){\mathrm{cos}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_φ}}\left({t}\right){,}{\mathrm{%diff}}\left({\mathrm{_φ}}\left({t}\right){,}{t}\right){=}{-}\left({\mathrm{diff}}\left({\mathrm{φ}}\left({t}\right){,}{t}\right)\right)\left({\mathrm{sin}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_r}}\left({t}\right){+}{\mathrm{cos}}\left({\mathrm{θ}}\left({t}\right)\right){\mathrm{_θ}}\left({t}\right)\right)\right]$ (40)

Problem

With this information at hand, derive, in steps, the expressions for the velocity and acceleration in cylindrical and spherical coordinates

Summary

 • You can express $\stackrel{\to }{r}\left(t\right),\stackrel{\to }{v}\left(t\right)$ and $\stackrel{\to }{a}\left(t\right)$in any of the Cartesian, cylindrical or spherical systems via three different methods: 1) using the ChangeBasis command 2) differentiating 3) deriving the formulas by differentiating in steps, starting from the differentiation rules for the curvilinear unit vectors.

Velocity and acceleration in the case of 2-dimensional motion on the x, y plane

Problem

Derive formulas for velocity and acceleration in the case of  2-dimensional motion on the $x,y$ plane, starting from the general 3-dimensional formulas above, e.g. (44) and (51) in spherical coordinates. Specialize the resulting formulas for the case of circular motion.

The equations of motion

A single particle

 $\stackrel{{\to }}{{N}}\left({t}\right){\mathrm{will now be displayed as}}\stackrel{{\to }}{{N}}$ (62)

The equation of motion of a single particle is Newton's ${2}^{\mathrm{nd}}$ law

 ${\mathrm{F_}}\left({t}\right){=}{m}\left({\mathrm{diff}}\left({\mathrm{diff}}\left({\mathrm{r_}}\left({t}\right){,}{t}\right){,}{t}\right)\right)$ (63)

where $\stackrel{\mathbf{..}}{\stackrel{\to }{r}}\left(t\right)=\stackrel{\to }{a}\left(t\right)$ is the acceleration and $m\stackrel{\mathbf{.}}{\stackrel{\to }{r}}\left(t\right)=\stackrel{\to }{p}\left(t\right)$ is the linear momentum, so in terms of  $\stackrel{\to }{p}$

 ${\mathrm{F_}}\left({t}\right){=}{\mathrm{diff}}\left({\mathrm{p_}}\left({t}\right){,}{t}\right)$ (64)

We define the angular momentum $\stackrel{\to }{L}$ of a particle, and the torque $\stackrel{\to }{N}$ acting upon it, as

 ${\mathrm{L_}}\left({t}\right){=}{\mathrm{&x}}\left({\mathrm{r_}}\left({t}\right){,}{\mathrm{p_}}\left({t}\right)\right)$ (65)

 ${\mathrm{N_}}\left({t}\right){=}{\mathrm{&x}}\left({\mathrm{r_}}\left({t}\right){,}{\mathrm{F_}}\left({t}\right)\right)$ (66)

Differentiating the definition of $\stackrel{\to }{L}$

$\mathrm{diff}\left(,t\right)$

 ${\mathrm{diff}}\left({\mathrm{L_}}\left({t}\right){,}{t}\right){=}{\mathrm{&x}}\left({\mathrm{diff}}\left({\mathrm{r_}}\left({t}\right){,}{t}\right){,}{\mathrm{p_}}\left({t}\right)\right){+}{\mathrm{&x}}\left({\mathrm{r_}}\left({t}\right){,}{\mathrm{diff}}\left({\mathrm{p_}}\left({t}\right){,}{t}\right)\right)$ (67)

Since $\stackrel{\mathbf{.}}{\stackrel{\to }{r}}=\stackrel{\to }{v}$ is parallel to $\stackrel{\to }{p}=m\stackrel{\to }{v}$, the first term in the above cancels, and in the second term, from (64), $\stackrel{\mathbf{.}}{\stackrel{\to }{p}}=\stackrel{\to }{F}$

 ${\mathrm{diff}}\left({\mathrm{L_}}\left({t}\right){,}{t}\right){=}{\mathrm{&x}}\left({\mathrm{r_}}\left({t}\right){,}{\mathrm{F_}}\left({t}\right)\right)$ (68)

from which

$\mathrm{subs}\left(\left(\mathrm{rhs}=\mathrm{lhs}\right)\left(\right),\right)$

 ${\mathrm{N_}}\left({t}\right){=}{\mathrm{diff}}\left({\mathrm{L_}}\left({t}\right){,}{t}\right)$ (69)

 • As discussed below, in the case of a closed system, $\stackrel{\to }{F}=0$ and these two equations result in

that is, the linear and angular momentum are conserved quantities. Note that $\stackrel{\mathbf{.}}{\stackrel{\to }{L}}=0$ does not require that $\stackrel{\to }{F}=0$, only that $\stackrel{\to }{r}×\stackrel{\to }{F}=0$.

The equations of motion - vectorial form

Problem

Assuming that the acceleration is known as a function of t, compute:

a) The trajectory $\stackrel{\to }{r}\left(t\right)$starting from $\stackrel{\to }{a}\left(t\right)=\stackrel{\mathbf{..}}{\stackrel{\to }{r}}\left(t\right)$
b) A solution for each of the three Cartesian components

c) A solution for generic initial conditions

The case of constant acceleration

Problem

Starting from the vectorial equation (72) for $\stackrel{\to }{r}\left(t\right)$, derive the formula for constant acceleration

Motion under gravitational force close to the Earth's surface

Problem

Derive a formula for motion under gravitational force close to the Earth's surface

Motion under gravitational force not close to the Earth's surface

The problem of two particles of masses $\mathrm{m__1}$ and $\mathrm{m__2}$ gravitationally attracted to each other, discarding relativistic effects, is formulated by Newton's law of gravity: the particles attract each other - so both move - with a force along the line that joins the particles and whose magnitude is proportional to $\frac{1}{{r}^{2}}$, where $r$ represents the distance between the particles (this problem is treated in general form in the more advanced sections).

Problem

As a specific case, consider the problem of a particle of mass $m\ll M$, where M is earth's mass, moving not close to the surface (if compared with the radius of earth).