Mathematical Physics I (Practical)

:: Home : CV : Teaching : Research : Publications : Presentations : Leisure ::




Study Materials

  • Gnuplot in Action understanding data and Graphs - Phillipp K. Janert.
  • Scientific Computing in Python - Abhijit Kar Gupta.
  • Physics in Laboratory including python Programming (Semester I) - Mandal, Chowdhury, Das, Das.
  • Introduction to Numerical Analysis - S.S. Sastry.
  • Numerical Methods - Arun Kr Jalan & Utpal Sarkar.
  • Numerical Mathematical Analysis - J. B. Scarborough.
  • Elementary Numerical Analysis - K.E. Atkinson.
  • An Introduction to computational Physics - T.Pang.
  • Learning with Python-how to think like a computer scientist - J. Elkner, C. Meyer, and A. Downey.
  • Gnuplot 5 - Lee Phillips.
  • Python Programming - Satyanarayana, Radhika Mani, Jagdesh.
  • Python 2.1 Bible - Dave Brueck, Stephen Tanner.
  • Computatioal Physics problem solving with Computers - Landau, Paez, Bordeianu.


  • Introduction to programming in python:
    • Introduction:
      • Using the python interpreter as a calculator.
      • Variable and data types (int, float, complex, list, tuple, string, the type() function).
      • Basic mathematical operations.
      • Compound statements in python:
        • Conditionals: if: elif: else:
        • Loops for:, while:
        • User defined functions def: [return statement, default values for arguments, keyword arguments]
      • Importing modules with math and cmath as examples.
      • Using online help.
      • Basic idea of namespaces-local and global.
      • Python scripts, I/O operations (including opening and writing to files).
    • The python iterables data type:
      • List:
        • Defining lists,reading and changing elements from lists, slicing (with discussion on the difference between ll=mm and ll=mm[:], concatenation, list comprehension.
        • built in functions involving lists: range(), len(), sum(), min(), max().
        • list methods: append(), extend(), count(), index(), sort(), insert(), pop(), remove(), reverse().
      • Tuples: Contrast and compare with lists, packing/unpacking using tuples (including a,b=b,a to swap variables).
      • Strings: defining strings, the use of single, double or triple quotes as string delimiters, len(), indexing, slicing, string concatanation, some string methods: strip(), split(), join(), find(), count(), replace(), string formatting in python (using the % operator).
    • Problems and applications:
      • Problem 0: Observe and interpret the result of the following two scripts
        • i=0; a=1; while a>0: i=i+1; a=a/2; print i;
        • i=0; a=1; b=1; while a+b>b: i=i+1; a=a/2; print i;
      • Problem 1: Root finding for a single variable (basic theory and algorithm).
        • Bisection method.
        • Newton-Raphson Method.
      • Problem 2: Sorting of lists (algorithm, flowchart and code).
        • Bubble sort.
        • Selection sort.
      • Problem 3: ODE in one and two dimensions using Euler algorithm (output to be saved in data files and gunuplot to be used to plot graphs).
        • Capacitor charging/discharging.
        • Simulating a half-wave rectifier with a capacitor filter.
        • Particle dynamics in 1D.
      • Problem 4: Matrix operations using list of lists.
        • Matrix Addition.
        • Matrix Multiplication.
        • Transpose of a Matrix.