<jupyter_start><jupyter_text>Links zu Dokumentationen/Tutorials für IPython/Python/numpy/matplotlib/git sowie die Sourcodes findet ihr im [GitHub Repo](https://github.com/BerndSchwarzenbacher/numdiff).<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import pylab
from math import sqrt
%matplotlib inline
pylab.rcParams['figure.figsize'] = (5.0, 5.0)
def plotStabBereich(g):
    delta = 0.1;
    re = np.arange(-8, 8, delta)
    im = np.arange(-8, 8, delta)
    Re, Im = np.meshgrid(re, im)

    gfunc = np.vectorize(g)
    plt.figure()
    c1 = plt.contourf(Re, Im, (abs(gfunc(Re+1j*Im))), [0, 1], colors = ('b', 'r' ), extend='max')
    c1.cmap.set_over('red')
    plt.grid()
    plt.colorbar(c1)
    plt.show()
def plotStabBereichRK(A, b):
    n = b.size
    plotStabBereich(lambda z:
        (1 + z * np.dot(np.dot(b.T, np.linalg.inv(np.eye(n) - z * A)), np.ones(n))))<jupyter_output><empty_output><jupyter_text>Expliziter Euler<jupyter_code>A = np.array([[0]])
b = np.array([1])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>Impliziter Euler<jupyter_code>A = np.array([[1]])
b = np.array([1])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>Verbesserter Euler<jupyter_code>A = np.array([[0, 0], [1, 0]])
b = np.array([0, 1])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>Heun<jupyter_code>A = np.array([[0, 0, 0], [1/3, 0, 0], [0, 2/3, 0]])
b = np.array([1/4, 0, 3/4])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>klassische RK<jupyter_code>A = np.array([[0, 0, 0, 0], [0.5, 0, 0, 0], [0, 0.5, 0, 0], [0, 0, 1, 0]])
b = np.array([1/6, 2/6, 2/6, 1/6])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>Gauss2<jupyter_code>A = np.array([[1/4, 1/4 - sqrt(3)/6], [1/4 + sqrt(3)/6, 1/4]])
b = np.array([0.5, 0.5])
plotStabBereichRK(A, b)<jupyter_output><empty_output><jupyter_text>Gauss-Radau2<jupyter_code>A = np.array([[1/4, -1/4], [1/4, 5/12]])
b = np.array([1/4, 3/4])
plotStabBereichRK(A, b)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20382165605095542, 'fraction_numerical': 0.04899559039686428, 'mean_word_length': 5.1878787878787875, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '125066', 'license': 'MIT', 'n_tokens_mistral': 1024, 'n_tokens_neox': 962, 'n_words': 159, 'path': 'ueb5/ex20.ipynb', 'repo_name': 'BerndSchwarzenbacher/numdiff', 'size': '2041'}