Anfangswertaufgaben für gewöhnliche Differentialgleichungen

Gegeben sei eine Differentialgleichung in der Form:

$$\frac{df}{dt} = RHS(t,f)$$

Die rechte Seite der Gleichung $RHS$ lässt sich also als Steigung in Abhängigkeit von $t$ und $f$ interpretieren.

In unserem Beispiel sei die rechte Seite der Gleichung

$$RHS(t,f) = \sqrt{(t+1)} \cdot \sin(f)$$

und damit

$$\frac{df}{dt} = \sqrt{(t+1)} \cdot \sin(f)$$

Auf einer $(f,t)$-Ebene lässt sich nun das zugehörige Richtungsfeld (Steigungsfeld) durch Auswerten der rechten Seite darstellen:


In [1]:
import matplotlib.pyplot as plt
import numpy as np
import math
%config InlineBackend.figure_format = 'svg'
%matplotlib inline

# rechte Seite der Gleichung (left hand side)
def RHS(t,f):
    return np.cos(t) + np.sin(f)

# Array mit äquidistanten Werten für lambda und Festlegen der Re-Zahl:
t = np.arange(0.01, 10, 0.4)
f = np.arange(0.0, 10, 0.4)
[gt,gf] = np.meshgrid(t,f)

# Vektoren des Richtungsfeldes
rt = 1 / np.sqrt(1 + RHS(gt, gf)**2)
rf = rt * RHS(gt, gf)

plt.figure(figsize=(5, 4))
plt.quiver(t,f,rt,rf, width=0.002)
plt.ylabel('f(t)')
plt.xlabel('t')
plt.show();


Soll nun eine spezielle Lösung der Differentialgleichung gefunden werden, so ist die Vorgabe von Anfangsbedingungen $t_0$ und $f(t_0)$ notwendig.

Ausgehend von dieser Anfangsbedingung lässt sich die Differentialgleichung integrieren. Hierzu stehen verschiedene Verfahren, wie Euler-Vorwärts, Euler-Rückwärts oder Runge-Kutta-Verfahren zur Verfügung.

Euler-Vorwärts Verfahren (explizites Euler-Verfahren)

Beim expliziten Euler-Verfahren, wird im bereits bekannten Punkt $(t_i, f(t_i))$ die Steigung $m=RHS(t_i, f_i)$ berechnet und damit eine Gleichung der Tangente in diesem Punkt aufgestellt:

$$f(t) = f(t_i) + (t-t_i) \cdot m$$

Mit einer gewählten Zeitschrittweite $\Delta t$ ergibt sich somit der Funktionswert zum nächsten Zeitpunkt durch

$$f(t_{i+1}) = f(t_i) + \Delta t \cdot RHS(f(t_i), t_i)$$

Das Verfahren weist einen lokalen Diskretisierungsfehler von der Konvergenzordnung $\mathcal O(\Delta t)$ auf. D.h. der Diskretisierungsfehler geht mit der Ordnung Eins gegen Null, wenn $\Delta T$ gegen Null geht.


In [6]:
def Euler_explizit(rhs, t0, f0, t_max, delta_t):
    tis = np.arange(t0, t_max, delta_t)
    fis = np.empty_like(tis)
    for i, ti in enumerate(tis):
        if i == 0:
            fis[i] = f0
        else:
            fis[i] = fis[i-1] + delta_t * rhs(tis[i-1], fis[i-1])
    return tis, fis


tis, fis = Euler_explizit(RHS, t0=0.0, f0=5.0, t_max=10.0, delta_t=2)
plt.figure(figsize=(5, 4))
plt.plot(tis, fis, 'b', label='Euler explizit, $\Delta t = 1,0$')
tis, fis = Euler_explizit(RHS, t0=0.0, f0=5.0, t_max=10.0, delta_t=0.01)
plt.plot(tis, fis, 'g', label='Euler explizit, $\Delta t = 0,1$')

plt.quiver(t,f,rt,rf, width=0.002)
plt.ylabel('f(t)')
plt.xlabel('t')
#plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.show();


Euler-Rückwärts Verfahren (implizites Euler-Verfahren)

Beim impliziten Euler-Verfahren wird zur näherungsweisen Berechung des neuen Funktionswerts nicht die Steigung am bereits bekannten Punkt verwendet, sondern die Steigung am neu zu findenden Punkt. Es ergibt sich dadurch eine implizite Gleichung, die iterativ - z.B. mit dem Newton-Verfahren - zu jedem Zeitschritt gelöst werden muss:

$$f(t_{i+1}) = f(t_i) + \Delta t \cdot RHS(t_{i+1}, f(t_{i+1}))$$

Runge-Kutta-Verfahren (4. Ordnung, explizit, RK4)

Das klassische Runge-Kutta-Verfahren ist ein explizites Verfahren 4. Ordnung, das bei gleicher Schrittweite eine deutlich höhere Genauigkeit aufweist, als das explizite Euler Verfahren.

Erreicht wird dies durch zusätzliche Stützstellen in der Intervallmitte und am Intervallende, an denen ebenfalls die Steigung ermittelt wird:

$\qquad\qquad m_1 = RHS\left(t_i, f_i)\right)$

$\qquad\qquad m_2 = RHS\left(t_i + \frac{\Delta t}{2}, f_i + \frac{\Delta t}{2} \cdot m_1\right)$

$\qquad\qquad m_3 = RHS\left(t_i + \frac{\Delta t}{2}, f_i + \frac{\Delta t}{2} \cdot m_2\right)$

$\qquad\qquad m_4 = RHS\left(t_i + \Delta t, f_i + \Delta t \cdot m_3\right)$

Über eine gewichtete Mittelung der Steigungen lässt sich der Funktionswert zum neuen Zeitpunkt dann genauer berechnen:

$$f(t_{i+1}) = f(t_i) + \frac{1}{6} \Delta t \cdot \left(m_1 + 2\cdot m_2 + 2\cdot m_3 + m_4\right)$$

Das Verfahren weist einen Diskretisierungsfehler von der Konvergenzordnung $\mathcal O(\Delta t^4)$ auf. D.h. der Diskretisierungsfehler geht mit 4. Ordnung gegen Null, wenn $\Delta T$ gegen Null geht.


In [13]:
def RungeKutta4(rhs, t0, f0, t_max, delta_t):
    tis = np.arange(t0, t_max, delta_t)
    fis = np.empty_like(tis)
    for i in range(0,tis.size):
        ti =tis[i]
        if i == 0:
            fis[i] = f0
        else:
            m1 = rhs(tis[i-1], fis[i-1])
            m2 = rhs(tis[i-1]+0.5*delta_t, fis[i-1]+0.5*delta_t*m1)
            m3 = rhs(tis[i-1]+0.5*delta_t, fis[i-1]+0.5*delta_t*m2)
            m4 = rhs(tis[i-1]+delta_t, fis[i-1]+delta_t*m3)
            fis[i] = fis[i-1] + (1/6)* delta_t * (m1 + 2*m2+ 2*m3 + m4)
    return tis, fis

plt.figure(figsize=(4.5, 4))
tis, fis = Euler_explizit(RHS, t0=0.0, f0=3.0, t_max=10.0, delta_t=0.5)
plt.plot(tis, fis, 'b', label='Euler explizit, $\Delta t = 0.1$')
tis, fis = RungeKutta4(RHS, t0=0.0, f0=3.0, t_max=10.0, delta_t=0.5)
plt.plot(tis, fis, 'g', label='Runge Kutta, $\Delta t = 1.0$')

plt.quiver(t,f,rt,rf, width=0.002)
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.ylabel('f(t)')
plt.xlabel('t')
plt.show();


Schrittweitensteuerung und das Runge-Kutta-Fehlberg Verfahren (RKF45)

Die in jedem Zeitschritt gemachten Fehler hängen entscheidend von der Schrittweite des Verfahrens ab. Ist die Schrittweite zu groß, wird der Diskretisierungsfehler groß (mit $\mathcal O(\Delta t^p)$). Andererseits gewinnen bei zu kleiner Schrittweite Rundungsfehler an Bedeutung. Es existiert also eine optimale Schrittweite für genauste Resultate.

Die Strategie in der Praxis ist, die Schrittweite möglichst groß zu wählen, so dass gerade noch die gewünschte Genauigkeit eingehalten wird. Die Schwierigkeit liegt dann darin, die Genauigkeit des Verfahrens abzuschätzen.

Eine gängige Methode dazu ist der Vergleich der Lösungen zweier Diskretisierungsverfahren, die sich in der Konvergenzordnung um 1 unterscheiden.

Ein häufig verwendetes Verfahren ist das Runge-Kutta-Fehlberg Verfahren, das ähnlich aufgebaut ist, wie das RK4-Verfahren. Es hat den Vorteil, dass die an den Zwischenstellen berechneten Steigungen sowohl in einem Verfahren 4. Ordnung als auch in einem mit 5. Ordnung verwendet werden können und somit der Rechenaufwand gering bleibt.

$m_1 = RHS\left[t_i, f_i\right]$

$m_2 = RHS\left[t_i + \frac{1}{4}\Delta t, f_i + \Delta t\cdot \frac{1}{4}m_1\right]$

$m_3 = RHS\left[t_i + \frac{3}{8}\Delta t, f_i + \Delta t\cdot\left(\frac{3}{32}m_1 + \frac{9}{32}m_2\right)\right]$

$m_4 = RHS\left[t_i + \frac{12}{13}\Delta t, f_i + \Delta t\cdot\left(\frac{1932}{2197}m_1 - \frac{7200}{2197}m_2 + \frac{7296}{2197}m_3\right)\right]$

$m_5 = RHS\left[t_i + \Delta t, f_i + \Delta t\cdot\left(\frac{439}{216}m_1 - 8 m_2 + \frac{3680}{513}m_3 - \frac{845}{4104}m_4\right)\right]$

$m_6 = RHS\left[t_i + \frac{1}{2}\Delta t, f_i + \Delta t\cdot\left(-\frac{8}{27}m_1 + 2 m_2 - \frac{3544}{2565}m_3 + \frac{1859}{4104}m_4 - \frac{11}{40}m_5\right)\right]$

Die Lösung mit einem Runge-Kutta-Verfahren 4. Ordnung ergibt sich dann aus:

$f^4(t_{i+1}) = f(t_i) + \Delta t \cdot \left(\frac{25}{216}m_1 + \frac{1408}{2565}m_3 + \frac{2197}{4101}m_4 - \frac{1}{5}m_5 \right)$

mit den vier Steigungen $m_1$, $m_3$, $m_4$ und $m_5$. Die Steigung $m_2$ wird für diese Lösung nicht benötigt.

Eine genauere Lösung wird mit dem Runge-Kutta-Verfahren 5. Ordnung berechnet:

$f^5(t_{i+1}) = f(t_i) + \Delta t \cdot \left(\frac{16}{135}m_1 + \frac{6656}{12825}m_3 + \frac{28561}{56430}m_4 - \frac{9}{50}m_5 + \frac{2}{55}m_6 \right)$

Die optimale Schrittweite lässt sich dann durch Multiplikation der aktuellen Schrittweite mit dem Skalar $s$ unter Angabe einer erlaubten Toleranz $tol$ ermitteln:

$s = \left(\frac{tol\cdot\Delta t_{alt}}{2\left|f^5(t_{i+1}) - f^4(t_{i+1}\right|}\right)^{1/4}$

$\Delta t_{neu} = s \cdot \Delta t_{alt}$


In [14]:
def RKF45(rhs, t0, f0, t_max, delta_t_start, tol):
    tis = []
    fis = []
    tis.append(t0)
    fis.append(f0)
    delta_t = delta_t_start
    while tis[-1] < t_max:
        m1 = rhs(tis[-1], fis[-1])
        m2 = rhs(tis[-1]+1/4*delta_t, fis[-1] + delta_t*1/4*m1)
        m3 = rhs(tis[-1]+3/8*delta_t, fis[-1]+ delta_t*(3/32*m1+9/32*m2))
        m4 = rhs(tis[-1]+12/13*delta_t, fis[-1]+ delta_t*(1932/2197*m1-7200/2197*m2+7296/2197*m3))
        m5 = rhs(tis[-1]+delta_t, fis[-1]+ delta_t*(439/216*m1-8*m2+3680/513*m3-845/4104*m4))
        m6 = rhs(tis[-1]+1/2*delta_t, fis[-1]+ delta_t*(-8/27*m1+2*m2-3544/2565*m3+1859/4104*m4-11/40*m5))
        fo4 = fis[-1] + delta_t * (25/216*m1+1408/2565*m3+2197/4101*m4-1/5*m5)
        fo5 = fis[-1] + delta_t * (16/135*m1+6656/12825*m3+28561/56430*m4-9/50*m5+2/55*m6)
        tis.append(tis[-1]+delta_t)
        fis.append(fo5)
        print ("t = %6.3f, f = %6.3f, delta_t = %6.3f" % (tis[-1], fis[-1], delta_t))
        
        #neue Zeitschrittweite:
        s = (tol*delta_t/(2*abs(fo5-fo4)))**0.25
        delta_t = max(delta_t*s, 0.01 * delta_t_start)
        
    return np.array(tis), np.array(fis)

plt.figure(figsize=(5, 4))
tis, fis = RungeKutta4(RHS, t0=0.0, f0=5.0, t_max=10.0, delta_t=1)
plt.plot(tis, fis, 'g', label='Runge Kutta, $\Delta t = 1,0$')

tis, fis = RKF45(RHS, t0=0.0, f0=5.0, t_max=10.0, delta_t_start=1, tol=0.0001)
plt.plot(tis, fis, 'b', label='RKF45')

plt.quiver(t,f,rt,rf, width=0.002)
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.ylabel('f(t)')
plt.xlabel('t')
plt.show();


t =  1.000, f =  4.878, delta_t =  1.000
t =  1.711, f =  4.326, delta_t =  0.711
t =  2.110, f =  3.870, delta_t =  0.399
t =  2.340, f =  3.602, delta_t =  0.230
t =  2.474, f =  3.453, delta_t =  0.133
t =  2.551, f =  3.369, delta_t =  0.078
t =  2.597, f =  3.321, delta_t =  0.046
t =  2.624, f =  3.293, delta_t =  0.027
t =  2.641, f =  3.277, delta_t =  0.016
t =  2.651, f =  3.267, delta_t =  0.010
t =  2.661, f =  3.257, delta_t =  0.010
t =  2.671, f =  3.247, delta_t =  0.010
t =  2.681, f =  3.237, delta_t =  0.010
t =  2.691, f =  3.227, delta_t =  0.010
t =  2.701, f =  3.217, delta_t =  0.010
t =  2.711, f =  3.207, delta_t =  0.010
t =  2.721, f =  3.198, delta_t =  0.010
t =  2.731, f =  3.188, delta_t =  0.010
t =  2.741, f =  3.178, delta_t =  0.010
t =  2.751, f =  3.169, delta_t =  0.010
t =  2.761, f =  3.159, delta_t =  0.010
t =  2.771, f =  3.150, delta_t =  0.010
t =  2.781, f =  3.141, delta_t =  0.010
t =  2.791, f =  3.131, delta_t =  0.010
t =  2.801, f =  3.122, delta_t =  0.010
t =  2.811, f =  3.113, delta_t =  0.010
t =  2.821, f =  3.104, delta_t =  0.010
t =  2.831, f =  3.095, delta_t =  0.010
t =  2.841, f =  3.086, delta_t =  0.010
t =  2.851, f =  3.077, delta_t =  0.010
t =  2.861, f =  3.068, delta_t =  0.010
t =  2.871, f =  3.059, delta_t =  0.010
t =  2.881, f =  3.050, delta_t =  0.010
t =  2.891, f =  3.041, delta_t =  0.010
t =  2.901, f =  3.033, delta_t =  0.010
t =  2.911, f =  3.024, delta_t =  0.010
t =  2.921, f =  3.016, delta_t =  0.010
t =  2.931, f =  3.007, delta_t =  0.010
t =  2.941, f =  2.999, delta_t =  0.010
t =  2.951, f =  2.990, delta_t =  0.010
t =  2.961, f =  2.982, delta_t =  0.010
t =  2.971, f =  2.974, delta_t =  0.010
t =  2.981, f =  2.966, delta_t =  0.010
t =  2.991, f =  2.958, delta_t =  0.010
t =  3.001, f =  2.950, delta_t =  0.010
t =  3.011, f =  2.942, delta_t =  0.010
t =  3.021, f =  2.934, delta_t =  0.010
t =  3.031, f =  2.926, delta_t =  0.010
t =  3.041, f =  2.918, delta_t =  0.010
t =  3.051, f =  2.910, delta_t =  0.010
t =  3.061, f =  2.903, delta_t =  0.010
t =  3.071, f =  2.895, delta_t =  0.010
t =  3.081, f =  2.888, delta_t =  0.010
t =  3.091, f =  2.880, delta_t =  0.010
t =  3.101, f =  2.873, delta_t =  0.010
t =  3.111, f =  2.866, delta_t =  0.010
t =  3.121, f =  2.858, delta_t =  0.010
t =  3.131, f =  2.851, delta_t =  0.010
t =  3.141, f =  2.844, delta_t =  0.010
t =  3.151, f =  2.837, delta_t =  0.010
t =  3.161, f =  2.830, delta_t =  0.010
t =  3.171, f =  2.823, delta_t =  0.010
t =  3.181, f =  2.816, delta_t =  0.010
t =  3.191, f =  2.810, delta_t =  0.010
t =  3.201, f =  2.803, delta_t =  0.010
t =  3.211, f =  2.796, delta_t =  0.010
t =  3.221, f =  2.790, delta_t =  0.010
t =  3.231, f =  2.783, delta_t =  0.010
t =  3.241, f =  2.777, delta_t =  0.010
t =  3.251, f =  2.771, delta_t =  0.010
t =  3.261, f =  2.764, delta_t =  0.010
t =  3.271, f =  2.758, delta_t =  0.010
t =  3.281, f =  2.752, delta_t =  0.010
t =  3.291, f =  2.746, delta_t =  0.010
t =  3.301, f =  2.740, delta_t =  0.010
t =  3.311, f =  2.734, delta_t =  0.010
t =  3.321, f =  2.728, delta_t =  0.010
t =  3.331, f =  2.722, delta_t =  0.010
t =  3.341, f =  2.717, delta_t =  0.010
t =  3.351, f =  2.711, delta_t =  0.010
t =  3.361, f =  2.705, delta_t =  0.010
t =  3.371, f =  2.700, delta_t =  0.010
t =  3.381, f =  2.694, delta_t =  0.010
t =  3.391, f =  2.689, delta_t =  0.010
t =  3.401, f =  2.684, delta_t =  0.010
t =  3.411, f =  2.679, delta_t =  0.010
t =  3.421, f =  2.673, delta_t =  0.010
t =  3.431, f =  2.668, delta_t =  0.010
t =  3.441, f =  2.663, delta_t =  0.010
t =  3.451, f =  2.658, delta_t =  0.010
t =  3.461, f =  2.654, delta_t =  0.010
t =  3.471, f =  2.649, delta_t =  0.010
t =  3.481, f =  2.644, delta_t =  0.010
t =  3.491, f =  2.640, delta_t =  0.010
t =  3.501, f =  2.635, delta_t =  0.010
t =  3.511, f =  2.630, delta_t =  0.010
t =  3.521, f =  2.626, delta_t =  0.010
t =  3.531, f =  2.622, delta_t =  0.010
t =  3.541, f =  2.618, delta_t =  0.010
t =  3.551, f =  2.613, delta_t =  0.010
t =  3.561, f =  2.609, delta_t =  0.010
t =  3.571, f =  2.605, delta_t =  0.010
t =  3.581, f =  2.601, delta_t =  0.010
t =  3.591, f =  2.597, delta_t =  0.010
t =  3.601, f =  2.594, delta_t =  0.010
t =  3.611, f =  2.590, delta_t =  0.010
t =  3.621, f =  2.586, delta_t =  0.010
t =  3.631, f =  2.583, delta_t =  0.010
t =  3.641, f =  2.579, delta_t =  0.010
t =  3.651, f =  2.576, delta_t =  0.010
t =  3.661, f =  2.572, delta_t =  0.010
t =  3.671, f =  2.569, delta_t =  0.010
t =  3.681, f =  2.566, delta_t =  0.010
t =  3.691, f =  2.563, delta_t =  0.010
t =  3.701, f =  2.560, delta_t =  0.010
t =  3.711, f =  2.557, delta_t =  0.010
t =  3.721, f =  2.554, delta_t =  0.010
t =  3.731, f =  2.551, delta_t =  0.010
t =  3.741, f =  2.549, delta_t =  0.010
t =  3.751, f =  2.546, delta_t =  0.010
t =  3.761, f =  2.543, delta_t =  0.010
t =  3.771, f =  2.541, delta_t =  0.010
t =  3.781, f =  2.539, delta_t =  0.010
t =  3.791, f =  2.536, delta_t =  0.010
t =  3.801, f =  2.534, delta_t =  0.010
t =  3.811, f =  2.532, delta_t =  0.010
t =  3.821, f =  2.530, delta_t =  0.010
t =  3.831, f =  2.528, delta_t =  0.010
t =  3.841, f =  2.526, delta_t =  0.010
t =  3.851, f =  2.524, delta_t =  0.010
t =  3.861, f =  2.522, delta_t =  0.010
t =  3.871, f =  2.521, delta_t =  0.010
t =  3.881, f =  2.519, delta_t =  0.010
t =  3.891, f =  2.517, delta_t =  0.010
t =  3.901, f =  2.516, delta_t =  0.010
t =  3.911, f =  2.515, delta_t =  0.010
t =  3.921, f =  2.513, delta_t =  0.010
t =  3.931, f =  2.512, delta_t =  0.010
t =  3.941, f =  2.511, delta_t =  0.010
t =  3.952, f =  2.510, delta_t =  0.011
t =  3.963, f =  2.509, delta_t =  0.011
t =  3.976, f =  2.508, delta_t =  0.012
t =  3.990, f =  2.507, delta_t =  0.014
t =  4.006, f =  2.506, delta_t =  0.016
t =  4.026, f =  2.505, delta_t =  0.020
t =  4.052, f =  2.504, delta_t =  0.027
t =  4.095, f =  2.504, delta_t =  0.043
t =  4.169, f =  2.507, delta_t =  0.074
t =  4.255, f =  2.517, delta_t =  0.086
t =  4.340, f =  2.532, delta_t =  0.084
t =  4.415, f =  2.549, delta_t =  0.075
t =  4.477, f =  2.568, delta_t =  0.063
t =  4.528, f =  2.584, delta_t =  0.050
t =  4.567, f =  2.598, delta_t =  0.039
t =  4.597, f =  2.610, delta_t =  0.030
t =  4.620, f =  2.619, delta_t =  0.023
t =  4.637, f =  2.626, delta_t =  0.017
t =  4.650, f =  2.631, delta_t =  0.013
t =  4.660, f =  2.636, delta_t =  0.010
t =  4.670, f =  2.640, delta_t =  0.010
t =  4.680, f =  2.644, delta_t =  0.010
t =  4.690, f =  2.649, delta_t =  0.010
t =  4.700, f =  2.653, delta_t =  0.010
t =  4.710, f =  2.658, delta_t =  0.010
t =  4.720, f =  2.663, delta_t =  0.010
t =  4.730, f =  2.667, delta_t =  0.010
t =  4.740, f =  2.672, delta_t =  0.010
t =  4.750, f =  2.677, delta_t =  0.010
t =  4.760, f =  2.682, delta_t =  0.010
t =  4.770, f =  2.687, delta_t =  0.010
t =  4.780, f =  2.692, delta_t =  0.010
t =  4.790, f =  2.697, delta_t =  0.010
t =  4.800, f =  2.702, delta_t =  0.010
t =  4.810, f =  2.707, delta_t =  0.010
t =  4.820, f =  2.712, delta_t =  0.010
t =  4.830, f =  2.718, delta_t =  0.010
t =  4.840, f =  2.723, delta_t =  0.010
t =  4.850, f =  2.728, delta_t =  0.010
t =  4.860, f =  2.734, delta_t =  0.010
t =  4.870, f =  2.739, delta_t =  0.010
t =  4.880, f =  2.745, delta_t =  0.010
t =  4.890, f =  2.750, delta_t =  0.010
t =  4.900, f =  2.756, delta_t =  0.010
t =  4.910, f =  2.761, delta_t =  0.010
t =  4.920, f =  2.767, delta_t =  0.010
t =  4.930, f =  2.773, delta_t =  0.010
t =  4.940, f =  2.779, delta_t =  0.010
t =  4.950, f =  2.784, delta_t =  0.010
t =  4.960, f =  2.790, delta_t =  0.010
t =  4.970, f =  2.796, delta_t =  0.010
t =  4.980, f =  2.802, delta_t =  0.010
t =  4.990, f =  2.808, delta_t =  0.010
t =  5.000, f =  2.814, delta_t =  0.010
t =  5.010, f =  2.820, delta_t =  0.010
t =  5.020, f =  2.826, delta_t =  0.010
t =  5.030, f =  2.833, delta_t =  0.010
t =  5.040, f =  2.839, delta_t =  0.010
t =  5.050, f =  2.845, delta_t =  0.010
t =  5.060, f =  2.851, delta_t =  0.010
t =  5.070, f =  2.857, delta_t =  0.010
t =  5.080, f =  2.864, delta_t =  0.010
t =  5.090, f =  2.870, delta_t =  0.010
t =  5.100, f =  2.877, delta_t =  0.010
t =  5.110, f =  2.883, delta_t =  0.010
t =  5.120, f =  2.889, delta_t =  0.010
t =  5.130, f =  2.896, delta_t =  0.010
t =  5.140, f =  2.902, delta_t =  0.010
t =  5.150, f =  2.909, delta_t =  0.010
t =  5.160, f =  2.915, delta_t =  0.010
t =  5.170, f =  2.922, delta_t =  0.010
t =  5.180, f =  2.929, delta_t =  0.010
t =  5.190, f =  2.935, delta_t =  0.010
t =  5.200, f =  2.942, delta_t =  0.010
t =  5.210, f =  2.949, delta_t =  0.010
t =  5.220, f =  2.955, delta_t =  0.010
t =  5.230, f =  2.962, delta_t =  0.010
t =  5.240, f =  2.969, delta_t =  0.010
t =  5.250, f =  2.976, delta_t =  0.010
t =  5.260, f =  2.982, delta_t =  0.010
t =  5.270, f =  2.989, delta_t =  0.010
t =  5.280, f =  2.996, delta_t =  0.010
t =  5.290, f =  3.003, delta_t =  0.010
t =  5.300, f =  3.010, delta_t =  0.010
t =  5.310, f =  3.016, delta_t =  0.010
t =  5.320, f =  3.023, delta_t =  0.010
t =  5.330, f =  3.030, delta_t =  0.010
t =  5.340, f =  3.037, delta_t =  0.010
t =  5.350, f =  3.044, delta_t =  0.010
t =  5.360, f =  3.051, delta_t =  0.010
t =  5.370, f =  3.058, delta_t =  0.010
t =  5.380, f =  3.065, delta_t =  0.010
t =  5.390, f =  3.072, delta_t =  0.010
t =  5.400, f =  3.079, delta_t =  0.010
t =  5.410, f =  3.086, delta_t =  0.010
t =  5.420, f =  3.093, delta_t =  0.010
t =  5.430, f =  3.100, delta_t =  0.010
t =  5.440, f =  3.107, delta_t =  0.010
t =  5.450, f =  3.114, delta_t =  0.010
t =  5.460, f =  3.121, delta_t =  0.010
t =  5.470, f =  3.128, delta_t =  0.010
t =  5.480, f =  3.135, delta_t =  0.010
t =  5.490, f =  3.142, delta_t =  0.010
t =  5.500, f =  3.149, delta_t =  0.010
t =  5.510, f =  3.156, delta_t =  0.010
t =  5.520, f =  3.163, delta_t =  0.010
t =  5.530, f =  3.170, delta_t =  0.010
t =  5.540, f =  3.177, delta_t =  0.010
t =  5.550, f =  3.184, delta_t =  0.010
t =  5.560, f =  3.191, delta_t =  0.010
t =  5.570, f =  3.198, delta_t =  0.010
t =  5.580, f =  3.205, delta_t =  0.010
t =  5.590, f =  3.212, delta_t =  0.010
t =  5.600, f =  3.219, delta_t =  0.010
t =  5.610, f =  3.226, delta_t =  0.010
t =  5.620, f =  3.233, delta_t =  0.010
t =  5.630, f =  3.240, delta_t =  0.010
t =  5.640, f =  3.247, delta_t =  0.010
t =  5.650, f =  3.254, delta_t =  0.010
t =  5.660, f =  3.261, delta_t =  0.010
t =  5.670, f =  3.268, delta_t =  0.010
t =  5.680, f =  3.274, delta_t =  0.010
t =  5.690, f =  3.281, delta_t =  0.010
t =  5.700, f =  3.288, delta_t =  0.010
t =  5.710, f =  3.295, delta_t =  0.010
t =  5.720, f =  3.302, delta_t =  0.010
t =  5.730, f =  3.309, delta_t =  0.010
t =  5.740, f =  3.316, delta_t =  0.010
t =  5.750, f =  3.323, delta_t =  0.010
t =  5.760, f =  3.329, delta_t =  0.010
t =  5.770, f =  3.336, delta_t =  0.010
t =  5.780, f =  3.343, delta_t =  0.010
t =  5.790, f =  3.350, delta_t =  0.010
t =  5.800, f =  3.356, delta_t =  0.010
t =  5.810, f =  3.363, delta_t =  0.010
t =  5.820, f =  3.370, delta_t =  0.010
t =  5.830, f =  3.376, delta_t =  0.010
t =  5.840, f =  3.383, delta_t =  0.010
t =  5.850, f =  3.390, delta_t =  0.010
t =  5.860, f =  3.396, delta_t =  0.010
t =  5.870, f =  3.403, delta_t =  0.010
t =  5.880, f =  3.410, delta_t =  0.010
t =  5.890, f =  3.416, delta_t =  0.010
t =  5.900, f =  3.423, delta_t =  0.010
t =  5.910, f =  3.429, delta_t =  0.010
t =  5.920, f =  3.436, delta_t =  0.010
t =  5.930, f =  3.442, delta_t =  0.010
t =  5.940, f =  3.448, delta_t =  0.010
t =  5.950, f =  3.455, delta_t =  0.010
t =  5.960, f =  3.461, delta_t =  0.010
t =  5.970, f =  3.467, delta_t =  0.010
t =  5.980, f =  3.474, delta_t =  0.010
t =  5.990, f =  3.480, delta_t =  0.010
t =  6.000, f =  3.486, delta_t =  0.010
t =  6.010, f =  3.492, delta_t =  0.010
t =  6.020, f =  3.499, delta_t =  0.010
t =  6.030, f =  3.505, delta_t =  0.010
t =  6.040, f =  3.511, delta_t =  0.010
t =  6.050, f =  3.517, delta_t =  0.010
t =  6.060, f =  3.523, delta_t =  0.010
t =  6.070, f =  3.529, delta_t =  0.010
t =  6.080, f =  3.535, delta_t =  0.010
t =  6.090, f =  3.541, delta_t =  0.010
t =  6.100, f =  3.547, delta_t =  0.010
t =  6.110, f =  3.553, delta_t =  0.010
t =  6.120, f =  3.559, delta_t =  0.010
t =  6.130, f =  3.564, delta_t =  0.010
t =  6.140, f =  3.570, delta_t =  0.010
t =  6.150, f =  3.576, delta_t =  0.010
t =  6.160, f =  3.582, delta_t =  0.010
t =  6.170, f =  3.587, delta_t =  0.010
t =  6.180, f =  3.593, delta_t =  0.010
t =  6.190, f =  3.598, delta_t =  0.010
t =  6.200, f =  3.604, delta_t =  0.010
t =  6.210, f =  3.609, delta_t =  0.010
t =  6.220, f =  3.615, delta_t =  0.010
t =  6.230, f =  3.620, delta_t =  0.010
t =  6.240, f =  3.626, delta_t =  0.010
t =  6.250, f =  3.631, delta_t =  0.010
t =  6.260, f =  3.636, delta_t =  0.010
t =  6.270, f =  3.641, delta_t =  0.010
t =  6.280, f =  3.647, delta_t =  0.010
t =  6.290, f =  3.652, delta_t =  0.010
t =  6.300, f =  3.657, delta_t =  0.010
t =  6.310, f =  3.662, delta_t =  0.010
t =  6.320, f =  3.667, delta_t =  0.010
t =  6.330, f =  3.672, delta_t =  0.010
t =  6.340, f =  3.677, delta_t =  0.010
t =  6.350, f =  3.682, delta_t =  0.010
t =  6.360, f =  3.686, delta_t =  0.010
t =  6.370, f =  3.691, delta_t =  0.010
t =  6.380, f =  3.696, delta_t =  0.010
t =  6.390, f =  3.701, delta_t =  0.010
t =  6.400, f =  3.705, delta_t =  0.010
t =  6.410, f =  3.710, delta_t =  0.010
t =  6.420, f =  3.714, delta_t =  0.010
t =  6.430, f =  3.719, delta_t =  0.010
t =  6.440, f =  3.723, delta_t =  0.010
t =  6.450, f =  3.727, delta_t =  0.010
t =  6.460, f =  3.732, delta_t =  0.010
t =  6.470, f =  3.736, delta_t =  0.010
t =  6.480, f =  3.740, delta_t =  0.010
t =  6.490, f =  3.744, delta_t =  0.010
t =  6.500, f =  3.748, delta_t =  0.010
t =  6.510, f =  3.752, delta_t =  0.010
t =  6.520, f =  3.756, delta_t =  0.010
t =  6.530, f =  3.760, delta_t =  0.010
t =  6.540, f =  3.764, delta_t =  0.010
t =  6.550, f =  3.768, delta_t =  0.010
t =  6.560, f =  3.772, delta_t =  0.010
t =  6.570, f =  3.776, delta_t =  0.010
t =  6.580, f =  3.779, delta_t =  0.010
t =  6.590, f =  3.783, delta_t =  0.010
t =  6.600, f =  3.786, delta_t =  0.010
t =  6.610, f =  3.790, delta_t =  0.010
t =  6.620, f =  3.793, delta_t =  0.010
t =  6.630, f =  3.796, delta_t =  0.010
t =  6.640, f =  3.800, delta_t =  0.010
t =  6.650, f =  3.803, delta_t =  0.010
t =  6.660, f =  3.806, delta_t =  0.010
t =  6.670, f =  3.809, delta_t =  0.010
t =  6.680, f =  3.812, delta_t =  0.010
t =  6.690, f =  3.815, delta_t =  0.010
t =  6.700, f =  3.818, delta_t =  0.010
t =  6.710, f =  3.821, delta_t =  0.010
t =  6.720, f =  3.824, delta_t =  0.010
t =  6.730, f =  3.827, delta_t =  0.010
t =  6.740, f =  3.829, delta_t =  0.010
t =  6.750, f =  3.832, delta_t =  0.010
t =  6.760, f =  3.834, delta_t =  0.010
t =  6.770, f =  3.837, delta_t =  0.010
t =  6.780, f =  3.839, delta_t =  0.010
t =  6.790, f =  3.842, delta_t =  0.010
t =  6.800, f =  3.844, delta_t =  0.010
t =  6.810, f =  3.846, delta_t =  0.010
t =  6.820, f =  3.848, delta_t =  0.010
t =  6.830, f =  3.850, delta_t =  0.010
t =  6.840, f =  3.852, delta_t =  0.010
t =  6.850, f =  3.854, delta_t =  0.010
t =  6.860, f =  3.856, delta_t =  0.010
t =  6.870, f =  3.858, delta_t =  0.010
t =  6.880, f =  3.860, delta_t =  0.010
t =  6.890, f =  3.861, delta_t =  0.010
t =  6.900, f =  3.863, delta_t =  0.010
t =  6.910, f =  3.864, delta_t =  0.010
t =  6.920, f =  3.866, delta_t =  0.010
t =  6.930, f =  3.867, delta_t =  0.010
t =  6.940, f =  3.868, delta_t =  0.010
t =  6.950, f =  3.870, delta_t =  0.010
t =  6.960, f =  3.871, delta_t =  0.010
t =  6.971, f =  3.872, delta_t =  0.010
t =  6.981, f =  3.873, delta_t =  0.011
t =  6.993, f =  3.874, delta_t =  0.012
t =  7.006, f =  3.875, delta_t =  0.013
t =  7.020, f =  3.876, delta_t =  0.014
t =  7.037, f =  3.877, delta_t =  0.016
t =  7.056, f =  3.878, delta_t =  0.020
t =  7.082, f =  3.879, delta_t =  0.026
t =  7.121, f =  3.880, delta_t =  0.039
t =  7.236, f =  3.874, delta_t =  0.115
t =  7.364, f =  3.857, delta_t =  0.128
t =  7.482, f =  3.830, delta_t =  0.118
t =  7.580, f =  3.800, delta_t =  0.098
t =  7.657, f =  3.771, delta_t =  0.077
t =  7.715, f =  3.747, delta_t =  0.058
t =  7.758, f =  3.728, delta_t =  0.043
t =  7.790, f =  3.714, delta_t =  0.031
t =  7.812, f =  3.703, delta_t =  0.023
t =  7.829, f =  3.695, delta_t =  0.016
t =  7.840, f =  3.689, delta_t =  0.011
t =  7.850, f =  3.684, delta_t =  0.010
t =  7.860, f =  3.679, delta_t =  0.010
t =  7.870, f =  3.673, delta_t =  0.010
t =  7.880, f =  3.668, delta_t =  0.010
t =  7.890, f =  3.663, delta_t =  0.010
t =  7.900, f =  3.657, delta_t =  0.010
t =  7.910, f =  3.652, delta_t =  0.010
t =  7.920, f =  3.647, delta_t =  0.010
t =  7.930, f =  3.641, delta_t =  0.010
t =  7.940, f =  3.635, delta_t =  0.010
t =  7.950, f =  3.630, delta_t =  0.010
t =  7.960, f =  3.624, delta_t =  0.010
t =  7.970, f =  3.618, delta_t =  0.010
t =  7.980, f =  3.613, delta_t =  0.010
t =  7.990, f =  3.607, delta_t =  0.010
t =  8.000, f =  3.601, delta_t =  0.010
t =  8.010, f =  3.595, delta_t =  0.010
t =  8.020, f =  3.589, delta_t =  0.010
t =  8.030, f =  3.583, delta_t =  0.010
t =  8.040, f =  3.577, delta_t =  0.010
t =  8.050, f =  3.571, delta_t =  0.010
t =  8.060, f =  3.565, delta_t =  0.010
t =  8.070, f =  3.559, delta_t =  0.010
t =  8.080, f =  3.552, delta_t =  0.010
t =  8.090, f =  3.546, delta_t =  0.010
t =  8.100, f =  3.540, delta_t =  0.010
t =  8.110, f =  3.534, delta_t =  0.010
t =  8.120, f =  3.527, delta_t =  0.010
t =  8.130, f =  3.521, delta_t =  0.010
t =  8.140, f =  3.514, delta_t =  0.010
t =  8.150, f =  3.508, delta_t =  0.010
t =  8.160, f =  3.501, delta_t =  0.010
t =  8.170, f =  3.495, delta_t =  0.010
t =  8.180, f =  3.488, delta_t =  0.010
t =  8.190, f =  3.482, delta_t =  0.010
t =  8.200, f =  3.475, delta_t =  0.010
t =  8.210, f =  3.468, delta_t =  0.010
t =  8.220, f =  3.462, delta_t =  0.010
t =  8.230, f =  3.455, delta_t =  0.010
t =  8.240, f =  3.448, delta_t =  0.010
t =  8.250, f =  3.441, delta_t =  0.010
t =  8.260, f =  3.434, delta_t =  0.010
t =  8.270, f =  3.428, delta_t =  0.010
t =  8.280, f =  3.421, delta_t =  0.010
t =  8.290, f =  3.414, delta_t =  0.010
t =  8.300, f =  3.407, delta_t =  0.010
t =  8.310, f =  3.400, delta_t =  0.010
t =  8.320, f =  3.393, delta_t =  0.010
t =  8.330, f =  3.386, delta_t =  0.010
t =  8.340, f =  3.379, delta_t =  0.010
t =  8.350, f =  3.372, delta_t =  0.010
t =  8.360, f =  3.365, delta_t =  0.010
t =  8.370, f =  3.358, delta_t =  0.010
t =  8.380, f =  3.351, delta_t =  0.010
t =  8.390, f =  3.344, delta_t =  0.010
t =  8.400, f =  3.337, delta_t =  0.010
t =  8.410, f =  3.329, delta_t =  0.010
t =  8.420, f =  3.322, delta_t =  0.010
t =  8.430, f =  3.315, delta_t =  0.010
t =  8.440, f =  3.308, delta_t =  0.010
t =  8.450, f =  3.301, delta_t =  0.010
t =  8.460, f =  3.293, delta_t =  0.010
t =  8.470, f =  3.286, delta_t =  0.010
t =  8.480, f =  3.279, delta_t =  0.010
t =  8.490, f =  3.272, delta_t =  0.010
t =  8.500, f =  3.265, delta_t =  0.010
t =  8.510, f =  3.257, delta_t =  0.010
t =  8.520, f =  3.250, delta_t =  0.010
t =  8.530, f =  3.243, delta_t =  0.010
t =  8.540, f =  3.236, delta_t =  0.010
t =  8.550, f =  3.228, delta_t =  0.010
t =  8.560, f =  3.221, delta_t =  0.010
t =  8.570, f =  3.214, delta_t =  0.010
t =  8.580, f =  3.206, delta_t =  0.010
t =  8.590, f =  3.199, delta_t =  0.010
t =  8.600, f =  3.192, delta_t =  0.010
t =  8.610, f =  3.185, delta_t =  0.010
t =  8.620, f =  3.177, delta_t =  0.010
t =  8.630, f =  3.170, delta_t =  0.010
t =  8.640, f =  3.163, delta_t =  0.010
t =  8.650, f =  3.155, delta_t =  0.010
t =  8.660, f =  3.148, delta_t =  0.010
t =  8.670, f =  3.141, delta_t =  0.010
t =  8.680, f =  3.134, delta_t =  0.010
t =  8.690, f =  3.126, delta_t =  0.010
t =  8.700, f =  3.119, delta_t =  0.010
t =  8.710, f =  3.112, delta_t =  0.010
t =  8.720, f =  3.105, delta_t =  0.010
t =  8.730, f =  3.097, delta_t =  0.010
t =  8.740, f =  3.090, delta_t =  0.010
t =  8.750, f =  3.083, delta_t =  0.010
t =  8.760, f =  3.076, delta_t =  0.010
t =  8.770, f =  3.068, delta_t =  0.010
t =  8.780, f =  3.061, delta_t =  0.010
t =  8.790, f =  3.054, delta_t =  0.010
t =  8.800, f =  3.047, delta_t =  0.010
t =  8.810, f =  3.040, delta_t =  0.010
t =  8.820, f =  3.033, delta_t =  0.010
t =  8.830, f =  3.025, delta_t =  0.010
t =  8.840, f =  3.018, delta_t =  0.010
t =  8.850, f =  3.011, delta_t =  0.010
t =  8.860, f =  3.004, delta_t =  0.010
t =  8.870, f =  2.997, delta_t =  0.010
t =  8.880, f =  2.990, delta_t =  0.010
t =  8.890, f =  2.983, delta_t =  0.010
t =  8.900, f =  2.976, delta_t =  0.010
t =  8.910, f =  2.969, delta_t =  0.010
t =  8.920, f =  2.962, delta_t =  0.010
t =  8.930, f =  2.955, delta_t =  0.010
t =  8.940, f =  2.948, delta_t =  0.010
t =  8.950, f =  2.941, delta_t =  0.010
t =  8.960, f =  2.934, delta_t =  0.010
t =  8.970, f =  2.927, delta_t =  0.010
t =  8.980, f =  2.921, delta_t =  0.010
t =  8.990, f =  2.914, delta_t =  0.010
t =  9.000, f =  2.907, delta_t =  0.010
t =  9.010, f =  2.900, delta_t =  0.010
t =  9.020, f =  2.893, delta_t =  0.010
t =  9.030, f =  2.887, delta_t =  0.010
t =  9.040, f =  2.880, delta_t =  0.010
t =  9.050, f =  2.873, delta_t =  0.010
t =  9.060, f =  2.867, delta_t =  0.010
t =  9.070, f =  2.860, delta_t =  0.010
t =  9.080, f =  2.853, delta_t =  0.010
t =  9.090, f =  2.847, delta_t =  0.010
t =  9.100, f =  2.840, delta_t =  0.010
t =  9.110, f =  2.834, delta_t =  0.010
t =  9.120, f =  2.827, delta_t =  0.010
t =  9.130, f =  2.821, delta_t =  0.010
t =  9.140, f =  2.815, delta_t =  0.010
t =  9.150, f =  2.808, delta_t =  0.010
t =  9.160, f =  2.802, delta_t =  0.010
t =  9.170, f =  2.796, delta_t =  0.010
t =  9.180, f =  2.789, delta_t =  0.010
t =  9.190, f =  2.783, delta_t =  0.010
t =  9.200, f =  2.777, delta_t =  0.010
t =  9.210, f =  2.771, delta_t =  0.010
t =  9.220, f =  2.765, delta_t =  0.010
t =  9.230, f =  2.759, delta_t =  0.010
t =  9.240, f =  2.752, delta_t =  0.010
t =  9.250, f =  2.746, delta_t =  0.010
t =  9.260, f =  2.740, delta_t =  0.010
t =  9.270, f =  2.735, delta_t =  0.010
t =  9.280, f =  2.729, delta_t =  0.010
t =  9.290, f =  2.723, delta_t =  0.010
t =  9.300, f =  2.717, delta_t =  0.010
t =  9.310, f =  2.711, delta_t =  0.010
t =  9.320, f =  2.705, delta_t =  0.010
t =  9.330, f =  2.700, delta_t =  0.010
t =  9.340, f =  2.694, delta_t =  0.010
t =  9.350, f =  2.688, delta_t =  0.010
t =  9.360, f =  2.683, delta_t =  0.010
t =  9.370, f =  2.677, delta_t =  0.010
t =  9.380, f =  2.672, delta_t =  0.010
t =  9.390, f =  2.666, delta_t =  0.010
t =  9.400, f =  2.661, delta_t =  0.010
t =  9.410, f =  2.656, delta_t =  0.010
t =  9.420, f =  2.650, delta_t =  0.010
t =  9.430, f =  2.645, delta_t =  0.010
t =  9.440, f =  2.640, delta_t =  0.010
t =  9.450, f =  2.635, delta_t =  0.010
t =  9.460, f =  2.630, delta_t =  0.010
t =  9.470, f =  2.625, delta_t =  0.010
t =  9.480, f =  2.620, delta_t =  0.010
t =  9.490, f =  2.615, delta_t =  0.010
t =  9.500, f =  2.610, delta_t =  0.010
t =  9.510, f =  2.605, delta_t =  0.010
t =  9.520, f =  2.600, delta_t =  0.010
t =  9.530, f =  2.595, delta_t =  0.010
t =  9.540, f =  2.590, delta_t =  0.010
t =  9.550, f =  2.586, delta_t =  0.010
t =  9.560, f =  2.581, delta_t =  0.010
t =  9.570, f =  2.577, delta_t =  0.010
t =  9.580, f =  2.572, delta_t =  0.010
t =  9.590, f =  2.568, delta_t =  0.010
t =  9.600, f =  2.563, delta_t =  0.010
t =  9.610, f =  2.559, delta_t =  0.010
t =  9.620, f =  2.555, delta_t =  0.010
t =  9.630, f =  2.550, delta_t =  0.010
t =  9.640, f =  2.546, delta_t =  0.010
t =  9.650, f =  2.542, delta_t =  0.010
t =  9.660, f =  2.538, delta_t =  0.010
t =  9.670, f =  2.534, delta_t =  0.010
t =  9.680, f =  2.530, delta_t =  0.010
t =  9.690, f =  2.526, delta_t =  0.010
t =  9.700, f =  2.522, delta_t =  0.010
t =  9.710, f =  2.518, delta_t =  0.010
t =  9.720, f =  2.515, delta_t =  0.010
t =  9.730, f =  2.511, delta_t =  0.010
t =  9.740, f =  2.507, delta_t =  0.010
t =  9.750, f =  2.504, delta_t =  0.010
t =  9.760, f =  2.500, delta_t =  0.010
t =  9.770, f =  2.497, delta_t =  0.010
t =  9.780, f =  2.494, delta_t =  0.010
t =  9.790, f =  2.490, delta_t =  0.010
t =  9.800, f =  2.487, delta_t =  0.010
t =  9.810, f =  2.484, delta_t =  0.010
t =  9.820, f =  2.481, delta_t =  0.010
t =  9.830, f =  2.478, delta_t =  0.010
t =  9.840, f =  2.475, delta_t =  0.010
t =  9.850, f =  2.472, delta_t =  0.010
t =  9.860, f =  2.469, delta_t =  0.010
t =  9.870, f =  2.466, delta_t =  0.010
t =  9.880, f =  2.463, delta_t =  0.010
t =  9.890, f =  2.461, delta_t =  0.010
t =  9.900, f =  2.458, delta_t =  0.010
t =  9.910, f =  2.455, delta_t =  0.010
t =  9.920, f =  2.453, delta_t =  0.010
t =  9.930, f =  2.451, delta_t =  0.010
t =  9.940, f =  2.448, delta_t =  0.010
t =  9.950, f =  2.446, delta_t =  0.010
t =  9.960, f =  2.444, delta_t =  0.010
t =  9.970, f =  2.442, delta_t =  0.010
t =  9.980, f =  2.439, delta_t =  0.010
t =  9.990, f =  2.437, delta_t =  0.010
t = 10.000, f =  2.436, delta_t =  0.010
t = 10.010, f =  2.434, delta_t =  0.010

Differentialgleichungen höherer Ordnung

Differentialgleichungen höherer Ordnung lassen sich in ein System von Differentialgleichungen 1. Ordnung umschreiben und dann mit den bereits vorgestellten Verfahren lösen.

Als Beispiel dient die Differentialgleichung für ein einfaches Punktmassenpendel:

$$m\cdot l^2 \cdot \ddot{\varphi}(t) = -m\cdot g\cdot l \sin \varphi(t)$$

bzw.

$$\ddot{\varphi}(t) = -\frac{g}{l} \cdot \sin \varphi(t)$$

mit dem Anfangswinkel $\varphi(0) = \varphi_0$ und der Anfangswinkelgeschwindigkeit $\dot\varphi(0) = \dot\varphi_0$.

Durch Einführung der Variablen $z_1(t) = \varphi(t)$ und $z_2 = \dot\varphi(t)$ kann die Differentialgleichung in ein DGL-System 1. Ordnung überführt werden:

$$\dot z_1 = z_2$$$$\dot z_2 = -\frac{g}{l} \cdot \sin z_1(t)$$

mit den Anfangswerten $z_1(0) = \varphi_0$ und $z_2(0) = \dot\varphi_0$.

Dieses lässt sich nun einfach z.B. mit dem Euler-Verfahren lösen:

$$\vec{z_k}(t_{i+1}) = \vec{z_k}(t_i) + \Delta t \cdot \vec{\dot{z_k}}$$

In [19]:
def Euler_System(rhs, t0, phi0, phidot0, t_max, delta_t):
    tis = np.arange(t0, t_max, delta_t)
    z1is = np.empty_like(tis)
    z2is = np.empty_like(tis)
    for i, ti in enumerate(tis):
        if i == 0:
            z1is[i] = phi0
            z2is[i] = phidot0
        else:
            z1is[i] = z1is[i-1] + delta_t * z2is[i-1]
            z2is[i] = z2is[i-1] + delta_t * rhs(z1is[i-1])

    return tis, z1is, z2is

def RHS(phi):
    g = 9.81
    l = 1.0
    return -g/l * math.sin(phi)

tis, phis, phidots = Euler_System(RHS, t0=0.0, phi0=0.0, phidot0=0.1, t_max=100.0, 
                                  delta_t=0.0001)
plt.figure(figsize=(5, 4))
plt.plot(tis, phidots, 'g', label='Pendelposition')
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.ylabel('f(t)')
plt.xlabel('t')
plt.show();


Die Lösung sieht schön aus, ist aber falsch. In der Realität müsste die Amplitude bei dem reibungsfreien Pendel immer konstant bleiben. Die Ursache für den oben gezeigten falschen Amplitudenverlauf ist eine zu groß gewählte Zeitschrittweite (delta_t = 0.1).

Wählen wir eine 100-fach kleinere Zeitschrittweite ergibt sich dagegen folgender Verlauf:


In [7]:
tis, phis, phidots = Euler_System(RHS, t0=0.0, phi0=0.0, phidot0=0.1, t_max=10.0, 
                                  delta_t=0.001)
plt.figure(figsize=(5, 4))
plt.plot(tis, phidots, 'g', label='Pendelposition')
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.ylabel('f(t)')
plt.xlabel('t')
plt.show();


Hier geht's weiter oder hier zurück zur Übersicht.


Der folgende Python-Code darf ignoriert werden. Er dient nur dazu, die richtige Formatvorlage für die Jupyter-Notebooks zu laden.


In [8]:
from IPython.core.display import HTML
def css_styling():
    styles = open('TFDStyle.css', 'r').read()
    return HTML(styles)
css_styling()


Out[8]:
/* */

In [ ]:


In [ ]: