.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples_gallery/simple_pdes/klein_gordon.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_simple_pdes_klein_gordon.py: Klein-Gordon equation ===================== This example solves the Klein-Gordon equation in one dimension, showing the effect of the mass term on wave propagation. With mass=0 the equation reduces to the standard wave equation; increasing the mass introduces dispersion. .. GENERATED FROM PYTHON SOURCE LINES 9-19 .. image-sg:: /examples_gallery/simple_pdes/images/sphx_glr_klein_gordon_001.png :alt: klein gordon :srcset: /examples_gallery/simple_pdes/images/sphx_glr_klein_gordon_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none 0%| | 0/50.0 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: klein_gordon.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: klein_gordon.zip `