Appendix A

Index of Python Programs

Readers can download the Python program files via GitHub: https://github.com/springer-math/dynamical-systems-with-applications- using-python

These files will be kept up-to-date and extra files will be added in the forthcoming years.

A.1 IDLE Python Programs

These files include solutions to the Exercises listed in Chapter 1. euclid_algorithm.py --- See Exercise 10. F2C.py --- See Exercise 1(a). F2K.py --- Converts degrees Fahrenheit to Kelvin. fibonacci.py --- Lists first n terms of the Fibonacci sequence. fmu.py --- The logistic function. fractal_tree.py --- Plots a tree. fractal_tree_color.py --- Plots a color fractal tree. grade.py --- Converts a score to a grade. guess_number.py --- Guess the number game. koch_snowflake.py --- See Exercise 1(d). koch_square.py --- Plots a Koch square fractal. Pythag_Triples.py --- See Exercise 1(c). sierpinski.py --- Plots a Sierpinski triangle fractal. sierpinski_square.py --- Plots a Sierpinski square fractal.

© Springer International Publishing AG, part of Springer Nature 2018 645 S. Lynch, Dynamical Systems with Applications using Python, https://doi.org/10.1007/978-3-319-78145-7 646 Appendix: c Springer sum_primes.py --- See Exercise 1(b). sum_n.py --- Sums the natural numbers to n.

A.2 Anaconda Python Programs

If you have difficulty with the animation programs in Spyder, you have to change the backend to run an animation in the IPython console. You can do that by running

In[1]: %matplotlib qt5 before the animation. If you don’t want to use this command every time, you can go to: Tools, Preferences, IPython Console, Graphics, Backend, and change it from “Inline” to “Automatic.”

Program_01a.py --- Solve a simple ODE. Program_01b.py --- Solve a second order ODE. Program_01c.py --- Plot two curves on one graph. Program_01d.py --- Subplots. Program_01e.py --- Surface and contour plot in 3D. Program_01f.py --- A parametric curve in 3D. Program_01g.py --- Animation of a simple curve.

Program_02a.py --- Solve a separable ODE. Program_02b.py --- Solve the logistic ODE. Program_02c.py --- Power series solution. Program_02d.py --- Power series solution for van der Pol. Program_02e.py --- Plot series solution against numerical solution. Program_02f.py --- Solve a linear first order ODE. Program_02g.py --- Solve a linear second order ODE.

Program_03a.py --- Plot the phase portrait of a linear system. Program_03b.py --- Plot the phase portrait of a . Program_03c.py --- Finding critical points.

Program_04a.py --- Phase portrait and time series of Holling- Tanner model. Appendix 647

Program_05a.py --- Limit cycle of a Fitzhugh-Nagumo system. Program_05b.py --- Approximate and numerical solutions to ODEs. Program_05c.py --- Error between one-term and numerical solution. Program_05d.py --- Lindstedt-Poincare technique.

Program_06a.py --- Contour plot. Program_06b.py --- Surface plot.

Program_07a.py --- Animation of a simple curve. Program_07b.py --- Animation of a subcritical Hopf bifurcation. Program_07c.py --- Animation of a SNIC bifurcation.

Program_08a.py --- The Rossler . Program_08b.py --- The Lorenz Attractor. Program_08c.py --- The Belousov-Zhabotinsky reaction. Program_08d.py --- Animation of a Chua circuit bifurcation.

Program_09a.py --- Simple Poincare return map. Program_09b.py --- Hamiltonian with two degrees of freedom plot. Program_09c.py --- Phase portrait and Poincare map for the Duffing system. Program_09d.py --- of .

Program_10a.py --- Computing Lyapunov quantities. Program_10b.py --- Division algorithm for multivariate polynomials. Program_10c.py --- S-polynomial. Program_10d.py --- Computing the Groebner basis. Program_10e.py --- Computing Groebner basis of Lyapunov quantities. Program_10f.py --- Animation of a homoclinic limit cycle bifurcation. Program_10g.py --- Animation of a homoclinic limit cycle bifurcation.

Program_11a.py --- Animation of a Lienard limit cycle.

Program_12a.py --- The method of steps. Program_12b.py --- Plot of solution by method of steps. Program_12c.py --- The Mackey-Glass DDE. Program_12d.py --- The Lang-Kobayashi DDEs. 648 Appendix: c Springer

Program_13a.py --- Computing bank interest. Program_13b.py --- Solving a second order recurrence relation. Program_13c.py --- The Leslie matrix, eigenvalues and eigenvectors.

Program_14a.py --- Graphical iteration of the . Program_14b.py --- Bifurcation diagram of the . Program_14c.py --- Computing Lyapunov exponents for the logistic map. Program_14d.py --- Iteration of the Henon map. Program_14e.py --- Lyapunov exponents of the Henon map.

Program_15a.py --- Point plot for a . Program_15b.py --- Colormap of a Julia set. Program_15c.py --- Color . Program_15d.py --- Color fractal Julia set.

Program_16a.py --- Intersection of implicit curves. Program_16b.py --- Chaotic Attractor of the Program_16c.py --- Bifurcation diagram of the Ikeda map.

Program_17a.py --- The Koch curve. Program_17b.py --- and the Sierpnski triangle. Program_17c.py --- Barnsley’s fern. Program_17d.py --- Subplots of tau, D_q and f(alpha) multifractal spectra.

Program_18a.py --- Generating a multifractal image Program_18b.py --- Counting pixels in a color image. Program_18c.py --- Image and statistical analysis on microbes.png Program_18d.py --- Fast Fourier transform of a noisy signal Program_18e.py --- Iterative map and power spectra Program_18f.py --- Fast Fourier transform of Lena image Program_18g.py --- Edge detection in Lena image

Program_19a.py --- Chaos control in the logistic map. Program_19b.py --- Chaos control in the Henon map. Program_19c.py --- Chaos synchronization between two Lorenz systems. Program_19d.py --- Generalized synchronization.

Program_20a.py --- The generalized delta learning rule. Appendix 649

Program_20b.py --- The discrete Hopfield network. Program_20c.py --- Iteration of a minimal chaotic neuromodule. Program_20d.py --- Bifurcation diagram of neuromodule.

Program_21a.py --- The Hodgkin-Huxley equations. Program_21b.py --- The Fitzhugh-Nagumo half-adder. Program_21c.py --- Phase portrait Josephson junction limit cycle. Program_21d.py --- Animated Josephson junction limit cycle. Program_21e.py --- Pinched hysteresis of a memristor. Index

absorptive nonlinearity, 407 ArtistAnimation, 178 action potential, 114, 559 assay for neuronal degradation, activation 577 function, 521, 550 associative memory, 524, 531 level, 532 asymptotic expansion, 127 potential, 522 asymptotically stable ADALINE network, 524 critical point, 152 affine linear transformation, 440 asynchronous updating, 536 age class, 106, 333 attractor, 193 Airy equation, 61 attributes, 529 algebraicity of limit cycles, 283 autocatalysis, 204 All or None principle, 560 autonomous differential equation, Alzheimer’s disease, 577 54 ampere, 48 autonomous system, 186 Ampere’s law, 405 auxiliary system approach, 507 Anaconda, 14 average , 366 Anaconda Python programs, 646 ax.set title, 235 anemia, 374 Axes3D(fig), 235 angiogenesis, 308 axial flow compressors, 175 angular frequency of the wave, axon, 521, 558 406 animation, 26 Baby computer, 571 Spyder, 646 backpropagation, 526 ants and termites, 96 algorithm, 528 aperiodic, 201, 360 backward training, 388 behavior, 196 ballistic propagation, 571 append, 262 bandwidth, 407 applying a damper, 493 Barnsley’s fern, 441 arrhythmic, 495 basin of attraction, 159, 193, 372, Artificial Intelligence Group, 526 388 artificial neural networks, 520 basis, 253

© Springer International Publishing AG, part of Springer Nature 2018 651 S. Lynch, Dynamical Systems with Applications using Python, https://doi.org/10.1007/978-3-319-78145-7 652 Index batch data, 530 blowflies, 360 Belousov-Zhabotinski reaction, bluegill sunfish, 104 204, 212 Boston housing data, 529 Bendixson’s criterion, 123 boundaries of periodic orbits, 391 bias, 521 box-counting dimension, 443, 448 bifurcating limit cycles from a brain functions, 521 center, 258 Briggs-Rauscher, 204 bifurcation bursting, 310 curve, 167 butterfly effect, 200 diagram, 166 BZ reaction, 204 at infinity, 273 point, 362 canny edge detector, 477 value, 164 canonical form, 66, 67, 186 bifurcation diagram Cantor CR resonator, 409 multifractal, 454 DDE field components, 313 set, 235, 435 Mackey-Glass, 307 capacitance, 49 Duffing equation, 232 capacitor, 49 Gaussian map, 370 cardioid, 393 Ikeda map, 425 cardiology, 492 Josephson junction, 575 carrying capacity, 38 limit cycles, 177 cavity ring (CR) resonator, 408 logistic map, 365 cavity round-trip time, 408 neuromodule, 544 cell body, 558 periodically forced center, 69, 148, 246 pendulum, 233 manifold SFR resonator, 422 theorem, 191 SNIC, 178 changing the system parameters, binarize, 475 493 binary half adder, 565 chaologist, 492 biology, 374 chaos, 194, 196, 350, 353, 409 bipolar activation function, 522 control, 541, 552 bistability, 174, 175, 368, 421 synchronization, 505 bistable, 175, 206, 370, 408 chaos control cycle, 203 OGY method, 493 device, 407, 421 periodic proportional pulses, neuromodule, 543 513 optical resonator, 495 chaos game, 439 region, 233, 241, 409, 414 chaotic solution, 176 attractor, 197, 229, 415 bistable region, 544 , 199 blit, 178 phenomena, 348 Index 653 chaotic attractor completely H´enon map, 501 integrable, 221 neuromodule, 542 reduced, 254 Sierpi´nski, 440 complex eigenvalues, 69, 330 Chapman cycle, 211 complex iterative equation, 417 characteristic complex(x,y), 396 equation, 302, 330 compound interest, 329 exponent, 283 computer algebra, 252 multiplier, 219 concentrations, 44 charge density, 405 conditional Lyapunov exponents, chemical 506 kinetics, 44, 86, 117, 204, conductivity, 406 505, 561 conformal mapping, 386 reaction, 59 conservation of energy, 146 signals, 521 conservation of mass, 86 substance, 61 conservative, 146 chemical law of mass action, 44 contact rate, 212 Chua’s circuit, 51, 117, 201, 493, content-addressable memory, 532 514 continuation lines, 20 circle map, 221 continuous Hopfield model, 532 circular frequency of light, 410 contour plot, 24 classical symmetry argument, 248 control curves, 499 classification of critical points, 71 control engineering, 526 climate change, 314 control parameter, 495 clipping problem, 451 control region, 495 clockwise bistable cycle, 632 controlling chaos clockwise hysteresis, 241, 410 H´enon map, 498 cluster, 524 logistic map, 497 cmap, 396 conversational agents, 526 CMOS oscillators, 571 convex closed curve, 123 coarse H¨older exponent, 450 convoluted surfaces, 191 codimension-1 bifurcation, 182 coordinates of an image, 474 codimension-2 bifurcation, 182 core area of the fiber, 413 coexistence, 96 corollary to Poincar´e-Bendixson coexisting chaotic , 372 theorem, 120 col, 69 , 450 collect, 128 coulomb, 48 comb(k,s), 459 counterclockwise hysteresis, 410 common typing errors, 20 coupler, 412 commutative ring, 252 critical point, 55, 72, 186, 191, competing species, 96, 110, 140 300 complete synchronization, 506 at infinity, 276 654 Index culling, 106 dimension, 448 policy, 337 direction current, 48 field, 66 density, 405 vector, 66 cusp, 84 discrete Fourier transform, 479 cylindrical polar coordinates, 193 discrete Hopfield model, 536 dispersive nonlinearity, 407 damping, 116 displacement function, 247 damping coefficient, 282 distributive laws, 252 dangerous bifurcation, 174 divergence test, 248 Daphnia dentifera, 104 domain of stability, 97, 193, 388 dashed curve, 22 double-coupler fiber ring data, 545 resonator, 410, 428 data mining, 520 double Hopf bifurcation, 308, 322 databases, 529 double-scroll attractor, 203 DDE, 298 double-well potential, 151 dde23, 315 Dq, 448 ddeint, 298 driver system, 506, 507 def, 6 dsolve, 57 defibrillator, 495 Duffing defraction, 61 equation, 129, 227 degenerate system, 493, 611 critical point, 148 Dulac’s criterion, 122 node, 70 Dulac’s theorem, 273 degree, 273 degree lexicographical order, 253 EC , 191 delay differential equation, 298 economic model, 117, 322, 332 deleted neighborhood, 121 economics, 92, 374, 382, 453, 505 delta learning rule, 524, 526 edge detection dendrites, 521, 558 Roberts, 485 depolarization, 559 Sobel, 485 depolarize, 566 eig, 342 derivative of the Poincar´emap eigenvector, 72 test, 220 El Ni˜no, 313 desired vector, 527 electric deterministic chaos, 195, 492 circuit, 48, 92, 117, 201, 532 deterministic system, 520 displacement, 405 Df , 441 displacement vector, 405 dielectric, 406 field, 412, 417, 495 difference equation, 328, 551 field strength, 405 differential amplifier, 407 flux density, 405 diffusion limited aggregates electromotive force (EMF), 49 (DLA), 453 elementary steps, 44 Index 655 elliptic integral, 259 Fibonacci sequence, 343 EMF, 49 field, 253 energy level, 227 figsize, 107 enrichment of prey, 106 fine focus, 246 ENSO model, 313 first integral, 146 Enthought Canopy, 14 first iterative method, 419, 422, environmental effects, 106 552 environmental model, 313 first return map, 216 epidemic, 61, 85, 106, 117, 212 first-order difference equation, epilepsy, 577 328 epoch, 524 fish population, 38, 181, 345 equilibrium point, 55 Fitzhugh-Nagumo , 366, 495 equations, 116 error backpropagation rule, 528 oscillator, 114 error function, 527 system, 563 erythrocytes, 374 fixed point, 55, 355 ES, 72, 186, 191 period m, 221 EU , 72, 186, 191 period N, 357 Euclidean dimension, 448 period one, 217, 414, 497 Euclid’s algorithm, 29 period two, 498 exact, 39 fixed size box-counting algorithm, exact differential equation, 39 451 excitatory, 521, 558 fixed weight box-counting existence and uniqueness algorithm, 451 limit cycle, 117 flow, 118 existence theorem, 53 focal values, 247 extinct, 96 fold bifurcation, 182 for loop, 6 Fabry-Perot forced system, 227 interferometer, 407 forward rate constant, 46 resonator, 407 fossil dating, 59 farad, 49 Fourier spectrum, 478 Faraday’s law, 49 Fourier transform, 477 of induction, 404 fractal, 434, 441 fast Fourier transform, 480 attractor, 197, 441 feedback, 175, 407, 420 dimension, 441 feedback mechanism, 543 , 442 feedforward single layer network, Koch curve, 442 523 Koch square, 442 Feigenbaum constant, 365 Sierpi´nski triangle, 442 Ferranti Mark 1, 571 geometry, 434 FFT, 480 structure, 196, 201, 386 fiber parameters, 423 fragmentation ratios, 449 656 Index f(α) spectrum, 448 Hamiltonian systems FuncAnimation, 178, 207 with two degrees of freedom, Function, 57 221 function approximators, 526 handcrafted patterns, 541 fundamental memory, 536 hard bifurcation, 174 fuzzy discs, 451 Hartman’s theorem, 79 harvesting, 106, 181 Gauss’s law policy, 337 electricity, 405 Hausdorff dimension, 448 magnetism, 405 Hausdorff index, 441 Gauss-Newton method, 528 Hausdorff-Besicovich dimension, Gaussian input pulse, 421 450 Gaussian map, 368 Heaviside function, 523 Gaussian pulse, 638 Hebb’s learning law, 522 generalized delta rule, 528 Hebb’s postulate of learning, 536 generalized fractal dimensions, help command, 20 448 H´enon map, 370, 445, 451, 609, generalized mixed Rayleigh 612 Li´enard equations, 267 henry, 49 generalized synchronization, 507 heteroclinic gestation period, 304 bifurcation, 234 GitHub, 2 , 120, 150, 234, 274 global bifurcation, 260, 273 tangle, 234 global warming, 314 heterogeneous, 448 globally asymptotically stable, hidden layer, 524, 528, 603 194, 211 high pass filter, 484 glucose in blood, 60 Hilbert numbers, 273 Gr¨obner bases, 252 Hints for programming, 20 gradient, 66 history, 176 gradient vector, 527 history function, DDEs, 298 graphene nano-ribbon, 573 Hodgkin-Huxley equations, 114, graphic, 120 560 graphical method, 351, 417 Holling-Tanner model, 101, 139, gray scale, 458, 473 164 Green’s theorem, 122 homoclinic Gross National Product (GNP), bifurcation, 200, 234, 261 374 loop, 260, 261, 267 Guido van Rossum, 2 orbit, 150, 234, 274 tangle, 234 H´enon-Heiles Hamiltonian, 225 homogeneous, 448 haematopoiesis, 306 homogeneous differential Hamiltonian, 146, 611 equation, 40 Index 657

Hopf information dimension, 450 bifurcation, 170, 182, 303 inhibitory, 521, 558 singularity, 182 initial value problem, 38 Hopfield network, 156, 531, 551, input vector, 521 610, 613 insect population, 109, 345, 616 Hopfield neural network, 525 instability, 421 horseshoe dynamics, 235 instant physician, 526 host-parasite system, 104 integrable, 223 human population, 85, 343 integrate and fire neuron, 116 hyperbolic Integrated Development attracting, 283 Environment, 2, 14 critical point, 79 integrating factor, 34 fixed point, 220, 371 intensity, 412 , 440 interacting species, 95, 626 repelling, 283 intermittency, 203, 212, 363 stable limit cycle, 220 route to chaos, 365 unstable limit cycle, 220 invariant, 118, 201, 416 hyperpolarize, 566 axes, 82, 98 hyperpolarized, 559 inverse discrete Fourier hysteresis, 175, 371, 421 transform, 479 curves, 313 inverted Koch snowflake, 609 Josephen junction, 574 inverted Koch square, 438 inverted pendulum, 322 IDE, 14 io.imsave, 474 ideal, 252 isoclines, 67 IDLE, 2 isolated periodic solution, 114 IDLE Python programs, 645 isothermal chemical reaction, 86 if, elif, else, 6 iterated function system (IFS), Ikeda 440 DDE, 310 iteration, 328 map, 375, 414, 428, 513 im, 396 image analysis, 453 Jacobian, 171 image compression, 434, 484 Jacobian matrix, 78, 192, 205, incident, 407 371, 502 indentation level, 20 Jaynes-Cummings model, 595 index, 125 Jordan curve, 121, 286 inductance, 49 Josephson junction infected population, 105 mathematical model, 573 infectives, 85 Josephson junction (JJ), 571 inflation unemployment model, jth point of period i, 357 382 Julia set, 386, 389, 434, 612 infodict, 107 color, 390 658 Index

KAM system, 116, 123, 139, 260, theorem, 227 281 tori, 227 large parameter, 286 kernel machines, 525 local results, 290 Kerr theorem, 293 effect, 407, 413 limit cycle, 106, 114, 118, 206, type, 413 595, 611 kinetic energy, 146 hyperbolic, 259 Kirchhoff’s neuron, 116 current law, 49 nonexistence, 608 laws, 532 3-D, 195 voltage law, 49 Lindstedt-Poincar´e technique, 131 Koch linear differential equation, 34 curve, 436 linear phase shift, 412, 423 snowflake, 464 linear stability analysis, 56, 300, square, 436 417 linear transformation, 187 linearization, 78 ladybirds and aphids, 99 linearized system, 78 lambdas, 315 Lipschitz laminarize, 494 condition, 53 Lang-Kobayashi equations, 310 continuous, 53 Laplace transform, 50 local bifurcation, 273 large-amplitude limit cycle, 175 log-log plot, 445 bifurcation, 175 logic gates, 407 laser, 182, 374, 410, 494 logic operations, 565 model, 310 logistic LaTeX, 24 equation, 38, 302 law of mass action, 86 function, 6 learning process, 521 growth, 101 learning rate, 527 map, 360, 497, 612 least mean squared (LMS) Lorenz algorithm, 524 attractor, 201 legend, 23, 107 equations, 199, 494 Legendre transformation, 450 loss in the fiber, 412 Leslie Lotka-Volterra model, 99, 164, matrix, 334 212, 304 model, 333 low-gain saturation function, 523 lexicographical order, 253 low pass filter, 484 lie detector, 526 lowest common multiple, 256 Li´enard Lyapunov equation, 248 quantity, 247 plane, 282 stability, 531 Index 659

Lyapunov domain of stability, 155 mathematical model, 574 Lyapunov exponent, 197, 366, 612 meshgrid, 157 , 603 meteorology, 199 Lyapunov function, 151, 154, 194, method of multiple scales, 134 247, 284, 550, 607 method of steepest descent, 527 Hopfield network, 532 method of steps, 299 Lyapunov quantities, 290 mgrid, 425 theorem, 152 micro-parasite—zooplankton— lynx and snowshoe hares, 99 fish system, 104 Mac OS, 2 minimal chaotic neuromodule, Mackey-Glass model, 306 542 magnetic field vector, 405 minimal Gr¨obner basis, 257 magnetic flux, 405 mixed fundamental memories, 537 magnetostrictive ribbon, 494 , 353 Mandelbrot, 443 modulo, 254 Mandelbrot set, 389, 391, 434 monomial, 253 manifold, 72 ordering, 253 Maple, 26 mortgage assessment, 526 math module, 4 motif, 434 Mathematica, 26 mplot3d, 207 MATLAB, 26 multi-electrode array, 577 MATLAB code to Python, 603 multidegree, 254 matplotlib, 18 multifractal, 447, 472, 602 maximal interval of existence, 54, formalism, 448 62, 118 H´enon map, 459 Maxwell’s equations, 404 Sierpi´nski triangle, 459 Maxwell-Bloch equations, 406 spectra, 448 Maxwell-Debye equations, 406 multistability, 174 McCulloch-Pitts neuron, 522 multistable, 151, 175, 206, 241, MEA, 577 543 mean, 545 murder, 60 infectivity period, 212 muscle model, 60 latency period, 212 mutual exclusion, 96 mechanical oscillator, 91 myimages, 292 DDE, 321 mylein sheath, 558 mechanical system, 117, 176 Melnikov national income, 332 function, 259 negative integral, 258 , 118 memory devices, 407 semiorbit, 118 memristance, 52 negatively, invariant, 118 memristor, 51, 572, 573 net reproduction rate, 339 660 Index network architecture, 521 nullclines, 67 neural network, 375, 505, 521 numerical solutions, 42 DDE, 315 numpy, 18 neuristor, 572 neurodynamics, 541 occasional proportional feedback neurological assay, 577 (OPF), 494 neuromodule, 541 ODE, 34 neuron odeint, 42, 57 module, 375 OGY method, 495 neuron(s), 114, 521, 551, 558 ohm, 49 neuronal model, 521 Ohm’s law, 48 neurotransmitters, 558 optical Newton fractal, 395, 602 bistability, 407 Newton’s law of cooling, 60 computer, 407 fiber, 410 Newton’s law of motion, 146 fiber double ring, 410 Newton’s method, 395, 528 memories, 407 noise, 497 oscillators, 572 NOLM, 404 resonator, 176 with feedback, 410 sensor, 408 nonautonomous system, 116, 227 optimal sustainable, 340 nonconvex closed curve, 124 optogenetics, 578 nondegenerate orbit, 66, 118 critical point, 148, 246 ordinary differential equation, 34 nondeterministic chaos, 195, 492 oscillation of a violin string, 114 nondeterministic system, 520 oscillatory threshold logic, 563 nonexistence of limit cycles, 123 output vector, 521 nonhyperbolic ozone production, 211 critical point, 79, 151, 607 fixed point, 371 parasitic infection, 111 nonlinear Parkinson’s disease, 577 center, 247 partial differential equations, 34 optics, 374 partition function, 448 phase shift, 412 Pascal’s triangle, 464 refractive index coefficient, passive circuit, 51 413 Peixoto’s theorem in the plane, nonlinearity, 175, 407 164 nonperiodic behavior, 196 pendulum, 147, 159, 241 nonsimple canonical system, 67 double, 593 normal form, 164, 170 perceptron, 522 normalized eigenvector, 340 perihelion, 593 not robust, 101 period, 259 notebook, 14 bubblings, 368 np.mgrid, 88 limit cycle, 103, 119, 205 Index 661

undoublings, 368 positive period-doubling, 203 limit set, 118 period-doubling bifurcations to semiorbit, 118 chaos, 363 positively, invariant, 118 period-n cycle, 195 potato man, 394 period-one behavior, 350 potential difference, 48 period-two, 196 potential energy, 146, 151 behavior, 350 potential function, 151 period-three behavior, 351 pow(x,y), 315 periodic power, 412 behavior, 115 law, 443 orbit, 259 spectra, 199, 203 windows, 363 of a waterwheel, 92 periodicity, 348, 353 power-splitting ratio, 412 permittivity of free space, 405 pprint, 57 perturbation methods, 127 Prandtl number, 200 phase portrait, 66 preallocate, 20 phase shift, 412 predation, 104 physiology, 505 rate, 101 piecewise, 300, 315 predator-prey, 117 piecewise linear function, 523 DDE, 304 pinched hysteresis, 52, 574 models, 99 pitchfork bifurcation, 167 system, 109 pixels, 451 probe vector, 536 planar manifold, 187 propagation, 412 plastics, 453 psychological profiling, 526 plt.axes, 292 PyDDE, 298 Poincar´e pydelay, 298, 311 compactification, 275 Pyragas’s method, 493 map, 119, 199, 216, 259, 371, Python 495 based exam, 607, 613 section, 216, 611 files download, 2 Poincar´e-Bendixson theorem, 120, 227, 281, 287 qth moment, 448 Poisson brackets, 223 qualitative behavior, 66 polar coordinates, 69, 276 qualitatively equivalent, 74 pole placement technique, 496 quasi-periodicity, 221 pollution, 106 quasi-polynomials, 302 polymer, 453 quasiperiodic, 544, 552 population, 92 route to chaos, 203 of rabbits, 86 quasiperiodic forcing, 228 population model, 614 quiver, 88 662 Index

R¨ossler reversed fundamental memories, attractor, 194 537 system, 194 RGB image, 474 radioactive decay, 610 rgb2gray, 477 randint(a,b), 459 ring, 252 random behavior, 195 ringing, 241 Raspberry Pi, 2 RLC circuit, 51, 117 rate constant, 45 roach:fish population, 338 rate-determining step, 45 robust, 103 Rational(1,2), 376 Rotating Wave Approximation rationally independent, 221 (RWA), 312 ravel, 157 rsolve, 342 Rayleigh number, 200 rubbers, 453 Rayleigh system, 115 re, 396 S-polynomial, 256 reaction rate equation, 45 saddle point, 69, 148 real distinct eigenvalues, 68 saddle-node bifurcation, 165 recurrence relation, 328 saddle-node on an invariant cycle recurrent neural network, 524, bifurcation, 176 531 safe bifurcation, 174 red blood cells, 374 save image, 472 red and grey squirrels, 96 savefig, 22 reduced, 262 scaling, 443, 448 reduced Gr¨obner basis, 257 scatter, 425 reflected, 407 sea lions and penguins, 96 refractive index, 407 seasonal effects, 106 refractive nonlinearity, 407 seasonality, 212 refuge, 106 second iterative method, 420, regionprops, 477 422, 552 regulator poles, 496 second order linear difference relative permeabilities, 406 equation, 330 relative permittivities, 406 second part of Hilbert’s sixteenth repeated real eigenvalues, 70 problem, 272 repolarization, 559 second-order differential equation, resistance, 49 50 resonance terms, 173 secular term, 131 resonant, 173 sedimentary rocks, 453 response system, 506, 508 self-similar, 448 restoring coefficient, 282 self-similar fractal, 441 restoring force, 116 self-similarity, 434 restrictions in programming, 291 semistable return map, 247, 607 critical point, 56 reverse rate constant, 46 limit cycle, 118, 220, 286 Index 663 sensitivity to initial conditions, manifold, 72, 79, 186, 191, 196, 348, 353, 492 495 separable differential equation, 35 node, 69 separation of variables, 35 staircases, 356 separatrix, 151 stationary point, 55 cycle, 261 std, 545 series solutions, 42 steady state, 51, 103 SFR, 403 stem cell, 578 resonator, 409, 412 stiff system, 47, 212 sharks and fish, 99 stiffness, 116 Sierpi´nski triangle, 439 stochastic methods, 520 sigmoid function, 523 stock market analysis, 453 signal processing, 453, 482 stoichiometric equations, 45 simple canonical system, 68 Stokes’s theorem, 405 simple nonlinear pendulum, 146 strange attractor, 197 simply connected domain, 123 stretching and folding, 348 singlet, 212 strictly dominant, 336 singular node, 70 structurally Smale , 234, 373 stable, 103, 164 Smale-Birkhoff theorem, 235 unstable, 101, 164 small perturbation, 56, 417 subcritical Hopf bifurcation, 174, small-amplitude limit cycle, 246 200 soft bifurcation, 174 subharmonic oscillations, 229 solar system, 492 subplots, 22, 107 solution curves, 36 summing junction, 521 solve, 88, 258 soma, 521, 558 superconductor, 573 spatial vector, 405 supercritical Hopf bifurcation, spectrum of Lyapunov exponents, 174 197 supervised learning, 524 speed of light, 406 surface plot, 24 spike train, 559 susceptible population, 105 spin-glass states, 537 susceptibles, 85 spirals, 355 sustainable, 338 spurious steady state, 537 switches, 407 SR flip-flop, 569 symbols, 57 stability, 151, 190 sympy, 15 diagram, 420 synaptic stable cleft, 558 critical point, 55, 152 gap, 558 fixed point, 361, 388 vesicles, 558 focus, 69 weights, 521 limit cycle, 103, 118 synchronization, 494, 505, 541 664 Index , 505 uint8, 476 synchronous updating, 537 unconstrained optimization problem, 527 target vector, 524, 527 uncoupled, 187 targeting, 497 uniform asymptotic expansion, τ(q), 449 127 Taylor series expansion, 56, 78, uniform harvesting, 341 371, 417 unipolar activation function, 522 tent map, 348, 608 uniqueness theorem, 53 3D plot, 23 universality, 365 three-dimensional system, 186 Unix, 2 threshold, 559 unstable logic, 564 critical point, 55, 153 value, 85 fixed point, 361, 388 time series, 105, 364 focus, 69 chaos detection, 198 limit cycle, 118 plot, 198 manifold, 72, 79, 186, 191 , 601 node, 68 Toda Hamiltonian, 240 unsupervised learning, 524 topological dimension, 448 topologically equivalent, 74 vacuum, 405 torus, 228 vacuum tube oscillator, 571 total degree, 253 value of homes in Boston, 529 totally van der Pol equation, 130 connected, 388 van der Pol system, 114, 259 disconnected, 388 vector field, 66 training, 524 plot, 533 trajectory, 66, 118 velocity of light, 413 transcritical bifurcation, 167 Verhulst’s equation, 38, 96 transfer function, 521, 551 virus, mobile phone, 592 transient, 51 viscosity, 200 transmitted, 407 viscous fingering, 434 transversal, 247 volt, 48 transversely, 216 voltage drop, 48 travelling salesman problem, 531 triangular pulse, 421 wave equations, 404 trigsimp, 130 wave vector, 406 trivial fixed point, 356 wavelength, 406 turbulence, 453, 492 light, 413 2D plot, 21 WC , 191 two-neuron module, 533 while loop, 6, 29 Index 665

Windows, 2 XOR gate, 522 wing rock, 175 WinPython, 14 You Tube, 386 W S, 79, 191 youngest class harvesting, 339 WU , 79, 191

X-ray spectroscopy, 453 Zq, 448