You are previewing A Physicist's Guide to Mathematica, 2nd Edition.
O'Reilly logo
A Physicist's Guide to Mathematica, 2nd Edition

Book Description

For the engineering and scientific professional, A Physicist’s Guide to Mathematica, 2e provides an updated reference guide based on the 2007 new 6.0 release, providing an organized and integrated desk reference with step-by-step instructions for the most commonly used features of the software as it applies to research in physics.

For professors teaching physics and other science courses using the Mathematica software, A Physicist’s Guide to Mathematica, 2e is the only fully compatible (new software release) Mathematica text that engages students by providing complete topic coverage, new applications, exercises and examples that enable the user to solve a wide range of physics problems.

• Does not require prior knowledge of Mathematica or computer programming
• Can be used as either a primary or supplemental text for upper-division physics majors and an Instructor’s Solutions Manual is available
• Provides over 450 end-of-section exercises and end-of-chapter problems
• Serves as a reference suitable for chemists, physical scientists, and engineers
• Compatible with Mathematica Version 6, a recent major release
• Compact disk contains all of the Mathematica input and output in this book

Table of Contents

  1. Copyright
    1. Dedication
  2. Preface to the Second Edition
  3. Preface to the First Edition
    1. Purpose
    2. Uses
    3. Organization
    4. Suggestions
    5. Prerequisites
    6. Computer Systems
    7. Acknowledgments
  4. I. Mathematica with Physics
    1. 1. The First Encounter
      1. 1.1. The First Ten Minutes
      2. 1.2. A Touch of Physics
        1. 1.2.1. Numerical Calculations
        2. 1.2.2. Symbolic Calculations
        3. 1.2.3. Graphics
      3. 1.3. Online Help
      4. 1.4. Warning Messages
      5. 1.5. Packages
      6. 1.6. Notebook Interfaces
        1. 1.6.1. Notebooks
        2. 1.6.2. Entering Greek Letters
        3. 1.6.3. Getting Help
        4. 1.6.4. Preparing Input
        5. 1.6.5. Starting and Aborting Calculations
      7. 1.7. Problems
    2. 2. Interactive Use of Mathematica
      1. 2.1. Numerical Capabilities
        1. 2.1.1. Arithmetic Operations
        2. 2.1.2. Spaces and Parentheses
        3. 2.1.3. Common Mathematical Constants
        4. 2.1.4. Some Mathematical Functions
        5. 2.1.5. Cases and Brackets
        6. 2.1.6. Ways to Refer to Previous Results
        7. 2.1.7. Standard Computations
        8. 2.1.8. Exact versus Approximate Values
        9. 2.1.9. Machine Precision versus Arbitrary Precision
        10. 2.1.10. Special Functions
        11. 2.1.11. Matrices
        12. 2.1.12. Double Square Brackets
        13. 2.1.13. Linear Least-Squares Fit
        14. 2.1.14. Complex Numbers
        15. 2.1.15. Random Numbers
        16. 2.1.16. Numerical Solution of Polynomial Equations
        17. 2.1.17. Numerical Integration
        18. 2.1.18. Numerical Solution of Differential Equations
        19. 2.1.19. Iterators
        20. 2.1.20. Exercises
      2. 2.2. Symbolic Capabilities
        1. 2.2.1. Transforming Algebraic Expressions
        2. 2.2.2. Transforming Trigonometric Expressions
        3. 2.2.3. Transforming Expressions Involving Special Functions
        4. 2.2.4. Using Assumptions
        5. 2.2.5. Obtaining Parts of Algebraic Expressions
        6. 2.2.6. Units, Conversion of Units, and Physical Constants
        7. 2.2.7. Assignments and Transformation Rules
        8. 2.2.8. Equation Solving
        9. 2.2.9. Differentiation
        10. 2.2.10. Integration
        11. 2.2.11. Sums
        12. 2.2.12. Power Series
        13. 2.2.13. Limits
        14. 2.2.14. Solving Differential Equations
        15. 2.2.15. Immediate versus Delayed Assignments and Transformation Rules
        16. 2.2.16. Defining Functions
        17. 2.2.17. Relational and Logical Operators
        18. 2.2.18. Fourier Transforms
        19. 2.2.19. Evaluating Subexpressions
        20. 2.2.20. Exercises
      3. 2.3. Graphical Capabilities
        1. 2.3.1. Two-Dimensional Graphics
          1. 2.3.1.1. Basic Plots
          2. 2.3.1.2. Options
          3. 2.3.1.3. Multiple Plots
          4. 2.3.1.4. FindRoot
          5. 2.3.1.5. FindMinimum and FindMaximum
          6. 2.3.1.6. Data Plots
          7. 2.3.1.7. Parametric Plots
          8. 2.3.1.8. Interactive Graphics Drawing
        2. 2.3.2. Three-Dimensional Graphics
          1. 2.3.2.1. Surface Plots
          2. 2.3.2.2. Viewpoint
        3. 2.3.3. Interactive Manipulation of Graphics
        4. 2.3.4. Animation
        5. 2.3.5. Exercise
      4. 2.4. Lists
        1. 2.4.1. Defining Lists
        2. 2.4.2. Generating and Displaying Lists
        3. 2.4.3. Counting List Elements
        4. 2.4.4. Obtaining List and Sublist Elements
        5. 2.4.5. Changing List and Sublist Elements
        6. 2.4.6. Rearranging Lists
        7. 2.4.7. Restructuring Lists
        8. 2.4.8. Combining Lists
        9. 2.4.9. Operating on Lists
        10. 2.4.10. Using Lists in Computations
        11. 2.4.11. Analyzing Data
          1. 2.4.11.1. Basic Error Analysis
          2. 2.4.11.2. Nonlinear Least-Squares Fit
          3. 2.4.11.3. Interpolation
        12. 2.4.12. Exercises
      5. 2.5. Special Characters, Two-Dimensional Forms, and Format Types
        1. 2.5.1. Special Characters
          1. 2.5.1.1. Ways to Enter Special Characters
          2. 2.5.1.2. Letters and Letterlike Forms
          3. 2.5.1.3. Operators
            1. Logical Operators
            2. Bracketing Operators
            3. Other Operators
          4. 2.5.1.4. Structural Elements and Spacing Characters
          5. 2.5.1.5. Similar-Looking Characters
        2. 2.5.2. Two-Dimensional Forms
          1. 2.5.2.1. Ways to Enter Two-Dimensional Forms
            1. Palettes
            2. Control Keys
            3. Ordinary Characters
            4. Create Table/Matrix
          2. 2.5.2.2. Some Two-Dimensional Forms with Built-in Meaning
          3. 2.5.2.3. Two-Dimensional Notation in Physics
        3. 2.5.3. Input and Output Forms
        4. 2.5.4. Exercises
      6. 2.6. Problems
    3. 3. Programming in Mathematica
      1. 3.1. Expressions
        1. 3.1.1. Atoms
        2. 3.1.2. Internal Representation
        3. 3.1.3. Manipulation
          1. 3.1.3.1. Obtaining Parts of Expressions
          2. 3.1.3.2. Changing Parts of Expressions
          3. 3.1.3.3. Rearranging Expressions
          4. 3.1.3.4. Restructuring Expressions
          5. 3.1.3.5. Operating on Expressions
          6. 3.1.3.6. Manipulating Equations
        4. 3.1.4. Exercises
      2. 3.2. Patterns
        1. 3.2.1. Blanks
        2. 3.2.2. Naming Patterns
        3. 3.2.3. Restricting Patterns
          1. 3.2.3.1. Types
          2. 3.2.3.2. Tests
          3. 3.2.3.3. Conditions
        4. 3.2.4. Structural Equivalence
        5. 3.2.5. Attributes
        6. 3.2.6. Defaults
        7. 3.2.7. Alternative or Repeated Patterns
        8. 3.2.8. Multiple Blanks
        9. 3.2.9. Exercises
      3. 3.3. Functions
        1. 3.3.1. Pure Functions
        2. 3.3.2. Selecting a Definition
        3. 3.3.3. Recursive Functions and Dynamic Programming
        4. 3.3.4. Functional Iterations
        5. 3.3.5. Protection
        6. 3.3.6. Upvalues and Downvalues
        7. 3.3.7. Exercises
      4. 3.4. Procedures
        1. 3.4.1. Local Symbols
        2. 3.4.2. Conditionals
        3. 3.4.3. Loops
          1. 3.4.3.1. Changing Values of Variables
          2. 3.4.3.2. Do, While, and For
        4. 3.4.4. Named Optional Arguments
        5. 3.4.5. An Example: Motion of a Particle in One Dimension
        6. 3.4.6. Exercises
      5. 3.5. Graphics
        1. 3.5.1. Graphics Objects
        2. 3.5.2. Two-Dimensional Graphics
          1. 3.5.2.1. Two-Dimensional Graphics Primitives
          2. 3.5.2.2. Two-Dimensional Graphics Directives
          3. 3.5.2.3. Two-Dimensional Graphics Options
          4. 3.5.2.4. Wave Motion
        3. 3.5.3. Three-Dimensional Graphics
          1. 3.5.3.1. Three-Dimensional Graphics Primitives
          2. 3.5.3.2. Three-Dimensional Graphics Directives
          3. 3.5.3.3. Three-Dimensional Graphics Options
          4. 3.5.3.4. Crystal Structure
        4. 3.5.4. Exercises
      6. 3.6. Programming Styles
        1. 3.6.1. Procedural Programming
        2. 3.6.2. Functional Programming
        3. 3.6.3. Rule-Based Programming
        4. 3.6.4. Exercises
      7. 3.7. Packages
        1. 3.7.1. Contexts
        2. 3.7.2. Context Manipulation
        3. 3.7.3. A Sample Package
          1. 3.7.3.1. The Problem
          2. 3.7.3.2. The Package
          3. 3.7.3.3. Analysis of the Package
        4. 3.7.4. Template for Packages
        5. 3.7.5. Exercises
  5. II. Physics with Mathematica
    1. 4. Mechanics
      1. 4.1. Falling Bodies
        1. 4.1.1. The Problem
        2. 4.1.2. Physics of the Problem
        3. 4.1.3. Solution with Mathematica
      2. 4.2. Projectile Motion
        1. 4.2.1. The Problem
        2. 4.2.2. Physics of the Problem
        3. 4.2.3. Solution with Mathematica
      3. 4.3. The Pendulum
        1. 4.3.1. The Problem
        2. 4.3.2. Physics of the Problem
          1. 4.3.2.1. The Plane Pendulum
          2. 4.3.2.2. The Damped Pendulum
          3. 4.3.2.3. The Damped, Driven Pendulum
        3. 4.3.3. Solution with Mathematica
          1. 4.3.3.1. The Plane Pendulum
          2. 4.3.3.2. The Damped Pendulum
          3. 4.3.3.3. The Damped, Driven Pendulum
          4. 4.3.3.4. ChaoticPendulum’: A Mathematica Package
      4. 4.4. The Spherical Pendulum
        1. 4.4.1. The Problem
        2. 4.4.2. Physics of the Problem
        3. 4.4.3. Solution with Mathematica
          1. 4.4.3.1. θ0 = 120, 0 = 0, ϕ0 = 45, 0 = 0
          2. 4.4.3.2. θ0 = 135, 0 = 0, ϕ0 = 90, 0 = 21/4
          3. 4.4.3.3. θ0 = 135, 0 = 2.5, ϕ0 = 90, 0 = 1.5 ×21/4
          4. 4.4.3.4. θ0 = 120, 0 = 0.75, ϕ0 = 90, 0 = 2.0 × 21/4
      5. 4.5. Problems
    2. 5. Electricity and Magnetism
      1. 5.1. Electric Field Lines and Equipotentials
        1. 5.1.1. The Problem
        2. 5.1.2. Physics of the Problem
          1. 5.1.2.1. Electric Field Lines
          2. 5.1.2.2. Equipotentials
          3. 5.1.2.3. Electric Field Lines and Equipotentials for Two Point Charges
        3. 5.1.3. Solution with Mathematica
          1. 5.1.3.1. q1 = q2 = + q
          2. 5.1.3.2. q1 = +2q and q2 = –q
      2. 5.2. Laplace’s Equation
        1. 5.2.1. The Problem
        2. 5.2.2. Physics of the Problem
          1. 5.2.2.1. Analytical Solution
          2. 5.2.2.2. Numerical Solution
        3. 5.2.3. Solution with Mathematica
          1. 5.2.3.1. Analytical Solution
          2. 5.2.3.2. Numerical Solution
      3. 5.3. Charged Particle in Crossed Electric and Magnetic Fields
        1. 5.3.1. The Problem
        2. 5.3.2. Physics of the Problem
        3. 5.3.3. Solution with Mathematica
      4. 5.4. Problems
    3. 6. Quantum Physics
      1. 6.1. Blackbody Radiation
        1. 6.1.1. The Problem
        2. 6.1.2. Physics of the Problem
        3. 6.1.3. Solution with Mathematica
          1. 6.1.3.1. u(λ, T) at Several Temperatures
          2. 6.1.3.2. Wien’s Displacement Law
          3. 6.1.3.3. λmax for Solar Radiation
      2. 6.2. Wave Packets
        1. 6.2.1. The Problem
        2. 6.2.2. Physics of the Problem
        3. 6.2.3. Solution with Mathematica
      3. 6.3. Particle in a One-Dimensional Box
        1. 6.3.1. The Problem
        2. 6.3.2. Physics of the Problem
        3. 6.3.3. Solution with Mathematica
          1. 6.3.3.1. Function Definitions
          2. 6.3.3.2. Animation
      4. 6.4. The Square Well Potential
        1. 6.4.1. The Problem
        2. 6.4.2. Physics of the Problem
          1. 6.4.2.1. Analytical Solution
          2. 6.4.2.2. Numerical Solution
        3. 6.4.3. Solution with Mathematica
          1. 6.4.3.1. Analytical Solution
          2. 6.4.3.2. Numerical Solution
      5. 6.5. Angular Momentum
        1. 6.5.1. The Problem
        2. 6.5.2. Physics of the Problem
          1. 6.5.2.1. Angular Momentum in Quantum Mechanics
          2. 6.5.2.2. Orbital Angular Momentum
          3. 6.5.2.3. The Eigenvalue Problem
        3. 6.5.3. Solution with Mathematica
      6. 6.6. The Kronig–Penney Model
        1. 6.6.1. The Problem
        2. 6.6.2. Physics of the Problem
        3. 6.6.3. Solution with Mathematica
      7. 6.7. Problems
  6. A. The Last Ten Minutes
  7. B. Operator Input Forms
  8. C. Solutions to Exercises
    1. Section 2.1.20
    2. Section 2.2.20
    3. Section 2.3.5
    4. Section 2.4.12
    5. Section 2.5.4
    6. Section 3.1.4
    7. Section 3.2.9
    8. Section 3.3.7
    9. Section 3.4.6
    10. Section 3.5.4
    11. Section 3.6.4
    12. Section 3.7.5
  9. D. Solutions to Problems
    1. Section 1.7
    2. Section 2.6
    3. Section 4.5
    4. Section 5.4
    5. Section 6.7
  10. References