Functions
Functions
1 Vector-Valued Functions
Vectors differ from regular numbers because they have both a magnitude
(length) and a direction. In our three dimensional world, vectors have one
component for each direction, and are denoted by
Another common notation uses the unit vectors i, j and k for the x, y and z
direction respectively. The vector is then written as
r(t) = xi + yj + zk . (2)
0.0
1.0
z 0.5
0.0
0.0
0.5
x
1.0
Figure 1: r(t) = i + j + k
which we call the origin and has coordinates (0, 0, 0). An analogy is how you
might give someone directions (before the advent of Google Maps!) Imagine
that you lived in an apartment in a city with perpendicular streets (like
American cities.) You could direct someone by saying that you live in the
third street west (x position) and seventh street from the north (y position)
from their apartment, and that also you live on the sixth floor (z position.)
Only with all three pieces of information could your friend find you. In other
words, vectors give complete information about position. Recall that a we can
1
y
-4 -2 2 4 x
-2
-4
add two vectors r1 = (1, 3, 1) and r2 = (0, 3, −2) to get r1 + r2 = (1, 6, −1),
and so on. The length of a vector is given by its magnitude, the formula
for which is p
||r|| = x2 + y 2 + z 2 . (3)
Similarly, when we think of functions, we are used to parametric functions
such as
x(t) = 3t , x(t) = t2 , (4)
etc. However, it is reasonable to think that this can be generalised to three (or
more!) dimensions. In this instance they describe shapes in three-dimensions.
We define vector-valued functions to be functions of a real variable with
several component functions depending on a parametric variable t as
2
5- 5
x
y 0
0 5
-5
15
z 10
3
equations
f (t) = 5 cos t , g(t) = 5 sin t , h(t) = t , (8)
which is instead a spiral (circular helix) and is drawn in Figure 3.
tHr1- r0 L
r0 r r1
we see that to move along this line, we could start at position r0 and move
to other point r via
r = r0 + vt , (9)
where v is the rate at which the position changes (the “velocity”) and the
parameter t describes how much “time” has elapsed in which the change has
occurred. Let r0 be at t = 0 and r1 be at t = 1. Then
r1 = r0 + v , (10)
and so
v = r1 − r0 . (11)
This means we arrive at
r = r0 + (r1 − r0 )t
(12)
= (1 − t)r0 + tr1 .
This is the two-point form of a line. Notice that if 0 ≤ t ≤ 1 then it describes
the line segment from r0 to r1 .
4
3.1.2 Limits and continuity
We define the limit of a vector-valued function to be
1.5
1.0
0.5
-2 -1 1 2 t
-0.5
-1.0
all points in the interval. We can see what this means with an example.
Clearly, the vector-valued function r(t) = (t, t2 , t + t3 ) is continuous because
the limit at t → a is r(a) = (a, a2 , a + a3 ), and is continuous for all real
values of a, i.e. on the interval (−∞, ∞). However, let us instead consider
r(t) = (θ(t), t2 , t + t3 ), with the new function given by
(
1 if t ≥ 0
θ(t) = (16)
0 if t < 0 .
5
interval [−2, 0], it is discontinuous at the point t = 0. To see this, we notice
that the limit at t = 0 in this interval must be 0 since we must take the limit
from below. However, the value at t = 0 is 1. Therefore, because one of the
components of r(t) = (θ(t), t2 , t + t3 ) is discontinuous r(t) is discontinuous.
3.1.3 Derivatives
We now define derivatives of vector-valued functions using limits. In order
to be differentiable, the vector-valued function must be continuous, but the
converse does not hold. The derivative is defined as
r(t + h) − r(t)
r0 (t) = lim , (17)
t→h h
provided the limit exists. Clearly, it exists only when the function is contin-
uous. This is shown in Figure 6. Notice that the derivative r0 (t) is tangent
to the curve traced out by r(t), and points in the direction of increasing t.
In mechanics, r0 (t) = v(t). Alternative notations include r0 , dtd r(t), and dr
dt
.
Let’s look at an example:
3 √
r(t) = et i + 1 + t2 j − sin t k ,
3 t (18)
⇒ r0 (t) = 3t2 et i + √ j − cos t k .
1 + t2
Let us recall some properties of derivatives that apply to vector-valued func-
tions :
6
1.0 1.0
0.2 0.2
0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0
R(t) = r0 + v0 t , (19)
with r0 = r(t0 ) and v0 = r0 (t0 ). This is clearly the vector form of a line
segment.
Example: Find the tangent line of a circular helix with the equation
r0 = r(π) = −ρ i + πc k , (22)
and
v0 = r0 (π) = −ρ j + c k . (23)
7
1.0
0.8 r'HtL
0.6 RHtL
0.4 rHtL
0.2
8
Then, applying the derivatives to these products gives
d
(r1 · r2 ) = r01 · r2 + r1 · r02 ,
dt (29)
d
(r1 × r2 ) = r01 × r2 + r1 × r02 .
dt
Finally in this section, we use these rules to prove a theorem. You probably
remember that the tangents you met previously are perpendicular (normal)
to the curve. Is that true here? The theorem below says yes in certain
conditions.
Theorem 1.1 If r(t) is a real vector-valued function with constant magnitude
||r(t)||, then r · r0 = 0, which means that r0 is perpendicular to r, i.e. r ⊥ r0 .
Proof
||r||2 = r · r
d (30)
⇒ 0 = (r · r) = r0 · r + r · r0 = 2r0 · r ,
dt
as required.
Rules of Integration
Rb Rb
1. a (kr(t)) dt = k a r(t) dt ,
9
y
60
50
40
30
20
10
Rb Rb Rb
2. a
(c r1 (t) + d r2 (t)) dt = c a
r1 (t) dt + d a
r2 (t) dt .
Here k, c, and d are constants. Also recall that if the graph f lies above the
graph g, then the area between the graphs is given by
Z b
Area = f (x) − g(x) dx . (32)
a
Also recall that the volume of a solid that has cross-sectional area A(x) has
volume Z b
Volume = A(x) dx . (33)
a
Let us consider an example. √
Example: Find the integral of r(t) = t3 i + tj − sin πt 2
k with limits 0 and
2.
Solution:
Z 2 √
3 πt
t i + tj − sin k dt
0 2
2
1 4 2 3/2 2 πt
= t i + t j + cos k
4 3 π 2
" √ #
0
(34)
4 2 2 2
= 4i + j − k − 0i + 0j + k
3 π π
√
4 2 4
= 4i + j − k.
3 π
10
We made use of the fact that cos 0 = 1 and cos π = −1.
Hence, Z
r(t) dt = R(t) + C . (36)
2. r0 (t) dt = r(t) + C ,
R
11
3.1.7 Arc Length and Changing Parameters
We say that a curve is smoothly parameterised by r(t), or that r(t) is a
smooth function of t if r0 (t) exists, is continuous and that r0 (t) 6= 0 for all
t. If a function is smooth, we can calculate its arc length, which is given by
s
Z b Z b 2 2 2
dr dx dy dz
L= dt = + + dt . (40)
a dt a dt dt dt
As an example, lets find the arc length of r(t) = 5 cos ti + 5 sin tj + tk from
0 to π2 . Then r0 (t) = −5 sin ti + 5 cos tj + k, and
p √
||r0 (t)|| = (−5 sin t)2 + (5 cos t)2 + 1 = 26 , (41)
which gives arc length
Z π/2 √ √ π
L= 26 dt = 26 . (42)
0 2
12
y
4 PHx,yL
t
-4 -2 2 4 x
H5,0L
-2
-4
dr dr dt
= . (48)
dτ dt dτ
If g(τ ) is smooth, then the change is called a smooth change of parameter.
dt
Also, if dτ > 0 for all τ , then it is a positive change of parameter.
dt
Alternatively, if dτ < 0 for all τ , then it is a negative change of parameter.
Using these notations, we state that if C is the graph of a smooth vector-
valued function r(t), with some reference point r(t0 ), then the arc length
parameter is given by a positive change of parameter and is found from the
formula
s
Z t Z t 2 2 2
dr dx dy dz
s= du = + + du . (49)
t0 du t0 du du du
13
notation in the integral. We will use t0 = 0 as our reference point. Then
dr √
= 5, (50)
du
and so Z t√ √
s= 5du = 5t . (51)
0
Therefore, the reparameterisation give us
s s s
r(s) = 2 cos √ i + 2 sin √ j + √ k. (52)
5 5 5
(b) If r(t) is a vector-valued function and arc length parameter s, the tan-
gent vector for any s has length given by
dr
= 1. (54)
ds
14
directly from (a) if we take t = s. Finally, (c) comes from setting ||dr/dt|| = 1
in (49), which gives
Z t Z t
dr
s= du = du = u|tt0 = t − t0 , (55)
t0 du t0
as required.
v(t) r0 (t)
T= = 0 , (56)
||v(t)|| ||r (t)||
Example: Find the unit tangent and unit normal vectors to the curve
15
y
10
N(t)
8
T(t)
6
2
0 1 2 3 4 x
Note that this vector is the parametric form of a circle in a plane with a
minus sign. Hence the normal vector is parallel to the xy-plane and points
from the curve (spiral) towards the z-axis, i.e. in the opposite direction to
16
the vector that would describe a circle.
When the curve is parameterised by its arc length parameter, the calculation
of these vectors is simpler. We have the formula
T(s) = r0 (s) ,
r00 (s) (58)
N(s) = 00 .
||r (s)||
and therefore
r(s) = 3 cos s/3i + 3 sin s/3j .
We then find the tangent vector,
Then
1 1
r00 (s) = − cos s/3i − sin s/3j ,
3 3
which has magnitude
s 2 2
00 1 1 1
||r (s)|| = − cos s/3 + − sin s/3 = ,
3 3 3
17
3.1.8.2 Binormal vectors
The binormal vector is defined by
These three vectors define three mutually perpendicular planes at any point
0.0
0.5
1.0
1.0
B rHtL
0.5
N
T
0.0
0.0
0.5
1.0
Figure 11: Normal, binormal and tangent vectors, and the planes containing
them.
18
which in the situation where we use the arc length parameter, becomes
r0 (s) × r00 (s)
B(s) = . (62)
||r00 (s)||
This is a good moment to pause to think again about why we might want
to use arc length parameterisation. We have already seen that it simplifies
the simplifies the expressions for the unit tangent, unit normal and binormal
vectors. This is itself useful, but it is in the definition of curvature that it
becomes vital.
3.1.9 Curvature
For a curve C of a vector-valued function r, the unit tangent vector T is a
measure of how quickly we move along C. If we then consider the derivative
dT/ds, this is a measure of how quickly the motion changes direction or
“curves” at that point. Therefore, we define the curvature of C to be
dT
κ(s) = = ||r00 (s)|| , (63)
ds
which is a number which tells us how much a curve bends. Of course, this
is a bit simplistic: a curve in three dimensions can bend in three different
directions, so how can one number give us all this information? The answer
is that it doesn’t, and in fact, we should also consider dN/ds and dB/ds
to gives us a full picture. The concept of T changing along the curve is
represented in Figure 12.
y y
3.0 2.0
2.5 T
1.5 T
2.0
1.5 T 1.0
T
1.0
0.5
0.5
T
0.0
0 1 2 3 4 x 0.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 x
19
(a) The circle r(s) = 3 cos s/3i + 3 sin s/3j , (0 ≤ s ≤ 6π) .
r0 (s) = 0 + v = v ,
since r0 and v are constants, and the second derivative will vanish as
a result:
r00 (s) = 0 .
This implies the curvature is zero:
κ(s) = 0 .
More generally, we find that for a circle of radius a, the curvature is 1/a
and so the the larger a circle, the smaller the curvature, which makes sense
intuitively. Also, any line has zero curvature, which again makes sense.
If we want to use more a more general parameter t, we can write the curvature
as
||T0 (t)||
κ(t) = ,
||r0 (t)||
(64)
||r0 (t) × r00 (t)||
or κ(t) = ,
||r0 (t)||3
but the expression is much simpler for the arc length parameter. We will not
prove these, but proofs can be found in section 12.5 of the textbook. Often,
20
the second of these formulae is more practical to use. These are necessary
when calculating the arc length parameter is complicated. For example if the
argument in the square root in equation (49) cannot be reduced to a square
it might be very difficult to integrate the result. In these cases the formulae
for the general parameter are more appropriate.
Example: Consider the vector-valued function r = 2 cos ti + 3 sin tj for
0 ≤ t ≤ 2π. Find the curvature at the points t = π/2 and t = π.
Π
2
3
-2 -1 1 2 0
-1
-2
-3
21
and we find the cross-product of these
i j k
r0 × r00 = = 6 sin2 t + 6 cos2 t k = 6k .
−2 sin t 3 cos t 0
−2 cos t −3 sin t 0
In other words, this vector, which is parallel to the binomial vector points
along the z axis. We now need its norm, which is obviously 6. We also need
the norm of r0 , which is
p p
||r0 || = (−2 sin t)2 + (3 cos t)2 = 4 sin2 t + 9 cos2 t .
This is the reason we would be unwise to use the arc length parameter here
since this square root appears in the definition of the arc length parameter.
Obviously this makes life difficult, so instead we find the curvature via (64)
to find
||r0 (t) × r00 (t)|| 6
κ(t) = 0 3
= 3/2 .
||r (t)|| 4 sin2 t + 9 cos2 t
We now can find the particular values we are interested in
6 3
κ(π/2) = 3/2
= ,
(4) 4
6 2
κ(π) = 3/2
= .
(9) 9
Notice that the curvature is greater at the end of the major axis than at the
end of the minor axis. Between this points the curvature is between these
values as we get a mixture of the sin and cos terms.
22
Centre of
curvature
Ρ=1/Κ
Figure 14: The centre of curvature and radius of curvature for a curve.
0.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 x
23
which of course gives us
dT
= − sin φi + cos φj . (66)
dφ
The key point is that we can relate this to the derivative with respect to the
arc length parameter using the chain rule. We find
dT dT dφ
= . (67)
ds dφ ds
Therefore the curvature becomes
dT dφ dT p dφ dφ
κ(s) = = = (− sin φ)2 + (cos φ)2 = , (68)
ds ds dφ ds ds
which we present compactly as
dφ
κ(s) = , (69)
ds
This is the rate of change of φ with respect to s. In other words, in two
dimensions, curvature can be interpreted as how quickly the polar coordinate
changes.
3.1.10 Mechanics
You might have noticed some striking similarities between what we have been
doing and your experience in Newtonian mechanics. This is not a coincidence.
Although many mechanics problems are of linear motion or circular motion,
and vectors tend to be treated separately when considering work, moments
and so on, in fact we should always think three-dimensionally. Think again
about arc length. For a straight line is it the same as distance. For circular
motion, it is a portion of the orbit. Either way, the instantaneous speed
along the curve is ds/dt, which is the rate of change of the arc length. More
generally, we can define the velocity as
ds
v(t) = T(t) , (70)
dt
since T is a unit vector which gives the direction of the rate of change of
position. Of course, the acceleration is just the derivative of the velocity,
24
dv
a= dt
.Therefore, we have the following equations
dr
velocity = v(t) = ,
dt
dv d2 r
acceleration = a(t) = = 2, (71)
dt dt
ds
speed = ||v(t)|| = .
dt
What about displacement? We can simply integrate the velocity to give this,
assuming the velocity is known via
Z t2 Z t2
dr(t)
∆r = v(t) dt = dt = r(t2 ) − r(t1 ) . (72)
t1 t1 dt
Of course if we already know the position vector (i.e. the vector-valued
function for whose graph gives the motion of the particle), we can directly
substitute or recognise r as the antiderivative of v using the Fundamental
Theorem of Calculus. This is something you probably understand very well,
but it is helpful to look at it in this mathematical way to help us to under-
stand what all the previous work on vector-valued functions was about. The
distance travelled comes from integrating the norm of the velocity (speed)
over the time interval, which is
Z t2 Z t2
dr
s= dt = ||v|| dt . (73)
t1 dt t1
Although we use s here, this is not actually an arc length parameter unless
we say t1 is a reference point. The use of s is an unfortunate coincidence due
to the fact that in mechanics s is the standard way to represent displacement.
This is actually an arc length over an interval.
Returning to the acceleration, you know from circular motion that we should
expect both a tangential acceleration and radial acceleration in general. This
radial acceleration is in fact along the direction of the normal vector, and
using v = ds/dtT, we have the following decomposition of the acceleration
d2 s
ds
a = 2T+κ N. (74)
dt dt
We can define two separate components of acceleration
a = aT T + aN N , (75)
25
with
d2 s
ds
aT = 2 , aN = κ . (76)
dt dt
We call aT the tangential scalar component of acceleration and aN
the normal scalar component of acceleration and aT T the tangen-
tial vector component of acceleration and aN N the normal vector
component of acceleration. Finally, in terms of velocity and acceleration,
these are given by
v·a ||v × a|| ||v × a||
aT = , aN = , κ= . (77)
||v|| ||v|| ||v||3
Example: Find the velocity, acceleration and tangential and normal accel-
erations of the motion
assuming θ is a constant.
Solution: Firstly, this is in fact an ellipse rotated out of the xy-plane by
and angle θ about the x-axis. Hence the y and z components have changed.
This is shown in Figure 17. It describes the orbit of a planet around a star
if the orbit is at an angle to the xy-plane. The velocity is given by
To find the components of acceleration, we use equation (77). The dot prod-
uct is
v · a = 2 − 9 sin2 (θ) sin(2t) ,
v × a = −6 sin θj + 6 sin θk ,
26
-2
x
-1
0
1
2
Θ
0 z
-1
2
0
-2
Figure 16: An ellipse in the xy-plane (red) and rotated away from the plane
(blue).
with norm √
||v × a|| = 6 2 sin θ
Note that this is 0 if θ = 0. In other words if the motion is in the xy-plane
there is no normal acceleration. The components of acceleration are
2 − 9 sin2 (θ) sin(2t)
v·a
aT = = √ ,
||v|| 4 sin2 t + 9 cos2t
√ (78)
||v × a|| 6 2 sin θ
aN = = 3/2 .
||v||3 4 sin2 t + 9 cos2 t
27
3. Law of Periods: The square of the orbital period of a planet is pro-
portional to the cube of the semi-major axis of its orbit.
How did Kepler derive these? We now have the tools to understand this. If a
particle moves under the influence of a single force acting from a fixed point,
we say the particle is moving in a central force field, with the force called
a central force. If we look at the problem in a coordinate system with this
fixed point as the origin, the acceleration acts along the radius vector (since
the force does) but in the opposite direction. This means
r × a = 0. (79)
GM m
F=− r. (83)
r3
28
Therefore the acceleration is
GM
a=− r. (84)
r3
Take the initial position and velocity to be
r0 = r0 i , v0 = v0 j , (85)
which implies
l = r0 i × v0 j = r0 v0 k , (86)
which is constant. If we now define a unit vector
which follows the planet, we can write the radius vector in polar coordinates
using this convenient unit vector:
and hence
GM
a=− u. (89)
r2
Now,
d d du dr
v= r = (ru) = r + u, (90)
dt dt dt dt
and since l is constant,
du dr du dr du
l = r × v = (ru) × r + u = r2 u × + r u × u = r2 u × , (91)
dt dt dt dt dt
since u × u = 0. Since u depends on θ we must use the chain rule to find its
derivative
du du dθ dθ
= = (− sin θi + cos θj) , (92)
dt dθ dt dt
and so
du dθ
u× = k, (93)
dt dt
and therefore
dθ
l = r2 k . (94)
dt
29
If we now take the cross product between a and l, we get
GM 2 dθ
a × l = − 2 (cos θi + sin θj) × r k
r dt
(95)
dθ du
= GM (− sin θi + cos θj) = GM .
dt dt
Since l is constant, we find
d dv du
(v × l) = × l = a × l = GM , (96)
dt dt dt
which we integrate to find
v × l = GM u + C , (97)
where C is a constant vector. Since this is a constant, we can find it’s value
by substituting the values of v and u at t = 0, i.e. v = v0 j and u = i and
we get
C = (r0 v02 − GM )i . (98)
We will now make use of this to determine the position as a function of θ.
Consider r · (v × l) and recall the identity u · (v × w) = (u × v) · w. Then
Alternatively,
r
+ ru · (r0 v02 − GM )i
r · (v × l) = r · (GM u + C) = r · GM
r (100)
= GM r + r(r0 v02 − GM ) cos θ .
or
r02 v02
GM k
r= = , (102)
r0 v02 1 + e cos θ
1+ GM
− 1 cos θ
where
r02 v02 r0 v02
k= , e= − 1. (103)
GM GM
30
e>1
4
e=1
2
0<e<1
-8 -6 -4 -2
-2
-4
In other words, this is the equation of a conic section with k = de and k and
e given above. This can result in an ellipse (0 < e < 1), parabola (e = 1) or
hyperbola (e > 1). The conic that the orbit sketches is the result of the mass
of the body causing the gravitational force, as well as the initial position
and velocity. If e ≥ 1, the orbit is not closed, i.e. the bodies escapes the
gravitational pull. The condition e = 1 give the escape velocity,
r
2GM
vesc = . (104)
r0
dθ
r2 = r0 v0 . (105)
dt
31
Since the curve should be described by a function of the angle, r = f (θ), and
hence form the formula for area in polar coordinates,
Z θ2
1
A= [f (θ)]2 dθ , (106)
θ1 2
πab , (108)
where a and b are the semi-major and semi-minor axes. Although we haven’t
actually covered this is is quite easy to prove (try!). In one period, the area
the radial line sweeps out is
Z T Z T
dA 1 1
dt = r0 v0 dt = r0 v0 T , (109)
0 dt 0 2 2
and therefore
1
r0 v0 T = πab . (110)
2
We can square this to obtain
4π 2 a2 b2
T2 = . (111)
r02 v02
32
Moreover, we can see from equation (103) that
r02 v02
= k = a(1 − e2 ) , (114)
GM
and so
4π 2 a3 4π 2 a3 r02 v02 4π 2 3
T2 = k = = a , (115)
r02 v02 r02 v02 GM GM
and taking the square root gives the result,
2π 3/2
T =√ a . (116)
GM
33