Mathematica® for Theoretical Physics www.com ® Mathematica for Theoretical Physics Classical Mechanics and Nonlinear Dynamics Second Edition Gerd Baumann CD-ROM Included www.com Gerd Baumann Department of Mathematics German University in Cairo GUC New Cairo City Main Entrance of Al Tagamoa Al Khames Egypt Gerd.eg This is a translated, expanded, and updated version of the original German version of the work “Mathematica® in der Theoretischen Physik,” published by Springer-Verlag Heidelberg, 1993 ©. Library of Congress Cataloging-in-Publication Data Baumann, Gerd. [Mathematica in der theoretischen Physik. English] Mathematica for theoretical physics / by Gerd Baumann.
Includes bibliographical references and index. Classical mechanics and nonlinear dynamics — 2. Electrodynamics, quantum mechanics, general relativity, and fractals. Mathematical physics—Data processing.285′53—dc22 2004046861 ISBN-10: 0-387-01674-0 e-ISBN 0-387-25113-8 Printed on acid-free paper.
ISBN-13: 978-0387-01674-0 © 2005 Springer Science+Business Media, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science+Business Media, Inc., 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, com- puter software, or by similar or dissimilar methodology now known or hereafter developed is for- bidden.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Mathematica, MathLink, and Math Source are registered trademarks of Wolfram Research, Inc. Printed in the United States of America.com To Carin, for her love, support, and encuragement.com Preface As physicists, mathematicians or engineers, we are all involved with mathematical calculations in our everyday work. Most of the laborious, complicated, and time-consuming calculations have to be done over and over again if we want to check the validity of our assumptions and derive new phenomena from changing models.
Even in the age of computers, we often use paper and pencil to do our calculations. However, computer programs like Mathematica have revolutionized our working methods. Mathematica not only supports popular numerical calculations but also enables us to do exact analytical calculations by computer. Once we know the analytical representations of physical phenomena, we are able to use Mathematica to create graphical representations of these relations.
Days of calculations by hand have shrunk to minutes by using Mathematica. Results can be verified within a few seconds, a task that took hours if not days in the past. The present text uses Mathematica as a tool to discuss and to solve examples from physics. The intention of this book is to demonstrate the usefulness of Mathematica in everyday applications.
We will not give a complete description of its syntax but demonstrate by examples the use of its language. In particular, we show how this modern tool is used to solve classical problems.com viii Preface This second edition of Mathematica in Theoretical Physics seeks to prevent the objectives and emphasis of the previous edition. It is extended to include a full course in classical mechanics, new examples in quantum mechanics, and measurement methods for fractals. In addition, there is an extension of the fractal's chapter by a fractional calculus.
The additional material and examples enlarged the text so much that we decided to divide the book in two volumes. The first volume covers classical mechanics and nonlinear dynamics. The second volume starts with electrodynamics, adds quantum mechanics and general relativity, and ends with fractals. Because of the inclusion of new materials, it was necessary to restructure the text.
The main differences are concerned with the chapter on nonlinear dynamics. This chapter discusses mainly classical field theory and, thus, it was appropriate to locate it in line with the classical mechanics chapter. The text contains a large number of examples that are solvable using Mathematica. The defined functions and packages are available on CD accompanying each of the two volumes.
The names of the files on the CD carry the names of their respective chapters. Chapter 1 comments on the basic properties of Mathematica using examples from different fields of physics. Chapter 2 demonstrates the use of Mathematica in a step-by-step procedure applied to mechanical problems. Chapter 2 contains a one-term lecture in mechanics.
It starts with the basic definitions, goes on with Newton's mechanics, discusses the Lagrange and Hamilton representation of mechanics, and ends with the rigid body motion. We show how Mathematica is used to simplify our work and to support and derive solutions for specific problems. In Chapter 3, we examine nonlinear phenomena of the Korteweg–de Vries equation. We demonstrate that Mathematica is an appropriate tool to derive numerical and analytical solutions even for nonlinear equations of motion.
The second volume starts with Chapter 4, discussing problems of electrostatics and the motion of ions in an electromagnetic field. We further introduce Mathematica functions that are closely related to the theoretical considerations of the selected problems. In Chapter 5, we discuss problems of quantum mechanics. We examine the dynamics of a free particle by the example of the time-dependent Schrödinger equation and study one-dimensional eigenvalue problems using the analytic and www.com Preface ix numeric capabilities of Mathematica.
Problems of general relativity are discussed in Chapter 6. Most standard books on Einstein's theory discuss the phenomena of general relativity by using approximations. With Mathematica, general relativity effects like the shift of the perihelion can be tracked with precision. Finally, the last chapter, Chapter 7, uses computer algebra to represent fractals and gives an introduction to the spatial renormalization theory.
In addition, we present the basics of fractional calculus approaching fractals from the analytic side. This approach is supported by a package, FractionalCalculus, which is not included in this project. The package is available by request from the author. Exercises with which Mathematica can be used for modified applications.
Chapters 2–7 include at the end some exercises allowing the reader to carry out his own experiments with the book. Acknowledgments Since the first printing of this text, many people made valuable contributions and gave excellent input. Because the number of responses are so numerous, I give my thanks to all who contributed by remarks and enhancements to the text. Concerning the historical pictures used in the text, I acknowledge the support of the http://www-gapdcs.uk/~history/ webserver of the University of St Andrews, Scotland.
My special thanks go to Norbert Südland, who made the package FractionalCalculus available for this text. I'm also indebted to Hans Kölsch and Virginia Lipscy, Springer-Verlag New York Physics editorial. Finally, the author deeply appreciates the understanding and support of his wife, Carin, and daughter, Andrea, during the preparation of the book. Ulm, Winter 2004 Gerd Baumann www.com Contents Volume I Preface vii 1 Introduction 1 1.1 Structure of Mathematica 2 1.2 Interactive Use of Mathematica 4 1.6 Programming 23 2 Classical Mechanics 31 2.3 Coordinate Transformations and Matrices 38 2.com xii Contents 2.2 Frame of Reference 98 2.6 Forces in Nature 106 2.8 Application of Newton's Second Law 118 2.10 Packages and Programs 188 2.3 Central Field Motion 208 2.4 Two-Particle Collisons and Scattering 240 2.6 Packages and Programs 273 2.6 Calculus of Variations 274 2.2 The Problem of Variations 276 2.5 Algorithm Used in the Calculus of Variations 284 2.6 Euler Operator for q Dependent Variables 293 2.7 Euler Operator for q + p Dimensions 296 2.8 Variations with Constraints 300 2.10 Packages and Programs 303 2.2 Hamilton's Principle Hisorical Remarks 306 www.com Contents xiii 2.4 Symmetries and Conservation Laws 341 2.6 Packages and Programs 351 2.3 Hamilton's Equation of Motion 362 2.4 Hamilton's Equations and the Calculus of Variation 366 2.7 Manifolds and Classes 384 2.12 Packages and Programs 419 2.2 Discrete Mappings and Hamiltonians 431 2.2 The Inertia Tensor 450 2.3 The Angular Momentum 453 2.4 Principal Axes of Inertia 454 2.6 Euler's Equations of Motion 462 2.7 Force-Free Motion of a Symmetrical Top 467 2.8 Motion of a Symmetrical Top in a Force Field 471 2.10 Packages and Programms 481 3 Nonlinear Dynamics 485 3.2 The Korteweg–de Vries Equation 488 3.3 Solution of the Korteweg-de Vries Equation 492 www.com xiv Contents 3.1 The Inverse Scattering Transform 492 3.2 Soliton Solutions of the Korteweg–de Vries Equation 498 3.4 Conservation Laws of the Korteweg–de Vries Equation 505 3.1 Definition of Conservation Laws 506 3.2 Derivation of Conservation Laws 508 3.5 Numerical Solution of the Korteweg–de Vries Equation 511 3.7 Packages and Programs 516 3.1 Solution of the KdV Equation 516 3.2 Conservation Laws for the KdV Equation 517 3.3 Numerical Solution of the KdV Equation 518 References 521 Index 529 Volume II Preface vii 4 Electrodynamics 545 4.2 Potential and Electric Field of Discrete Charge Distributions 548 4.3 Boundary Problem of Electrostatics 555 4.4 Two Ions in the Penning Trap 566 4.1 The Center of Mass Motion 569 4.2 Relative Motion of the Ions 572 4.6 Packages and Programs 578 4.3 Penning Trap 582 5 Quantum Mechanics 587 5.2 The Schrödinger Equation 590 www.com Contents xv 5.3 One-Dimensional Potential 595 5.4 The Harmonic Oscillator 609 5.6 Motion in the Central Force Field 631 5.7 Second Virial Coefficient and Its Quantum Corrections 642 5.1 The SVC and Its Relation to Thermodynamic Properties 644 5.2 Calculation of the Classical SVC Bc HTL for the H2 n - nL -Potential 646 5.3 Quantum Mechanical Corrections Bq1 HTL and Bq2 HTL of the SVC 655 5.4 Shape Dependence of the Boyle Temperature 680 5.5 The High-Temperature Partition Function for Diatomic Molecules 684 5.9 Packages and Programs 688 5.4 CentralField 698 6 General Relativity 703 6.2 The Orbits in General Relativity 707 6.3 Light Bending in the Gravitational Field 720 6.4 Einstein's Field Equations (Vacuum Case) 725 6.1 Examples for Metric Tensors 727 6.2 The Christoffel Symbols 731 6.3 The Riemann Tensor 731 6.4 Einstein's Field Equations 733 6.5 The Cartesian Space 734 6.6 Cartesian Space in Cylindrical Coordinates 736 6.7 Euclidean Space in Polar Coordinates 737 6.5 The Schwarzschild Solution 739 6.1 The Schwarzschild Metric in Eddington–Finkelstein Form 739 www.com xvi Contents 6.3 Schwarzschild Metric in Kruskal Coordinates 748 6.6 The Reissner–Nordstrom Solution for a Charged Mass Point 752 6.8 Packages and Programs 761 6.3 The Koch Curve 790 7.1 Multifractals with Common Scaling Factor 798 7.5 The Renormlization Group 801 7.1 Historical Remarks on Fractional Calculus 810 7.2 The Riemann–Liouville Calculus 813 7.4 Fractional Differential Equations 856 7.8 Packages and Programs 883 7.5 Fractional Calculus 897 Appendix 899 A.2 Glossary of Files and Functions 900 A.3 Mathematica Functions 910 References 923 Index 931 www.com 1 Introduction This first chapter introduces some basic information on the computer algebra system Mathematica.
We will discuss the capabilities and the scope of Mathematica. Some simple examples demonstrate how Mathematica is used to solve problems by using a computer. All of the following sections contain theoretical background information on the problem and a Mathematica realization. The combination of both the classical and the computer algebra approach are given to allow a comparison between the traditional solution of problems with pencil and paper and the new approach by a computer algebra system.1 Basics Mathematica is a computer algebra system which allows the following calculations: æ symbolic www.
Introduction æ numeric æ graphical æ acoustic. Mathematica was developed by Stephen Wolfram in the 1980s and is now available for more than 15 years on a large number of computers for different operating systems (PC, HP, SGI, SUN, NeXT, VAX, etc. The real strength of Mathematica is the capability of creating customized applications by using its interactive definitions in a notebook. This capability allows us to solve physical and engineering problems directly on the computer.
Before discussing the solution steps for several problems of theoretical physics, we will present a short overview of the organization of Mathematica.1 Structure of Mathematica Mathematica and its parts consist of five main components (see figure 1.