Main function to test the trapezoidal rule. :a: Lower bound of integration :b: Upper bound of integration :steps: define number of steps or resolution :boundary: define boundary of integration >>> main() y = 0.3349999999999999
()
| 80 | |
| 81 | |
| 82 | def main(): |
| 83 | """ |
| 84 | Main function to test the trapezoidal rule. |
| 85 | :a: Lower bound of integration |
| 86 | :b: Upper bound of integration |
| 87 | :steps: define number of steps or resolution |
| 88 | :boundary: define boundary of integration |
| 89 | |
| 90 | >>> main() |
| 91 | y = 0.3349999999999999 |
| 92 | """ |
| 93 | a = 0.0 |
| 94 | b = 1.0 |
| 95 | steps = 10.0 |
| 96 | boundary = [a, b] |
| 97 | y = trapezoidal_rule(boundary, steps) |
| 98 | print(f"y = {y}") |
| 99 | |
| 100 | |
| 101 | if __name__ == "__main__": |
no test coverage detected