A Multipurpose Computer-Algebra Program for Classical and Quantum Physics