.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/complex_analysis/contour_integrals/plot_03_liouville_theorem.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_complex_analysis_contour_integrals_plot_03_liouville_theorem.py: Liouville's theorem: a bounded entire function is constant ========================================================== Cauchy's integral formula on the circle :math:`|z| = R` gives the estimate :math:`|f'(0)| \le M(R)/R`, where :math:`M(R)` is the maximum of :math:`|f|` on the circle. If :math:`f` is entire and bounded, letting :math:`R \to \infty` forces :math:`f' \equiv 0`. So every nonconstant entire function, such as :math:`\sin z`, is unbounded. Applied to :math:`1/p(z)`, the theorem proves the fundamental theorem of algebra. .. GENERATED FROM PYTHON SOURCE LINES 14-19 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from mathematicskit.complex_analysis import cauchy_integral_formula, circle_contour .. GENERATED FROM PYTHON SOURCE LINES 20-22 Cauchy's estimate :math:`|f'(0)| \le M(R)/R` --------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 22-36 .. code-block:: Python radii = np.geomspace(0.5, 20, 12) functions = {r"$\sin z$": np.sin, r"$z^3 - z$": lambda z: z**3 - z, r"$e^{-z^2}$": lambda z: np.exp(-(z**2))} fig, ax = plt.subplots() for name, f in functions.items(): max_modulus = np.array([np.max(np.abs(f(circle_contour(0, R).points(2000)))) for R in radii]) ax.loglog(radii, max_modulus, "o-", label=f"M(R) for {name}") derivative = abs(cauchy_integral_formula(f, circle_contour(0, 1.0), 0.0, n=1)) print(f"{name:12s} |f'(0)| = {derivative:.4f}, min over R of M(R)/R = {np.min(max_modulus / radii):.4f}") ax.set_xlabel("R") ax.set_ylabel("max |f| on |z| = R") ax.set_title("Nonconstant entire functions are unbounded") ax.legend() .. image-sg:: /api/gallery/complex_analysis/contour_integrals/images/sphx_glr_plot_03_liouville_theorem_001.png :alt: Nonconstant entire functions are unbounded :srcset: /api/gallery/complex_analysis/contour_integrals/images/sphx_glr_plot_03_liouville_theorem_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none $\sin z$ |f'(0)| = 1.0000, min over R of M(R)/R = 1.0422 $z^3 - z$ |f'(0)| = 1.0000, min over R of M(R)/R = 1.2500 $e^{-z^2}$ |f'(0)| = 0.0000, min over R of M(R)/R = 2.3319 .. GENERATED FROM PYTHON SOURCE LINES 37-41 The fundamental theorem of algebra ---------------------------------- If p had no roots, 1/p would be entire; it also tends to 0 as :math:`|z|` grows, so it would be bounded, hence constant -- impossible for a nonconstant p. .. GENERATED FROM PYTHON SOURCE LINES 41-46 .. code-block:: Python p = lambda z: z**4 + z + 1 for R in (1, 10, 100): print(f"R = {R:3d}: max |1/p| on |z| = R: {np.max(np.abs(1 / p(circle_contour(0, R).points(2000)))):.2e}") print("roots of p (where 1/p fails to be entire):", np.round(np.roots([1, 0, 0, 1, 1]), 4)) .. rst-class:: sphx-glr-script-out .. code-block:: none R = 1: max |1/p| on |z| = R: 1.93e+00 R = 10: max |1/p| on |z| = R: 1.00e-04 R = 100: max |1/p| on |z| = R: 1.00e-08 roots of p (where 1/p fails to be entire): [ 0.7271+0.9341j 0.7271-0.9341j -0.7271+0.43j -0.7271-0.43j ] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.162 seconds) .. _sphx_glr_download_api_gallery_complex_analysis_contour_integrals_plot_03_liouville_theorem.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../../lite/lab/index.html?path=api/gallery/complex_analysis/contour_integrals/plot_03_liouville_theorem.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_liouville_theorem.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_liouville_theorem.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_liouville_theorem.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_