Mathematical Physics II (Practical)

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

### Study Materials

1. Numerical Methods - Arun Kr Jalan & Utpal Sarkar.
2. Scientific Computing in Python - Abhijit Kar Gupta.
3. Physics in Laboratory including python Programming (Semester III) - Mandal, Chowdhuri, Das, Das.
4. Matplotlib Plotting Cookbook - Alexandre Devert.
5. Programming for Computation-Python - Svein Linge & Hans Petter Lantangen.
6. Numerical Python - Robert Johansson.
7. Introduction to Numerical Analysis - S.S. Sastry.
8. Elementary Numerical Analysis - K.E. Atkinson.
9. An Introduction to computational Physics - T.Pang.
10. Computatioal Physics problem solving with Computers - Landau, Paez, Bordeianu.
11. Numpy beginners guide - Idris Alba.
12. Computational Physics - D.Walker.

### Topics

1. Introduction to numpy and scipy:
• The numpy array:
• properties: size, shape, ndim, dtype.
• creating arrays:
• zeros, one(), full(), fill().
• arange(),linspace(),logspace().
• identity(), eye().
• astype().
• Indexing and slicing arrays (view versus copy).
• Important array methods:
• reshape(), ravel(), flatten().
• hstack() and vstack().
• Element wise functions:native numpy functions,the vectorise() method.
• Aggregate functions np.sum(),np.prod(),np.mean(),np.std(),np.var(),np.min(),np.max(), np.argmin(), np.argmax().
• Using numpy for matrix operators (the 2D numpy array):
• Gauss elemination (using partial pivoting)(numpy code):
• for evaluating the determinant.
• for solving linear equation.
• The numpy linalg module:
• solving equations: (a) mesh equations of electric circuits (3 meshes), (b) coupled spring mass systems (3 masses).
• diagonalisation.
• Scientific Applications:
• Interpolation: Using both numpy and scipy.interpolate(for visualization of the results use matplotlib) -basic numerical analysis theory to be explained.
• Lagrange Interpolation.
• Newton Forward Interpolation.
• Numerical Integration:(for both functions and equi-spaced data):
• Trapezoidal rule.
• Simpson’s one-third rule. Using both numpy and scipy.integrate.quad(), scipy.integrate.trapz(), scipy.intgrate.simps() - basic numerical analysis theory to be explained.
• Numerical Integration by n-point Gaussian Quadrature method. [Basic theory and numpy code - nodes and weights to be read from files, Integration by scipy.integrate.quad().]
• Solution of ODE:
• Solution of 1st order and 2nd order ordinary differential equation using 4th order Runge Kutta (RK4) algorithm [algorithm and numpy code - detailed theory not required]
• Curve fitting:
• With numpy polynomials.
• With user defined functions using scipy.optimize module.
2. Introduction to matplotlib (Using the pyplot submodule):
• figure, axes, subplot.
• plot(), scatter(), show().
• labels, legends, titles, styles, ticks.
• dynamically updating curves.
• saving graphs.

### Remarks

1. Question Set for a few years.
2. Use Pydriod from Android PlayStore to practice codes on your cellphone.