We have found that when the forces can be described by a potential energy function it is straightforward to use the Lagrangian techniques to find the equations of motion. Given a set of force, how can we determine the potential function? How can we determine whether there is a potential function?

## Some Examples

Let's do an example,

$F_x = - \frac{k x}{\left ( x^2 + y^2 \right )^{3/2}},$ $F_y = - \frac{k y}{\left ( x^2 + y^2 \right )^{3/2}}.$

How much work does the force do moving from $(x_0,y_0)$ to $(x,y)$?

$W = \int_{(x_0,y_0)}^{(x,y)} \left( F_x dx + F_y dy \right ) = \int_{(x_0,y_0)}^{(x,y)} \left( -\frac{k x}{\left ( x^2 + y^2 \right )^{3/2}} dx - \frac{k y}{\left ( x^2 + y^2 \right )^{3/2}} dy \right )$

If we look at the two terms, let's try to integrate each one with respect to $x$ and $y$.

$F_x = \frac{\partial}{\partial x} \left [ \frac{k}{\left (x^2 + y^2 \right)^{1/2}} \right ]$ and $F_y = \frac{\partial}{\partial y} \left [ \frac{k}{\left (x^2 + y^2 \right)^{1/2}} \right ].$

They are both derivatives of the same function

$\frac{k}{\left (x^2 + y^2 \right)^{1/2}} .$

Let's calculate the total derivative of the function

$d \left [ \frac{k}{\left (x^2 + y^2 \right)^{1/2}} \right ] = -\frac{k x}{\left ( x^2 + y^2 \right )^{3/2}} dx - \frac{k y}{\left ( x^2 + y^2 \right )^{3/2}} dy$

and substitute it back into the integral

$W = \int_{(x_0,y_0)}^{(x,y)} \left( F_x dx + F_y dy \right ) = \int_{(x_0,y_0)}^{(x,y)} d \left [ \frac{k}{\left (x^2 + y^2 \right)^{1/2}} \right ] = \frac{k}{\left (x^2 + y^2 \right)^{1/2}} - \frac{k}{\left (x_0^2 + y_0^2 \right)^{1/2}}$

The integral does not depend on path. We could write

$F_x = -\frac{\partial V}{\partial x}$ and $F_y = -\frac{\partial V}{\partial y}$ with $V = -\frac{k}{\left (x^2 + y^2 \right)^{1/2}}.$

What about $F_x = 3 B x^2 y^2$ and $F_y = 2 B x^3 y$?

What about $F_x = a x y$ and $F_y = b x y$?

• If the forces are such that the work done when the system is moved from one configuration to another only depends on the initial and final configurations, then the force is conservative.

### Dry Friction

The force of friction between two dry surfaces is proportional to the normal force between the surfaces in a direction that opposes the relative motion between the surfaces. For an object resting on a surface we have $F=\mu m g$ that we can resolve into components as

$F_x = -\mu m g \frac{dx}{ds}$

and

$F_y = -\mu m g \frac{dy}{ds}.$

Let's write out the work done by the force,

$W = \int \left ( F_x dx + F_y dy \right ) = -\mu m g \int \left ( \frac{dx}{ds} dx + \frac{dy}{ds} dy \right )$

$= -\mu m g \int \left ( \frac{dx}{ds} \frac{dx}{ds} ds + \frac{dy}{ds} \frac{dy}{ds} \right ) = -\mu m g \int ds = -\mu m g s$

where $s$ is the length of the path. In particular, the work done by the frictional path does not necessarily vanish over a closed path.

## The Potential Energy

In general,

$V = - \int_{x_i^0,y_i^0,z_i^0}^{x_i,y_i,z_i} \sum_{i=1}^p \left ( F_{x_i} d x_i + F_{y_i} d y_i +F_{z_i} d z_i \right )$

where $i$ counts over the various particles. Specifically, $F_{x_i}$ is the force on particle $i$ in the $x-$direction.

For this to be true,

$F_{x_i} = -\frac{\partial V}{\partial x_i},$ $F_{y_i} = -\frac{\partial V}{\partial y_i},$ $F_{z_i} = -\frac{\partial V}{\partial z_i}.$

So let's calculate for example

$\frac{\partial F_{x_3}}{\partial y_4} = - \frac{\partial^2 V}{\partial y_4 \partial x_3} = \frac{\partial F_{y_3}}{\partial x_3}.$

If the forces are conservative, then the partial derivatives of the forces are equal to each other. This is a quick way to check whether the forces are indeed conservative!

We can make some observativions from this result. First, if the force varies only along the direction that it points, then the force is conservative. An important example of this is the central force. Second, if and only if the curl of the force is zero, the force is conservative.

## Why calculate $V$?

It takes quite a bit of effort to calculate the potential energy. Why don't we just use the forces directly?

1. You can use the transformation rules to find the generalized forces
$F_{q_r} = \sum_i F_{x_i} \frac{\partial x_i}{\partial q_r}$
but this is really ugly and could be even more effort than finding the potential energy.
2. Calculate $V$ in whatever coordinates are convenient and then transform the coordinates so
$F_{q_r} = -\frac{\partial V}{\partial q_r}$.
3. Sometimes you can get $V$ by inspection.
4. The generalized forces for $V$ and $V+C$ are the same so you can drop any constant term. For example, we can write
$V=mgr\left (1- \cos\theta\right), mg \left (l - r\cos\theta\right ), -mgr \cos \theta$
for the potential energy of a pendulum.

## Do conservative systems conserve energy?

Conservative systems are those which you can write the force as the gradient for a potential function. We have seen forces where this is not the case: dry friction and a particle in magnetic field. In the first case we have a non-conservative force that does not conserve energy. In the second case, we have a non-conservative force that does conserve energy.

It is straightforward to come up with an example for a conservative force that does not conserve energy. Specifically we could have $\vec F = -\vec \nabla V \left (\vec r, t\right ).$ Because the Lagrangian now depends on time explicitly, the Hamiltonian is no longer conserved.

### Jiggly Pendulum

Coordinates for the jiggly pendulum

Let's write down the Cartesian coordinates of the bob of mass $m$,

$\vec x = \left [ l \sin\theta, z(t)-l \cos\theta \right ] .$

Taking the time derivative of the position gives the velocity

$\vec v = \dot \vec x = \left [ l \dot \theta \cos\theta, \dot z(t)+l \dot \theta \sin\theta \right ] .$

Using these results we can calculate the kinetic energy of the bob

$T = \frac{1}{2} m v^2 = \frac{m}{2} \left [ l^2 \dot \theta^2 \cos^2 \theta + \left ( \dot z(t) + l \dot \theta \sin\theta \right )^2 \right ]$

$= \frac{m}{2} \left ( l^2 \dot \theta^2 + \dot z(t)^2 + 2 l \dot\theta \dot z(t) \sin \theta \right )$

and the potential energy

$V = m g \left ( z(t) - l \cos \theta \right ).$

For this system we have $\partial L/\partial t \neq 0$ so $d H/d t \neq 0$; however, we can define a potential energy so the system is conservative.