Department of Mathematics, University of Delhi
Teaching Plan: DSE courses for B.A. (Prog.) /B.Sc. (Physical Sc.) with
Mathematics, and Generic Electives, Semester-5
DSE-1(iii)/DSE-3(ii)/GE-5(ii): Mathematical Python
Weeks 1 and 2: Review of Python fundamentals; Drawing diverse shapes using code and Turtle.
[2]: Chapter 1 (Review: Fundamentals of Python).
[1]: Chapters 1 to 3.
Weeks 3 and 4: Using matplotlib and NumPy for data organization, Structuring and plotting lines, bars,
markers, contours and fields, managing subplots and axes; Pyplot and subplots.
[3]: Chapter 2 (up to page 45).
• https://patrickwalls.github.io/mathematicalpython/scipy/numpy/
• https://patrickwalls.github.io/mathematicalpython/scipy/matplotlib/
• https://matplotlib.org/stable/gallery/lines_bars_and_markers/index.html
• https://matplotlib.org/stable/gallery/images_contours_and_fields/index.html
• https://matplotlib.org/stable/gallery/subplots_axes_and_figures/index.html
• https://matplotlib.org/stable/tutorials/introductory/pyplot.html
Week 5: Animations of decay, Bayes, Random walk.
[3]: Chapter 5 (Generating random numbers, pages 134 to 139; page 136 is optional).
• https://matplotlib.org/stable/gallery/animation/index.html
• https://matplotlib.org/stable/gallery/animation/animate_decay.html
• https://matplotlib.org/stable/gallery/animation/bayes_update.html
• https://matplotlib.org/stable/gallery/animation/random_walk.html
Week 6: NumPy for scalars and linear algebra on n-dimensional arrays; Computing eigenspace.
[2]: Chapter 4 (pages 226 to 229).
• https://numpy.org/numpy-tutorials/content/tutorial-svd.html
• https://patrickwalls.github.io/mathematicalpython/linear-algebra/eigenvalues-eigenvectors/
Week 7: Solving dynamical systems on coupled ordinary differential equations, Functional programming
update fundamentals using NumPy.
• https://patrickwalls.github.io/mathematicalpython/differential-equations/first-order/
• https://patrickwalls.github.io/mathematicalpython/differential-equations/systems/
• https://realpython.com/python-functional-programming/
Weeks 8 and 9: Symbolic computation and SymPy: Differentiation and integration of functions, Limits.
[3]: Chapter 4 (up to page 96), and Chapter 7.
• https://docs.sympy.org/latest/guides/index.html
• https://docs.sympy.org/latest/tutorials/intro-tutorial/calculus.html
Week 10: Solution of ordinary differential equations, Computation of eigenvalues, Solution of expressions
at multiple points (lambdify).
• https://docs.sympy.org/latest/guides/solving/solve-ode.html
• https://docs.sympy.org/latest/tutorials/intro-tutorial/matrices.html
• https://docs.sympy.org/latest/modules/utilities/lambdify.html
Page | 11
Department of Mathematics, University of Delhi
Week 11: Simplification of expressions, Factorization, Collecting and canceling terms, Partial fraction
decomposition, Trigonometric simplification, Exponential and logarithms, Series expansion and finite
differences, Solvers, Recursive equations.
[3]: Chapter 4
[2]: Chapter 5.
[1]: Chapter 6, and 10.
• https://docs.sympy.org/latest/modules/solvers/solvers.html
Weeks 12 and 13: Pretty printing using SymPy; Pandas API for IO tools: interfacing Python with text/csv,
HTML, LaTeX, XML, MSExcel, OpenDocument, and other such formats.
[3]: Chapter 4 (pages 97-100).
• https://docs.sympy.org/latest/tutorials/intro-tutorial/printing.html
[2]: Chapter 2 (pages 73-83).
• https://pandas.pydata.org/docs/user_guide/io.html
Week 14 and 15: PyLaTeX and writing document files from Python with auto-computed values, Plots and
visualizations.
• https://pypi.org/project/PyLaTeX/
• https://matplotlib.org/stable/tutorials/text/usetex.html
• https://pandas.pydata.org/docs/user_guide/visualization.html
Essential Readings
1. Farrell, Peter (2019). Math Adventures with Python. No Starch Press. ISBN Number: 978- 1-59327-867-0.
2. Farrell, Peter et al. (2020). The Statistics and Calculus with Python Workshop. Packet Publishing Ltd.
ISBN: 978-1-80020-976-3.
3. Saha, Amit (2015). Doing Math with Python. No Starch Press. ISBN: 978-1-59327-640-9
Computer Lab work:
Weeks 1 to 4:
• Spyder Environment preparation with download, installation of required components.
• Implementation of turtle draw for polygonal shapes.
• Using lists and loops for common functions.
• List manipulation.
• Animating objects.
• Interactive grid.
• Drawing complex patterns.
Week 5: Animated plots for solution of problems: decay function w. r. t. time, conditional probability and
bayes rule, random walk.
Week 6: Solution of linear algebra problems: Systems of equations, eigenvalues and eigenvectors.
Week 7: Newton’s law of cooling, Coupled ODEs with initial conditions.
Weeks 8 and 9: Examples of limits, differentiation and integration of functions.
Weeks 10 to 15: Examples from text references, and similar to those from online sources.
Page | 12