Skip to content

Instantly share code, notes, and snippets.

@nibrahim
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nibrahim/e71a442d36e571e9dfb8 to your computer and use it in GitHub Desktop.
Save nibrahim/e71a442d36e571e9dfb8 to your computer and use it in GitHub Desktop.

Non linear functions

Recap

  • Functions f(x) = x^2 f(x) = sin(x) f(x) = x + 5 f(x) = 2x
  • Iteration of functions f(x) = x^2

    f(f(f(2))) - 3rd iterate of the number 2 under the function f f_3(2)

Orbits

  • Successive iterates of a number under a function. f(x) = 2x Orbit of 1 under f - 1, 2, 4, 8, 16, 32, 64, 128….
  • Fixed point A point that is fixed. f(x) = x f(x) = 2x 0 is a fixed point for this function 0 is also a fixed point for sin(x) 0.739085133215 is a fixed point for cos(x)
  • Periodic points p is a periodic point if F_n(p) = F(p) for some value of n. smallest value of n is called the “prime period”
  • Eventually fixed/periodic A point is an eventually fixed point if F_n(p) = q where q is a fixed point for some n.
    • f(x) = 1/x - All points other than 1, -1 and 0 are eventually fixed.
    • sin(x) - PI, 2PI, 3PI are all eventually fixed.
    • f(x) = x^4 - 1 (1 is an eventually periodic point).

The logistic function

P_(n+1) = c * P_n * (1 - P_n) - c is often chosen between 1 and 4 f(x) = c * x * (1 - x)

cBehaviour of orbits
0.5All orbits tend to 0
0.8All orbits tend to 0
1All orbits tend to 0 but slowly
1.5All orbits tend to 1/3
2All orbits tend to 0.5
3All orbits tend to 2/3 but slowly and oscillate around 2/3 as they approach
3.2Period 2 cycle - 0.51, 0.799
3.5Period 4 cycle - 0.50, 0.87, 0.38, 0.82
3.55Period 8 cycle - 0.506, 0.887, 0.354, 0.812, 0.540, 0.881, 0.370, 0.827
4There is no pattern
5Orbits tend to infinity

Visualisation

https://github.com/TheLycaeum/non-linear-functions

Graphical analysis

f(x) = sqrt(x) f^2(x) = sqrt(sqrt(x)) f^3(x) = sqrt(sqrt(sqrt(x)))

More types of points

  • For f(x) = x^2, 0 and 1 are a fixed points
  • 0 is an attracting fixed point.
    • A point p is an attracting fixed point if, there exists some range a < x < b where for all points x, the orbit tends to p.
    • This range a<x<b is called the basin of attraction.
    • The basin of attraction is -1 < x < 1
  • 1 is a repelling fixed point
  • f(x) = x^2 - 0.5 x^2 - x - 0.5 = 0 (1+sqrt(3))/2 (repelling fixed point) (1-sqrt(3))/2 (attracting fixed point) -(1+sqrt(3)/2) and (1+sqrt(3)/2)

Stability

Small change in initial conditions produce predictable changes in dynamic behaviour.

  • f(x) = x^2
    • Stable for |x| < 1
    • Stable for |x| > 1
    • Unstable for x = 1
      • if x is slightly above 1, it goes to infinity
      • if x is slightly below 1, it goes to zero
  • Attracting fixed points are always stable.
  • Repelling fixed points are not stable.
  • Any point within the basin of attraction of an attracting fixed point is also stable.

Other functions

  • f(x) = x^2 + x + 4
    • Two fixed points -2 and +2 both of which are repelling
  • f(x) = x^2 - 0.5
    • (1 + math.sqrt(3))/2 is a repelling fixed point (1.3660254037844386)
    • (1 - math.sqrt(3))/2 is an attracting fixed point (-0.3660254037844386) with the basin of attraction being
      • 1.3660254037844386 < x < 1.3660254037844386

Books

Chaos, Fractals and Dynamics - Robert L. Devaney

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment