# Work done by a variable force in two dimensions

In physics class today, our teacher ended class with an example problem. It essentially asked (perhaps with different numbers):

Given a variable force $\vec{F}=3x\hat{\textbf{i}}+4y\hat{\textbf{j}}$ acting on an object moving from $\vec{r}=0$ to $\vec{r}=5\hat{\textbf{i}}$, calculate the work done on the object by $\vec{F}$.

Our teacher wrote "$\int_{0}^{5}{3x\hat{\textbf{i}}+4y\hat{\textbf{j}} \space dx\hat{\textbf{i}}}$" on the board, which looked wrong. While the solution to this problem is fairly intuitive, what is the correct notation for the integral and solution in general?

The total work done is

$$W = \int_\gamma \vec F \cdot d \vec r$$

where $d\vec r$ is the infinitesimal, tangential line element along some path $\gamma$.

We need to figure out the path we'd like to take, and the associated parameterization we would like to use. One possible choice (which mirrors what your instructor used) is the following:

$$\vec r(t) = \langle x(t),y(t) \rangle = \langle t,0\rangle \\ t\in [0,5]$$ so $$\vec F = \langle 3x(t),4y(t)\rangle = \langle 3t,0\rangle$$ $$d \vec r = \langle 1, 0 \rangle dt$$ and the integral becomes $$\int_0^5 3t \ dt = \left.\frac{3}{2}t^2\right|^5_0 = \frac{75}{2}$$

Your instructor chose to parameterize the path by one of its coordinates. That's a perfectly good choice for that particular path, but it isn't always possible to do this - in particular, if the path has a squiggle or a loop such that it no longer passes the so-called "vertical line test", you can't use the $x$ coordinate as a valid parameter. Similarly, if the path doesn't pass the "horizontal line test", then you can't use the $y$ coordinate as a valid parameter. I like to use a totally separate parameter $t$ which circumvents these issues and makes the parameterization clearer.

For a bit of enrichment, notice that we could have chosen a totally different path. What if we picked a crazy, loopy path like this?

$$\vec r(t) = \langle t+\cos(2\pi t)-1,\sin(2\pi t)\rangle \\ t \in [0,5]$$

Notice that this beast does not pass the horizontal or vertical line tests, so I certainly cannot parameterize this path by $x$ or $y$. However, I can use my parameter $t$ and everything works out just as before. It's a bit messy, but if you work it out you'll find that you get the same answer as before, and for good reason.

An arbitrary line integral needs to be equipped with a path along which the integration is taking place. However, for a special class of integrands, the value of the integral is independent of the path chosen. This is true whenever $\vec F$ can be written as the gradient of a scalar function,

$$\vec F = -\nabla U$$

where the minus sign is just a convention commonly used in physics. In such cases, $\vec F$ is called a conservative vector field, and

$$\int_A^B \vec F \cdot d \vec r = U(A)-U(B)$$

regardless of the path chosen. For your $\vec F$, we could pick $$U=-\frac{3}{2}x^2 - 2y^2$$ You can check to see that this yields the correct answer. When $\vec F$ is interpreted as a force, we call an associated function $U$ a potential energy function corresponding to that force.

But once again, vector fields are not generally conservative. When they are not, a line integral is not even defined until you've chosen a path (though you can parameterize that path in essentially whatever way you choose).

• I up voted your answer since I believe it'll be very useful to the OP. The important here are the gradient, the potential and that the integral is independent of the path. But I think that you might omit the full solutions because this is a homework like question, for example: the value of the integral and the potential $\:U\:$ leaving the OP to find out them by him(/her)self. – Frobenius Oct 4 '17 at 12:27