As Attached


Bonus Assignment
Description
This assignment will cover all chapters presented in the course. Treat is as both a refresher and
a way to work on what you might’ve not understood at the beginning.
The purpose of this assignment is to help you go over the previous taught material, go over
concepts in programming, and do one last huzzah for the semester in chapter 7.
For full credit on this assignment (meaning the drop on another assignment), the following is
required in its entirety:
– Create expected structure
– ensure there’s a readme with instructions on how to compile
– every output for each question is correct
Constraints
Standard Structure
For this assignment, you will need the following structure:
src
– main
— __init__.py
— bonus_assignment.py
– test
— __init__.py
— bonus _ assignment.py
requirements.txt
README.md
Compilation Instructions
Keeping true to adding industry likeness to each assignment, it is required that you need to
include a README per repository. A README is a file used to describe a repo’s purpose, include
compilation purposes, or both. A proper README.md is typically filled out with sections, akin to
an essay.
For this assignment, a README needs to be included and filled out. The amount of info you put
into the README is up to you, but you will need the following at least:
● Mention of requirements.txt
o No need to include this UNLESS you plan on using a library other than NumPy
● Mention of running python
o Since we require instructions on to run, you will need to include the command to
run the script from command line.
RESTRICTIONS
Please avoid using the scipy library for this assignment. You will need to be able to do the
decomposition without the use of this external library.
Questions
1. The number of iterations it takes gauss-seidel to converge:
a. Initial guess: [0, 0, 0]
b. Tolerance: 1e-6
c. Iterations: 50
d. 3 1 1 1 1 4 1 3 2 3 7 0
2. The number of iterations it takes jacobi method to converge
a. Initial guess: [0, 0, 0]
b. Tolerance: 1e-6
c. Iterations: 50
d. 3 1 1 1 1 4 1 3 2 3 7 0
3. Determine the number of iterations necessary to solve f(x) = x
3
– x
2 + 2 = 0 using
newton-raphson from the left side
a. Tolerance: 1e-6
b. Initial guess: 0.5
4. Using the divided difference method, print out the Hermite polynomial approximation
matrix
x f(x) f(x) f’(x)
0 1 1
1 2 1.23
2 4 1.55
5. The final value of the modified eulers method
a. Function: y – t
3
b. Initial point: .5
c. Iterations: 100
d. Range: 0 < x < 3
Expected Output