0% found this document useful (0 votes)
22 views3 pages

Numerical Analysis with Python

The document outlines a course on Numerical Analysis with Python, covering various mathematical concepts and programming techniques across five units. Topics include Python basics, data visualization, symbolic math, numerical methods for equations, and integration techniques, with a focus on practical programming assignments. Evaluation consists of theory and practical exams, continuous assessment, and a requirement for students to maintain a program record.

Uploaded by

Preenu C Sasi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Numerical Analysis with Python

The document outlines a course on Numerical Analysis with Python, covering various mathematical concepts and programming techniques across five units. Topics include Python basics, data visualization, symbolic math, numerical methods for equations, and integration techniques, with a focus on practical programming assignments. Evaluation consists of theory and practical exams, continuous assessment, and a requirement for students to maintain a program record.

Uploaded by

Preenu C Sasi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MM 233 NUMERICAL ANALYSIS WITH PYTHON (Elective)*

Texts:
[Link] L. Ceder, The Quick Python Book, Second Edition, Manning.

[Link] L. Burden and J. Douglas Faires, Numerical Analysis, Ninth Edition,

Brooks/Cole, Cengage Learning.


[Link] Saha, Doing Math with Python, No Starch Press, 2015.

Unit I

In this unit we discuss the basics of python based on chapters 4,5,6,8, 9, 10 and 18 of Text 1. All
topics of chapters 4-9 must be dicussed using exmples from mathematics. In chapter 10, only
sections 10.1-10.4 need to be discussed. Chapter 18 also shoud be discussed to get an overview of
the packages in python. The students should be encouraged to write programs related with
mathematical problems. (Some of the problmes are listed in the syllabus)

Unit II

Visualizing Data with Graphs - learn a powerful way to present numerical data: by drawing graphs
with Python. The unit is based on Chapter 2 of Text 3. The sections Creating Graphs with Matplotlib
and Plotting with Formulas must be done in full. In the section Programming Challenges, the
problems Exploring a Quadratic Function Visually, Visualizing Your Expenses and Exploring the
Relationship Between the Fibonacci Sequence and the Golden Ratio must also be discussed.

Unit III

The unit is based on chapters 4 and 7 of Text 3. Here we discuss Algebra and Symbolic Math with
SymPy and Solving Calculus Problems. In Chapter 4 the sections Defining Symbols and Symbolic
Operations, Working with Expressions, Solving Equations and Plotting Using SymPy should be
done in full. In the section Programming Challenges, the problems Factor inder, Graphical Equation
Solver, Summing a Series and Solving Single-Variable Inequalities also should be discussed. In
chapter 7, some problems discussed namely, Finding the Limit of Functions, Finding the Derivative
of Functions, Higher-Order Derivatives and Finding the Maxima and Minima and Finding the
Integrals of Functions are to be done. In the section Programming Challenges, the problems Verify
the Continuity of a Function at a Point, Area Between Two Curves and Finding the Length of a
Curve also should be discussed.

Unit IV

In this unit we discuss some numerical methods for solving system of linear equations, for finding
roots of equations and polynomial interpolation from Text [Link] first discuss bisection method,
methods of Newton, secant method and method of false position for solving equations of the form
f(x)=0. The topics can be found in sections 2.1 (only upto example 2) and 2.3. Interpolation and the
Lagrange Polynomial as per section 3.1 (only upto example 2) is to be discussed. Next we discuss
Gauss Elimination with backward substitution method and LU decomposition method as per
sections 6.1 (only upto Algorithm 6.1) and 6.5 ( Theorem 6.19 statement only and exclude
subsection Permutation Matrices. Also avoid the discussion of matrix factorization using Maple).
Students should be encouraged to do problems and write python program for each method (see ref
1).

Unit V

Here we discuss some numerical methdos for integration, differentiation and solving initial value
problems of ordinary differential equations from Text 2. The methods for approximating first
drivative of a function as per section 4.1 are to be discussed. They include forward-difference
formula, (n+1)-point formula, in particular three-point formulas. Rest of the toipics in this section
need not be discussed. Next we discuss the methods for numerical integration. Trapezoidal rule and
simposns rules are to be discussed from section 4.3. Then we discuss (n+1 )-point closed Newton-
Cotes formula and derive trapezoidal, Simpson's rule and Simpson's 3/8 rules from it. Remaining
topics in the section need not be done. We also discuss Composite Simpson’s rule and Composite
Trapezoidal rule from section 4.4 (theorems 4.4 and 4.5 only). Our discussion about numerical
methods for solving initial value problems of ordinary differential equations include Euler's
method, Runge-Kutta methods of second and fourth order. The topics can be found in sections 5.2
(excluding subsection Error Bounds for Euler’s Method) and section 5.4 (only Midpoint Method for
Runge-Kutta Methods of order two and Runge-Kutta method of order four need to be discussed
without any proof). Students should be encouraged to do problems and write python program for
each method (see ref 1).

Some problems for Unit I are listed below

Factorial of a number

Checking primality of a number

Listing all primes below a given number

Prime factorization of a number

Finding all factors of a number

gcd of two numbers using the Euclidean Algorithm

Finding the multiples in Bezout’s Identity

checking the convergence and divergence of sequences and series.

(For more problems visit [Link]


[Link] and [Link]
The course is aimed to give an introduction to mathematical computing with Python as tool for
computation.

The students should be encouraged to write programs to solve the problems given in the sections as
well as in the exercises.

The end semester evaluation should contain a theory and a practical examinations.

The duration of the theory examination will be 3 hours, with a maximum of 50 marks.

In the question papers for the theory examination, importance should be given to the definition,
concepts and methods discussed in each units, and not for writing long programs.

Practical examination shall also be of 3 hours duration for a maximum of 25 marks.

Weightage of marks for theory and a practical examinations is listed below

Unit Theory Practical

I 10 (two questions out of four)

II 10 5 (one questoin out of two)

III (one question out of two) 5 (one questoin out of two)

IV 20 (two questoins out of four) 5

V 20 (two questoins out of four) one questoin out of two (one from each unit)

Continuous evaluation follows the pattern - 5 marks for attendence, 10 marks for the internal
examination and 10 marks for the practical record. The record should contain at least 20 programs.

The practice of writing the record should be maintained by each student throughout the course
and it should be dually certified by the teacher in charge/internal examiner and evaluated by the
external examiner of practical examination.

References:

[Link] Kiusalaas, Numerical Methods in Engineering with Python3, Camdbridge University Press,
2013.

[Link] Reference Release 1.17.0, Written by the NumPy community. (available at


[Link]

[Link]://[Link]/3/tutorial/

Common questions

Powered by AI

Writing Python programs for numerical methods significantly enhances students' comprehension of mathematical concepts by forcing them to visualize and engage with the mathematical procedures algorithmically. This practical application of theory to real problems allows students to witness the direct impact of mathematical methods on computational results. Moreover, coding these methods helps students internalize concepts such as convergence, stability, and error estimation that are pivotal in numerical analysis, ultimately solidifying their understanding and retention of material .

The course integrates classic numerical methods with Python programming by encouraging students to write code that implements these methods, thus reinforcing their theoretical understanding through practical application. For instance, the Bisection Method is taught as a means to find the roots of equations, and students apply their knowledge by coding the method in Python. This approach promotes active learning and helps students translate mathematical theory into computational algorithms, enhancing problem-solving skills .

The course syllabus achieves a balance between theory and application by structuring units to cover theoretical concepts and their practical implementations through Python programming. Each unit focuses on specific theoretical methods or mathematical problems, followed by programming tasks that involve implementing these methods using Python. This dual approach ensures that students not only understand the mathematical foundations but also gain hands-on experience in coding solutions, reinforcing learning and application skills .

Challenges in solving single-variable equations include handling symbolic manipulation and ensuring computational efficiency. SymPy supports defining symbols and performing symbolic operations, allowing students to solve equations accurately. Python programming helps by automating symbolic manipulations and verification processes, providing solutions to equations that may involve complex algebraic transformations. Moreover, programming allows for validating solutions by substituting them back into the original equations, which is particularly useful in ensuring solution accuracy .

The key Python concepts include understanding data structures, control flow, and functions as outlined in chapters 4-9. These concepts are essential for mathematical problem-solving because they allow students to automate repetitive tasks, conduct calculations, and implement algorithms relevant to mathematical problems. For example, using loops and conditionals from control flow helps in iterating over mathematical structures like matrices or implementing problem-solving algorithms such as prime checking or finding factorials .

Incorporating open-source documentation like NumPy and Python tutorials enriches learning outcomes by providing students with accessible, authoritative resources that enhance their practical understanding of Python's computational capabilities. These resources facilitate self-directed learning and problem-solving, enabling students to look beyond the classroom for answers and explore advanced features of Python libraries. Such exposure also prepares students for real-world scenarios where open-source documentation and community engagement are critical for continuous learning and growth in any technical field .

Programming challenges involving finding the length of a curve or areas between curves serve pedagogically to reinforce student understanding of calculus concepts through practical application. By translating abstract mathematical principles into tangible coding tasks, students deepen their comprehension of integration and geometrical interpretations. These exercises develop problem-solving skills, logical thinking, and proficiency in Python, promoting an active learning environment that connects theoretical knowledge with computational techniques .

Matplotlib provides a powerful way to visualize functions and data sets, making abstract mathematical concepts more concrete. By plotting functions and data sets, students can visually interpret behavior patterns such as trends, distributions, and the relationships between variables, fostering a deeper understanding of numerical data. For instance, exploring a quadratic function visually or plotting Fibonacci sequence relationships enhances conceptual understanding and encourages interactive learning .

Teaching both Euler's and Runge-Kutta methods offers students a comprehensive understanding of numerical solutions for ODEs, covering both basic and advanced techniques. Euler's method serves as an introduction to these concepts, offering insights into step-by-step procedural solutions. Runge-Kutta methods, especially of second and fourth order, introduce more accurate approaches for solving ODEs, highlighting the trade-offs between computational complexity and accuracy. By implementing these methods in Python, students engage with the practical challenges of numerical computation, understanding error propagation and control methods .

Discussing both trapezoidal and Simpson's rules for numerical integration is crucial as it provides students with a comparative understanding of different approaches to approximate integrals. Trapezoidal rule is simpler and often easier to implement, offering a linear approximation. In contrast, Simpson's rule provides a quadratic approximation that typically results in higher accuracy. Understanding their differences and similarities allows students to choose the appropriate method for different types of problems, appreciating the trade-off between simplicity and computational precision in numerical analysis .

You might also like