Zaslat SMS: Analytical mechanics for relativity and quantum mechanics