1 | ;; A computation of the places at which flip bifurcation occurrs in
|
---|
2 | ;; the quadratic family. Note: period 3 finished quite easily, period 4
|
---|
3 | ;; runs forever. Two methods: grobner and resultant
|
---|
4 | ;;
|
---|
5 | ;;Define the map f: (z,c)->(z^2+c,c)
|
---|
6 | (setf f (cdr (string-read-poly "[z^2+c,c]" '(z c))))
|
---|
7 | ;;
|
---|
8 | ;;Define the identity map as a polynomial
|
---|
9 | (setf id (cdr (string-read-poly "[z,c]" '(z c))))
|
---|
10 | ;;
|
---|
11 | ;;Define a constant polynomial 1 in variables z and c
|
---|
12 | (setf one (string-read-poly "1" '(z c)))
|
---|
13 | ;;
|
---|
14 | ;;(f-composition n) returns f o g o ... o f (n-times) as polynomial
|
---|
15 | (defun f-composition (n) (poly-dynamic-power f n))
|
---|
16 | ;;
|
---|
17 | ;; g = f^n-id
|
---|
18 | (defun g (n) (car (mapcar #'poly- (f-composition n) id)))
|
---|
19 | ;;
|
---|
20 | ;; (f^n)' (derivative over z = 0-th variable)
|
---|
21 | (defun df (n) (car (partial (f-composition n) 0)))
|
---|
22 | ;;
|
---|
23 | ;; Flip bifurcations occur when derivative is -1 at some fixed point
|
---|
24 | ;; (ideal n) is the ideal spanned by f^n-id and f'+1 and its zeros
|
---|
25 | ;; are clearly the locus of flip bifurcations
|
---|
26 | (defun ideal (n) (list (g n) (poly+ (df n) one)))
|
---|
27 | ;;
|
---|
28 | ;; Printer of the n-th ideal
|
---|
29 | (defun print-ideal (n) (poly-print (cons '[ (ideal n)) '(z c)) (terpri))
|
---|
30 | ;;
|
---|
31 | ;; Eliminate z from the equations, because we are just after the values of
|
---|
32 | ;; the parameter c
|
---|
33 | (defun bifurcation (n)
|
---|
34 | (mapcar #'poly-contract (elimination-ideal (ideal n) 1)))
|
---|
35 | ;;
|
---|
36 | ;; The same, but elimination done using resultant
|
---|
37 | (defun resultant-bifurcation (n)
|
---|
38 | (poly-contract (poly-resultant (g n) (poly+ (df n) one))))
|
---|
39 | ;;
|
---|
40 | ;; Print the polynomial whose zeros are the values of c
|
---|
41 | ;; for which flip bifurcation occurrs
|
---|
42 | (defun print-bifurcation (n)
|
---|
43 | (poly-print (cons '[ (bifurcation n)) '(c))
|
---|
44 | (terpri))
|
---|
45 | ;;
|
---|
46 | ;; Same for resultant version
|
---|
47 | (defun print-resultant-bifurcation (n)
|
---|
48 | (poly-print (resultant-bifurcation n) '(c))
|
---|
49 | (terpri))
|
---|