Omniadisce

Computational physics 10.3: When to stop halving

Lesson Beginner

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.

9 steps ยท about 25 min

By the end you can

  • Stop bisection when the interval is narrower than a tolerance: while b - a > tol
  • Count the halvings, and say why each decimal place costs about 3.3 of them
  • Hand a function to another function by its name
  • Use a bisect(f, a, b, tol) function, starting from an interval with a sign change

Who it is for: Anyone who has done lesson 10.2.

The steps

  1. Halve until it is narrow enough
  2. Count the halvings
  3. A decimal place costs about 3.3 halvings
  4. How many more?
  5. A function given to a function
  6. Use bisect
  7. Check the sign change first
  8. A wrong interval
  9. Close enough

Discussion 0 comments

Log in to join the discussion.

× Enlarged view