.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_build/auto_examples/convergence/ImplicitRungeKutta_ivp.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__build_auto_examples_convergence_ImplicitRungeKutta_ivp.py: Convergence analysis of implicit Runge-Kutta methods for ODE IVP ================================================================ .. GENERATED FROM PYTHON SOURCE LINES 7-8 Evaluation of relative quadrature error with the following parameters: .. GENERATED FROM PYTHON SOURCE LINES 8-35 .. code-block:: Python eq_names = [ "y'' = -y" , "y'' = - exp(y)" , "y'' = xy" , "y' = Az; z' = By" , ] method_names = [ 'Gauss' , 'Radau_IA' , 'Radau_IIA' , 'Radau_IB' , 'Radau_IIB' , 'Lobatto_IIIA' , 'Lobatto_IIIB' , 'Lobatto_IIIC' , 'Lobatto_IIIC*' , 'Lobatto_IIID' , 'Lobatto_IIIS' , ] # all_orders = range(2,6) all_orders = [4] .. GENERATED FROM PYTHON SOURCE LINES 118-119 The following plots give the measured relative error as a function of the number of quadrature subintervals .. GENERATED FROM PYTHON SOURCE LINES 119-124 .. code-block:: Python plt.show() .. image-sg:: /_build/auto_examples/convergence/images/sphx_glr_ImplicitRungeKutta_ivp_001.png :alt: Relative error on integrand y'' = -y, Relative error on integrand y'' = - exp(y), Relative error on integrand y'' = xy, Relative error on integrand y' = Az; z' = By :srcset: /_build/auto_examples/convergence/images/sphx_glr_ImplicitRungeKutta_ivp_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 171-172 Error as a function of running time .. GENERATED FROM PYTHON SOURCE LINES 172-177 .. code-block:: Python plt.show() .. image-sg:: /_build/auto_examples/convergence/images/sphx_glr_ImplicitRungeKutta_ivp_002.png :alt: Relative error as a function of computational cost for equation y'' = -y, Relative error as a function of computational cost for equation y'' = - exp(y), Relative error as a function of computational cost for equation y'' = xy, Relative error as a function of computational cost for equation y' = Az; z' = By :srcset: /_build/auto_examples/convergence/images/sphx_glr_ImplicitRungeKutta_ivp_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.499 seconds) .. _sphx_glr_download__build_auto_examples_convergence_ImplicitRungeKutta_ivp.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: ImplicitRungeKutta_ivp.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: ImplicitRungeKutta_ivp.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_