This Homework is seperated into two task groups (algorithm, numerical calculation and presentation) and the same rules apply as in HW4. Remember you are in charge to have a review assigned if one available, also you have to finish your review 2 hours after assignment. Once the review is finished the original author has 12 hours to fix the issues mentionend in the review.
Use the four integral algorithms (simpson, adaptive trapezoid, trapezoid) to calculate and plot the integral of:
In common files calculus.py
and test_calculus.py
create functions and unit tests to calculate the integral using the following algorithm :
Each algorithm has to be implemented in three ways.
In the same file calculus.py
and test_calculus.py
implement three root-finding algorithms and unit tests:
Each algorithm has to be implemented in three ways.
Hint: You can use https://github.com/ubsuny/CompPhys/blob/main/Calculus/ for examples for the C/C++ code
Generate one PR per implementation and one PR for unit testing. Review each others PR.
Calculate the following integrals (max 2 members):
with the according boundaries:
$$ [0,10],(0,3\pi],[-1,1] $$
You can only use functions from calculus.py
.
Compare the accuracies (how many digits are correct) and efficiencies (how many steps does it take to reach a given accuracy) for each algorithm and each implementation as it becomes available.
Generate a figure function_name.png
showing the function and color the area of integral to be calculated with its value for each algorithm including the number of steps inside in the figure.
Compare the accuracies (how many digits are correct) and efficiencies (how many steps does it take to reach a given accuracy) for all root-finding algorithms and implementations on the functions (max 2 members):
$$ y(x) = \frac 1 {\sin(x)} \textrm{ and} $$
$$ y(x) = \tanh(x) \textrm{ and} $$
$$ y(x) = \sin(x). $$
You can only use functions from calculus.py
.
Compare the accuracies (how many digits are correct) and efficiencies (how many steps does it take to reach a given accuracy) for each algorithm and each implementation as it becomes available.
Generate a figure function_name.png
showing the function and mark all roots with circles for each algorithm including the number of steps inside in the figure.
Generate one PR per function and one PR for unit testing. Review each others PR.
Homework Points | |||
---|---|---|---|
Interaction on project | |||
Category | min per person | point factor | max points |
Commits | 1 | 1 | 1 |
Pull requests | 2 | 2 | 4 |
PR Accepted | 2 | 4 | 8 |
Other PR reviewed. | 2 | 3 | 6 |
Issues | 0 | 0 | 0 |
Closed Issues | 0 | 0 | 0 |
# Conversations | 12 | 1/4 | 3 |
Total | 20 | ||
Shared project points | |||
# Milestones | 12 | 1/4 | 3 |
Total | 23 | ||
Result | |||
Task completion | 19 | ||
Sum | 42 |