Numerical Analysis
Programming 2
Jun Moon
junmoony@[Link]
1
Notice
• Deadline: July 24, Wed
• Time: 22:00
• Submissoin: LMS
Submission (with zip file)
- Programmiang files (Python
or MATLAB)
- Solution PDF
2
Example: Role of Group Members
(This must be included in your team PPT slide)
• Peter
• Problem 1, Problem 2
• John
• Problem 5, Problem 3
• Sunny
• Problem 2, Problem 7
• Emily
• Problem 6, Problem 10,
Libraries in Python
• Numpy
• Pandas
• Matplotlib
• Scipy
4
•Problems
5
Problem 1
6
MATLAB or Python
(i) Find the solution to the above problem using ([Link] in
Pythonor linsolve in MATLAB )
(ii) Use MATLAB or Python to construct the Jacobi iteration
(iii) Discuss the convergence of the Jacobi iteration in (ii)
7
Problem 2
8
Problem 2
MATLAB or Python
Choose any 10 points between -2 and 2 (it is your choice)
(i) Use the forward method to differentiate f with respect to the 20 points you selected, i.e., compute
- Plot the differentiation
(ii) Use the Euler’s method to intergrate the above function from -100 to 100, i.e. compute
9
Problem 3
10
Problem 3
MATLAB or Python
(i) Convert the above ODEs into the state space equation
(ii) Use the Euler’s method to solve the state space equation on [0,1]
(iii) Plot the solutions of the state space equation on [0,1]
11