*Before you read this, I suggest you read* posts 16.20, 17.4 and post 17.19. But if you want to stop at the seventh paragraph, there is no need to read 17.19.

In post 16.20, we saw that a force does work when it moves something. This is a simple definition of work and there is nothing wrong with it. But, as we saw in post 17.25, when we start to think more about simple ideas they may lead us to some more complicated questions.

In post 16.20, we considered a constant force that acted in a straight line and an object that moved in the direction of the force.

Now let’s think about two complications:

- The object does not move in the direction of the force
- The force is not constant (either in magnitude or direction – see post 16.50).

In post 16.50, we saw that a cart pulled along a railway track can only move in the direction of the track. When it is pulled by a force that is at an angle, *θ *(not equal to zero or 180^{o}), to the track, it provides an example of the first complication.

If the force has a constant magnitude, *F*, the work done is simply *F*cos*θ* (the component of the force in the direction of the track – post 16.50) multiplied by *L* (the distance the cart moves). So, the work done is *FL*cos*θ*.

But if things don’t move in straight lines, we need to think about changes in their displacement, ** r**, (post 17.4) which is a vector – it has direction as well as magnitude (posts 17.2 and 17.3). The applied force is also a vector,

**(post 16.50). The work done is**

*F**Fr*cos

*θ*; but now that we recognise that

**and**

*r***are vectors we can also write this result as their**

*F**dot product*

**(see appendix 2 of post 17.13). The dot product of two vectors is simply their magnitudes multiplied together and the result multiplied by the angle between them – so, the result is a scalar (an ordinary number that doesn’t have any direction associated with it) since the components of vectors are scalars (posts 16.50, 17.2 and 17.3).**

*r.F*Let’s now think about the second complication. Now things start to get more mathematical – so you might want to stop reading here!

The force may not be constant but if we consider a very small displacement, that is almost nothing, *δ r* (see post 17.4), the change in

**will be very small. Then the work done is given by the approximation**

*F*The total work done by the force in moving the object from a displacement *L*_{1} to a displacement *L*_{2} is given, approximately, by the sum of these increments of work; we write this result as

(see post 17.19). In the limit that *δ r* tends to zero (see post 17.19) this approximation becomes exact and the work done is given by the integral

An integral like this, which consists of integration over a dot product of two vectors, is called a *line* *integral*.

The first sentence of this post defined work. We now have a mathematical method to calculate the work done by a force under any circumstances. The appendix gives an example to show how a line integral can be calculated.

*Related posts*

17.24 Representing fields by vectors

17.23 Using integration to calculation the position of centre of gravity

17.19 Calculating distance travelled – integration

17.13 Centripetal force

17.4 Displacement, velocity and acceleration

17.3 3D Vectors

17.2 Vectors

*Appendix – evaluating a line integral*

This is based on an example given in M. Boas, “Mathematical Methods in the Physical Sciences”, Wiley, London, 1966, pp 235-236.

In this example, a two-dimensional force (measured in newtons)

(see post 17.2) moves an object from the origin (0, 0) to a point (2, 1) on the *XY* plane (see appendix 2 of post 16.50), along a parabolic path described by the equation

where all distances are measured in metres. We can write

so that

(see appendix 2 of post 17.13) and our indefinite line integral becomes

which we can write as

From the equation of the parabolic path, we can calculate that

(see appendix 3 of post 17.4) so that our integral becomes

To evaluate this integral we need to express *y* in terms of *x*, by using the equation of the parabolic path, to give

Note that the limits of integration, in this definite integral are the starting and finishing *x* values of the object because the integral is a function of *x* only. To see how to evaluate the integral, see post 17.19 (it’s just the inverse of differentiation). Since *F* was measured in newtons and *r* is metres, the result is work measured in joules (post 16.20).