Lesson 13 of 15
Finding Equilibria
Finding Equilibria
An equilibrium (or fixed point) of is a value where the derivative is zero:
At an equilibrium, the system does not change. Equilibria are the long-term destinations (or starting points) of solutions.
Examples
| System | Equilibria |
|---|---|
| and | |
| for all integers |
Numerical Root Finding: Bisection
To find equilibria numerically, we look for sign changes in over an interval. Between any two points where changes sign, there must be a zero (Intermediate Value Theorem).
For each sign change, we narrow down the root using bisection:
lo, hi = x0, x1
for _ in range(50):
mid = (lo + hi) / 2
if f(lo) * f(mid) <= 0:
hi = mid
else:
lo = mid
50 bisection steps gives precision .
Your Task
Implement find_equilibria(f, a, b) that finds all zeros of in using sign changes and bisection. Return a list of equilibrium values rounded to 6 decimal places.
Pyodide loading...
Loading...
Click "Run" to execute your code.