{"id":1820,"date":"2023-03-29T20:44:00","date_gmt":"2023-03-29T18:44:00","guid":{"rendered":"https:\/\/www.gistlabs.net\/weblogs\/?p=1820"},"modified":"2026-03-29T20:35:08","modified_gmt":"2026-03-29T18:35:08","slug":"algo-chaos-1-la-suite-logistique-et-son-diagramme-de-bifurcation","status":"publish","type":"post","link":"https:\/\/www.gistlabs.net\/weblogs\/algo-chaos-1-la-suite-logistique-et-son-diagramme-de-bifurcation\/","title":{"rendered":"Algo &#038; Chaos 1 : La suite logistique et son diagramme de bifurcation"},"content":{"rendered":"\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/habib256\/algo-chaos\/blob\/main\/1.SuiteLogistique\/docs\/reproduction-du-lapin.jpeg?raw=true\" alt=\"reproduction-du-lapin.jpeg\" style=\"width:734px;height:auto\"\/><\/figure>\n\n\n<p>D\u00e9couvrons la suite logistique U<sub>n+1<\/sub> = r U<sub>n<\/sub>(1-U<sub>n<\/sub>) avec Python et matplotlib pour trouver le chaos qui s&#8217;y niche.<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistique.png\" alt=\"Suite Logistique\" \/><\/p>\n\n<!--more-->\n\n<h2>Objectifs<\/h2>\n<h3>Math\u00e9matiques<\/h3>\n<ul>\n<li>D\u00e9couvrir la suite logistique U<sub>n+1<\/sub> = r U<sub>n<\/sub>(1-U<sub>n<\/sub>)<\/li>\n<li>Tracer un graphique pour \u00e9tudier la convergence d&#8217;une suite<\/li>\n<li>Tracer le diagramme de bifurcation de cette suite<\/li>\n<\/ul>\n<h3>Informatiques<\/h3>\n<ul>\n<li>S&#8217;initier \u00e0 l&#8217;utilisation de la biblioth\u00e8que matplotlib de Python<\/li>\n<li>Tracer des courbes avec plot<\/li>\n<li>Tracer des nuages de points avec scatter<\/li>\n<\/ul>\n<h2>La suite logistique<\/h2>\n<p>Cette suite est une mod\u00e9lisation de la croissance et d\u00e9croissance des populations animales. Le taux <strong>r<\/strong> repr\u00e9sente le taux de croissance, et <strong>(1-U<sub>n<\/sub>)<\/strong> limite la population.<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistiqueEquation.png\" alt=\"\u00c9quation\" \/><\/p>\n<p>Le professeur <a href=\"https:\/\/fr.wikipedia.org\/wiki\/Robert_May\">Robert M. May<\/a> a popularis\u00e9 cette \u00e9quation dans Nature en 1976.<\/p>\n<p><strong>Vid\u00e9o :<\/strong> <a href=\"https:\/\/www.youtube.com\/watch?v=ovJcsL7vyrk\">Veritasium sur la suite logistique<\/a><\/p>\n<h2>Coder une visualisation en Python<\/h2>\n<pre><code class=\"language-python\">import matplotlib.pyplot as plt\n\nnmax = 60\nr = 2.7\nu0 = 0.7\n\ndef u(n):\n    u=u0\n    for i in range(n):\n        u=r*u*(1-u)\n    return u\n\nx = []\ny = []\nfor n in range(0, nmax):\n    x.append(float(n))\n    y.append(float(u(n)))\n\nplt.plot(x,y,'bo')\nplt.title(\"Suite logistique\")\nplt.show()\n<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/habib256\/algo-chaos\/blob\/main\/1.SuiteLogistique\/SuiteLogistiqueSimple.py\">Code sur GitHub<\/a><\/p>\n<h2>\u00c9tude de la convergence<\/h2>\n<p><strong>Pour r=2,7<\/strong> : convergence rapide<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistiqueR2.7.png\" alt=\"r=2.7\" \/><\/p>\n<p><strong>Pour r=3,4<\/strong> : oscillation entre deux valeurs<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistiqueR3.4.png\" alt=\"r=3.4\" \/><\/p>\n<p><strong>Pour r=3,8<\/strong> : chaos total<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistiqueR3.8.png\" alt=\"r=3.8\" \/><\/p>\n<p><strong>Pour r=3,831<\/strong> : \u00eelot d&#8217;ordre dans le chaos<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/SuiteLogistiqueR3.83.png\" alt=\"r=3.83\" \/><\/p>\n<p><a href=\"https:\/\/github.com\/habib256\/algo-chaos\/blob\/main\/1.SuiteLogistique\/SuiteLogistiqueSliders.py\">Version interactive<\/a><\/p>\n<h2>Le diagramme de bifurcation<\/h2>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/Bifurcation1.png\" alt=\"Bifurcation\" \/><\/p>\n<pre><code class=\"language-python\">import matplotlib.pyplot as plt\n\nnmin, nmax = 40, 200\nr, rmax, dr = 1.0, 4.0, 0.001\nu0 = 0.6\n\ndef u(n, r, u0):\n    u = u0\n    for i in range(n):\n        u = r*u*(1-u)\n    return u\n\nx, y = [], []\nwhile r < rmax:\n    for n in range(nmin, nmax):\n        x.append(float(r))\n        y.append(float(u(n,r,u0)))\n    r += dr\n\nplt.scatter(x, y, 1)\nplt.show()\n<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/habib256\/algo-chaos\/blob\/main\/1.SuiteLogistique\/BifurcationDiagramme.py\">Code sur GitHub<\/a><\/p>\n<h3>Zoom sur la fractale<\/h3>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/Bifurcation2.png\" alt=\"Zoom 1\" \/><\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/Bifurcation3.png\" alt=\"Zoom 2\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/www.gistlabs.net\/weblogs\/wp-content\/uploads\/2026\/03\/Icone1.png\" alt=\"Icone\" \/><\/p>\n<p>Des \u00e9quations simples peuvent exhiber des comportements chaotiques complexes. Le physicien <a href=\"https:\/\/fr.wikipedia.org\/wiki\/Mitchell_Feigenbaum\">Mitchell Feigenbaum<\/a> a d\u00e9couvert dans ce diagramme une constante universelle.<\/p>\n<p><strong>D\u00e9p\u00f4t GitHub :<\/strong> <a href=\"https:\/\/github.com\/habib256\/algo-chaos\/tree\/main\/1.SuiteLogistique\">algo-chaos\/1.SuiteLogistique<\/a><\/p>\n\n\n<p><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>D\u00e9couvrons la suite logistique Un+1 = r Un(1-Un) avec Python et matplotlib pour trouver le chaos qui s&#8217;y niche.<\/p><p><a class=\"more-link btn\" href=\"https:\/\/www.gistlabs.net\/weblogs\/algo-chaos-1-la-suite-logistique-et-son-diagramme-de-bifurcation\/\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":1842,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[551,9,12],"tags":[544,514,128,127,393,547,504,543,550],"class_list":["post-1820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algo-chaos","category-dev","category-sciences","tag-bifurcation","tag-chaos","tag-fractal","tag-mandelbrot","tag-math","tag-matplotlib","tag-python","tag-suite-logistique","tag-visualisation","item-wrap"],"_links":{"self":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/1820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/comments?post=1820"}],"version-history":[{"count":3,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/1820\/revisions"}],"predecessor-version":[{"id":1865,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/1820\/revisions\/1865"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/media\/1842"}],"wp:attachment":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/media?parent=1820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/categories?post=1820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/tags?post=1820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}