All problems
Bifurcation Parameter Check
Problem
The logistic map has the nonzero fixed point x* = 1 - 1/r for r > 1, with multiplier f'(x*) = 2 - r.
The fixed point is attracting when |2 - r| < 1, that is for 1 < r < 3. Given r, return True when the fixed point is stable and False otherwise.
Hint
At r = 3 the multiplier reaches -1 and the period-doubling cascade begins.
Test cases
case 1
in: [2.5]
expected: true
case 2
in: [3.2]
expected: false
case 3
in: [3]
expected: false
case 4
in: [1.5]
expected: true
case 5
in: [0.5]
expected: false
Starter codePython
def bifurcation_stable(r):
# Your code here
pass5 test cases · run your code against them in the editor