Join free to take this lesson
Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.
12 steps ยท about 25 min
By the end you can
- Take a slice of an array: v[1:] and v[:-1]
- Write the trapezoid rule in one line: np.sum((v[:-1] + v[1:]) / 2) * h
- Make N strips with np.linspace(0, T, N + 1)
- Explain why the trapezoid rule is exact for a straight-line graph
Who it is for: Anyone who has done lesson 11.1, and physics lesson 2.6 (the equations of motion).
The steps
- Slices
- All but the first
- All but the last
- Both ends of every strip
- Why not v + v[1:]?
- The trapezoid rule
- N strips need N + 1 points
- Fence posts
- How wide a strip?
- A straight line
- Why exact?
- Slices
Discussion 0 comments
Log in to join the discussion.