```python
import fit_pendulum_data as p1
import midpoint_vec as p2
import Lagrange_poly1 as p3
import Lagrange_poly2 as p4
import Lagrange_poly2b as p5
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
```

# Exercise 5.18
## Plots L vs T from a source file and fits polynomials of varying degrees to it


```python
p1.part_a()
```

### Below are the polynomials being fit to the data


```python
p1.part_b()
```

# Exercise 5.22
## Computes the midpoint rule in different forms


```python
p2.midpointint(p2.function, 1, 3, 50)[0]
```




    12.231183999999999




```python
p2.sum_vectorized(p2.function, 1, 3, 50)
```




    12.231183999999999




```python
p2.sum_numpy(p2.function, 1, 3, 50)
```




    12.231183999999999



# Exercise 5.23, 5.24, 5.25 (3 part)
## Lagrange Interpolation


```python
p4.graph(p4.sin, 20, 0, 10, [0,10,-2,2])
```


```python
p5.problem_5_25()
```


```python

```

cb9bc1566bb6050cf96f421a946ee0cdfa3ca409
ipynb
Jupyter Notebook
hw-2-C0deMonkee.ipynb
chapman-phys227-2016s/hw-2-C0deMonkee
2db1f30afecb9f2d09e29a15c6f47656e8582deb
MIT
hw-2-C0deMonkee.ipynb
chapman-phys227-2016s/hw-2-C0deMonkee
2db1f30afecb9f2d09e29a15c6f47656e8582deb
MIT
hw-2-C0deMonkee.ipynb
chapman-phys227-2016s/hw-2-C0deMonkee
2db1f30afecb9f2d09e29a15c6f47656e8582deb
MIT
Qwen/Qwen-72B
1. YES
2. YES