# Calculating lagrangian density from first principle

In most of the field theory text they will start with lagrangian density for spin 1 and spin 1/2 particles. But i could find any text where this lagrangian density is derived from first principle.

Seek for 'Klein-Gordon equation' and 'Dirac equation' - they can be found in any textbook concerning basic relativistic quantum mechanics (such as, e.g. Landau ). Klein-Gordon (spin=0 and any natural spin after modifications) comes directly from the energy-momentum conservation of special relativity $p_\mu p^{\mu} = -m^2$, whereas Dirac equation for fractional spins is guessed as 'square root' of Klein-Gordon (in certain sense).
The "first principle" for any Lagrangian is the corresponding equation. If you advance, for any particular reason, an equation, you may construct its Lagrangian knowing the structure of the Lagrange equations:$$\frac{d}{dt}\frac{\partial L}{\partial \dot {\phi}}=\frac{\partial L}{\partial {\phi}}$$