What Is Generalized Momentum

This section provides a quick introduction to generalized momentum, which is defined as a vector of partial derivatives of Lagrangian against generalized velocity components.

If we want to express Hamiltonian in terms of position and momentum in generalized coordinates, we needed to transform the ordinary momentum of p = m*v into the generalized momentum.

One way to define the generalized momentum is to use partial derivatives of Lagrangian against generalized velocity.

```p = ∂L/∂q'
# p is the generalized momentum
# q' is the generalized velocity
# L is the Lagrangian
```

As a comparison, here is the definition of the ordinary momentum.

```p = m*r'
# p is the mechanical momentum
# m is the mass
# r' is the velocity in Cartesian coordinates
```

Note that we are using the sample symbol p to represent both mechanical momentum and generalized momentum. You need to differentiate them by looking the context where it is used.

By the way, the ordinary momentum is also called the mechanical momentum or kinematic momentum.

If we use Cartesian coordinates for conservative system, the generalized momentum is the same as the ordinary momentum as shown below.

```p = ∂L/∂q'

or:
p = ∂L/∂r'
# q' = r' in Cartesian coordinates

or:
p = ∂(0.5*m*|r'|2 - V(r))/∂r'
# Since L = 0.5*m*|r'|2 - V(r)

or:
p = ∂(0.5*m*|r'|2)/∂r'
# Since ∂(V(r))/∂r' = 0

or:
p = m*r'
# It matches the ordinary momentum definition.
```