\delta S=\left[\frac{\partial L}{\partial \dot{q}}\delta q\right]_{t_1}^{t_2}+\int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}-\frac{\dd{}}{\dd{t}}\frac{\partial L}{\partial \dot{q}}\right)\delta q \dd{t}=0
