# Lagrangian formalism

The Lagrangian formalism of mechanics is based on the axioms, postulates and principles posed in the [Newtonian formalism](/en/physics/mechanics/newtonian-mechanics/newtonian-formalism/).

## Configuration of a system

Considering a system of $n \in \mathbb{R}$ point masses $m_i \in \mathbb{R}$ with positions $\mathbf{x}_i \in \mathbb{R}^m$ in dimension $m \in \mathbb{N}$, for $i \in \mathbb{N}[i \leq n]$. 

> *Definition 1*: the set of positions $\{\mathbf{x}_i\}_{i=1}^n$ is defined as the configuration of the system.

Obtaining a $n m$ dimensional configuration space of the system.

> *Definition 2*: let $N = nm$, the set of time dependent coordinates $\{q_i: t \mapsto q_i(t)\}_{i=1}^N$ at a time $t \in \mathbb{R}$ is a point in the $N$ dimensional configuration space of the system.

<br>

> *Definition 3*: let the generalized coordinates be a minimal set of coordinates which are sufficient to specify the configuration of a system completely and uniquely. 

The minimum required number of generalized coordinates is called the number of degrees of freedom of the system. 

## Classification of constraints

> *Definition 4*: geometric constraints define the range of the positions $\{\mathbf{x}_i\}_{i=1}^n$. 

<br>

> *Definition 5*: holonomic constraints are defined as constraints that can be formulated as an equation of generalized coordinates and time.

Let $g: (q_1, \dots, q_N, t) \mapsto g(q_1, \dots, q_N, t) = 0$ is an example of a holonomic constraint.

> *Definition 6*: a constraint that depends on velocities is defined as a kinematic constraint.

If the kinematic constrain is integrable and can be formulated as a holonomic constraint it is referred to as a integrable kinematic constraint.

> *Definition 7*: a constraint that explicitly depends on time is defined as a rheonomic constraint. Otherwise the constraint is defined as a sklerenomic constraint.

If a system of $n$ point masses is subject to $k$ indepent holonomic constraints, then these $k$ equations can be used to eliminate $k$ of the $N$ coordinates. Therefore there remain $f \overset{\mathrm{def}}= N - k$ "independent" generalized coordinates.

## Generalizations

> *Definition 8*: the set of generalized velocities $\{q_i'\}_{i=1}^N$ at a time $t \in \mathbb{R}$ is the velocity at a point along its trajectory through configuration space.

The position of each point mass may be given by

$$
    \mathbf{x}_i: \mathbf{q} \mapsto \mathbf{x}_i(\mathbf{q}),
$$

with $\mathbf{q} = \{q_i\}_{i=1}^f$ generalized coordinates.

Therefore the velocity of each point mass is given by

$$
    \mathbf{x}_i'(\mathbf{q}) = \sum_{r=1}^f \partial_r \mathbf{x}_i(\mathbf{q}) q_r',
$$

for all $t \in \mathbb{R}$ (inexplicitly). 

> *Theorem 1*: the total kinetic energy $T: (\mathbf{q}, \mathbf{q}') \mapsto T(\mathbf{q}, \mathbf{q}')$ of the system is given by
>
> $$
>   T(\mathbf{q}, \mathbf{q}') = \sum_{r,s=1}^f a_{rs}(\mathbf{q}) q_r' q_s',
> $$
>
> with
>
> $$
>   a_{rs}(\mathbf{q}) = \sum_{i=1}^n \frac{1}{2} m_i \Big\langle \partial_r \mathbf{x}_i(\mathbf{q}), \partial_s \mathbf{x}_i(\mathbf{q}) \Big\rangle,
> $$
>
> for all $t \in \mathbb{R}$.

??? note "*Proof*:"

    Will be added later.