Why the Direction of a Force Matters
Moving an object along a ramp is not the same as lifting it vertically. Gravity acts downward, but the object moves along the ramp. Only the part of gravity pointing along the motion contributes to the work done by gravity.
The same principle applies to an applied force. A force may point partly along the route and partly across it. The parallel part changes the object's motion along the route; the perpendicular part contributes no work for motion constrained to that route.
To calculate work, we identify the direction of motion at each point, find each force's component in that direction, and integrate that component over the distance travelled. When the route changes slope, the direction of motion changes too, so the component may vary along the route.
Work Along a Route
Let an object move along a smooth route, with distance \(s\) measured from the starting point in the direction of motion. At each point, let \(\mathbf{T}(s)\) be the unit tangent vector pointing forward along the route. If the force is \(\mathbf{F}(s)\), its component in the direction of motion is the dot product \(\mathbf{F}(s)\cdot\mathbf{T}(s)\).
If a force has magnitude \(F\) and makes an angle \(\alpha\) with the forward direction, its parallel component is \(F\cos\alpha\). Thus its work over a straight route of length \(L\) is \(F L\cos\alpha\) when the force and angle are constant. In general, the magnitude, direction, or both may vary, and the integral accounts for that variation.
Gravity on a Straight Incline
Assume a ramp makes an angle \(\theta\) above the horizontal, and an object moves uphill. The forward unit tangent is \((\cos\theta,\sin\theta)\). In a uniform gravitational field, an object of mass \(m\) has weight \((0,-mg)\), where \(g\) is the gravitational acceleration. Taking the dot product gives the component of gravity along the ramp:
The negative sign means gravity points opposite the uphill direction. If the object travels uphill a distance \(L\) at constant angle, gravity does work \(-mgL\sin\theta\). If it travels downhill instead, forward motion points down the ramp, so gravity's parallel component is positive.
An applied force must be projected in the same way. If its direction makes angle \(\beta\) above the horizontal, its component along the uphill ramp is \(F\cos(\beta-\theta)\). The angle needed for a projection is the angle between the force and the direction of motion, not necessarily the angle either makes with the horizontal.
Worked Example: A Variable Applied Force on a Straight Ramp
A \(3\)-kg object moves \(10\) m uphill on a ramp at \(30^\circ\) above the horizontal. An applied force acts parallel to the ramp, with magnitude \(F(s)=12+2s\) newtons, where \(s\) is the distance in metres from the bottom. Take \(g=9.8\text{ m/s}^2\). Find the work done by the applied force, by gravity, and by their combined force.
Because the applied force points along the motion, its parallel component is \(12+2s\). Therefore, its work is
Check: the derivative of \(12s+s^2\) is \(12+2s\), the integrand. Its endpoint difference is \(220\) J, as calculated.
Gravity's parallel component is constant and points downhill:
Thus gravity does
Check: the derivative of \(-14.7s\) is \(-14.7\), and its endpoint difference is \(-147\) J. Since work adds over forces, the combined work is \(220+(-147)=73\text{ J}\).
When the Slope Changes
On a curved path, there is no single incline angle for the whole journey. The tangent direction varies from point to point. A useful way to describe a planar route is by a height function \(y=f(x)\), with the object travelling in the direction of increasing \(x\).
At a point where the slope is \(f'(x)\), the forward unit tangent and distance element are
The distance element \(ds\) is the distance along the route, not just the horizontal change \(dx\). For gravity, dotting the weight vector \((0,-mg)\) with the tangent and multiplying by \(ds\) gives a useful cancellation:
So gravity's work along this route is \(-mg\int f'(x)\,dx\). If \(f'\) is continuous on the interval of travel, the Fundamental Theorem of Calculus makes this \(-mg\bigl(f(x_{\text{end}})-f(x_{\text{start}})\bigr)\): gravity's work depends on the change in height, even though the direction of the path changes along the way.
An applied force can also be projected using the tangent. For example, if an applied force is horizontal and points in the direction of increasing \(x\), write it as \((P(x),0)\). Its parallel component is \(P(x)/\sqrt{1+(f'(x))^2}\). Multiplying by \(ds\) gives \(P(x)\,dx\). Thus its work is \(\int P(x)\,dx\). This does not mean the route length equals the horizontal displacement; it means the projection and the distance element combine to give that integral.
Worked Example: A Changing Slope and Horizontal Applied Force
A \(2\)-kg object travels along the path \(y=x^2/4\) from \(x=0\) m to \(x=2\) m. A horizontal applied force points toward increasing \(x\), with magnitude \(P(x)=8+2x\) newtons. Take \(g=9.8\text{ m/s}^2\). Find the work done by the applied force, by gravity, and by their combined force.
The slope is \(f'(x)=x/2\). The forward tangent and distance element are therefore
The applied force vector is \((8+2x,0)\). Its tangent component is \((8+2x)/\sqrt{1+x^2/4}\), so the work is
Check: the derivative of \(8x+x^2\) is \(8+2x\), and its endpoint difference is \(20\) J.
The starting height is \(f(0)=0\) m and the ending height is \(f(2)=2^2/4=1\) m. Gravity's work is
Equivalently, integrating its tangent component gives \(\int_0^2 -mg(x/2)\,dx=-19.6\) J. The combined work is \(20-19.6=0.4\text{ J}\). This is signed work by the two stated forces, not a claim that other forces on the object are absent.
Direction and Sign on a Downhill Route
The forward direction is determined by how the object actually travels. When motion is downhill, gravity's component along that direction is positive. An applied force can still do negative work if it points partly uphill. These signs should be assigned from the force's direction relative to motion, rather than from whether the force is called “applied” or “gravity.”
Worked Example: Gravity and a Horizontal Force on a Downhill Ramp
A \(4\)-kg object moves \(6\) m down a straight ramp at \(30^\circ\) below the horizontal. A constant \(25\)-N horizontal force points in the direction of the object's horizontal motion. Take \(g=9.8\text{ m/s}^2\). Find the work done by each force and their combined work.
The forward unit tangent is \((\cos 30^\circ,-\sin 30^\circ)\). Gravity is \((0,-mg)\), so its component along the downhill motion is
Gravity's work over \(6\) m is \(19.6(6)=117.6\text{ J}\), positive because gravity and motion both point downhill.
The horizontal force is \((25,0)\). Its component along the ramp is \(25\cos 30^\circ=25\sqrt{3}/2\) N. Its work is
Check: the horizontal displacement is \(6\cos 30^\circ=3\sqrt{3}\) m, so the same work is \(25(3\sqrt{3})=75\sqrt{3}\text{ J}\). The combined work is \(117.6+75\sqrt{3}\text{ J}\), approximately \(247.5\text{ J}\). The exact expression is the result; the decimal is rounded to one digit after the decimal point.
A Common Projection Mistake
A frequent error on an uphill ramp is to use \(mg\cos\theta\) as gravity's parallel component. For a ramp at \(30^\circ\), this would give \(mg\cos 30^\circ\). That is the component perpendicular to the ramp, not the component along it. In fact, gravity's perpendicular component points into the ramp, while its parallel component points downhill.
For a \(3\)-kg object on that ramp, the incorrect parallel magnitude would be \((3)(9.8)\cos 30^\circ\), about \(25.5\) N. The correct magnitude is \((3)(9.8)\sin 30^\circ=14.7\) N. For \(10\) m of uphill travel, gravity's work is therefore \(-14.7(10)=-147\) J, not \(-25.5(10)\) J. A reliable check is to draw the force and the direction of motion and project onto the direction of motion itself.
Putting the Calculation Together
For a route that may change slope, a sound work calculation follows the same sequence. The force component must be taken in the forward direction at each point, and the integration variable must match the route description.
Choose a coordinate that increases as the object moves, and identify the forward tangent.
Use a dot product with the unit tangent, or use \(F\cos\alpha\), where \(\alpha\) is the angle between the force and forward motion.
Integrate the signed parallel component with respect to arc length, or correctly combine the tangent component and distance element in another parameter.
Positive work assists forward motion; negative work opposes it. A force in newtons multiplied by distance in metres gives work in joules.
This approach matters whenever a force does not point exactly along a route: a ramp, a changing track, or any path whose direction varies. Using the whole force magnitude without projecting it can overstate the work. Using a horizontal or vertical displacement in place of distance along the route can also give the wrong result unless the projection justifies that choice, as it did for the horizontal force on the curved path.
Check Your Understanding
For each question, keep track of the forward direction and the component parallel to motion.
- An object moves uphill on a ramp at angle \(\theta\). What is the signed component of gravity along the uphill direction?
- Why does a force perpendicular to the direction of motion do no work along the route?
- A path is described by \(y=f(x)\), with motion toward increasing \(x\). What is the arc-length element \(ds\)?
- For constant gravity, what determines gravity's total work along a curved path: the route length or the net change in height?
- A force points partly opposite the direction of travel. What sign does its parallel component have, and what does that imply about its work?