{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"\n",
"\n",
"\n",
"\n",
"# Numerical solution of ordinary differential equations: One step methods\n",
"\n",
" \n",
"**Anne Kværnø, André Massing**\n",
"\n",
"Date: **March 22, 2021**\n",
"\n",
"If you want to have a nicer theme for your jupyter notebook,\n",
"download the [cascade stylesheet file tma4125.css](https://www.math.ntnu.no/emner/TMA4125/2020v/part_II/notebooks/tma4125.css)\n",
"and execute the next cell:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [
{
"data": {
"text/html": [
" \n",
"\n"
],
"text/plain": [
""
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from IPython.core.display import HTML\n",
"from numpy import pi\n",
"from numpy.linalg import norm, solve\n",
"\n",
"\n",
"def css_styling():\n",
" try:\n",
" with open(\"tma4125.css\") as f:\n",
" styles = f.read()\n",
" return HTML(styles)\n",
" except FileNotFoundError:\n",
" pass # Do nothing\n",
"\n",
"\n",
"# Comment out next line and execute this cell to restore the default notebook style\n",
"css_styling()"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"As always, we start by importing the necessary modules:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"\n",
"# Use a funny plotting style\n",
"plt.xkcd()\n",
"newparams = {\n",
" \"figure.figsize\": (6.0, 6.0),\n",
" \"axes.grid\": True,\n",
" \"lines.markersize\": 8,\n",
" \"lines.linewidth\": 2,\n",
" \"font.size\": 14,\n",
"}\n",
"plt.rcParams.update(newparams)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# One Step Methods\n",
"\n",
"In the last lecture, we introduced the explicit Euler method\n",
"and Heun's method, motivating the following definition. "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Definition 1: One step methods\n",
"\n",
"A one step method defines an approximation to the IVP\n",
"in the form of a discrete function\n",
"$\n",
"{\\boldsymbol y}_{\\Delta}:\n",
"\\{\n",
"t_0, \\ldots, t_N\n",
"\\} \\to \\mathbb{R}^n\n",
"$\n",
"given by\n",
"\n",
"\n",
"\n",
"\n",
"\\begin{equation}\n",
"{\\boldsymbol y}_{k+1}\n",
":=\n",
"{\\boldsymbol y}_k\n",
"+\n",
"\\tau_k\n",
"\\Phi(t_k,\n",
"{\\boldsymbol y}_{k},\n",
"{\\boldsymbol y}_{k+1},\n",
"\\tau_{k})\n",
"\\label{ode:eq:osm-def} \\tag{1}\n",
"\\end{equation}\n",
"\n",
"for some **increment function**\n",
"\n",
"$$\n",
"\\Phi: [t_0,T] \\times \\mathbb{R}^n \\times \\mathbb{R}^n \\times \\mathbb{R}^+ \\to \\mathbb{R}^n.\n",
"$$\n",
"\n",
"The OSM is called **explicit** if the increment function $\\Phi$\n",
"does not depend on ${\\boldsymbol y}_{k+1}$, otherwise it is called **implicit**."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Example 1: Increment functions for Euler and Heun\n",
"\n",
"\n",
"The increment functions for Euler's and Heun's method are\n",
"defined by respectively\n",
"\n",
"$$\n",
"\\Phi(t_k,\n",
"y_{k},\n",
"y_{k+1},\n",
"\\tau_{k})\n",
"=\n",
"f(t_k, y_k),\n",
"\\qquad\n",
"\\Phi(t_k,\n",
"y_{k},\n",
"y_{k+1},\n",
"\\tau_{k})\n",
"=\n",
"\\tfrac{1}{2}\n",
"\\left(\n",
"f(t_{k}, y_k)\n",
"+\n",
"f\\bigl(t_{k+1}, y_{k}+\\tau_k f(t_k, y_k)\n",
"\\bigr)\n",
"\\right).\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Local and global truncation error of OSM"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Definition 2: Local truncation error\n",
"\n",
"\n",
"\n",
"The **local truncation error** $\\eta(t, \\tau)$ is defined by\n",
"\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{equation}\n",
"\\eta(t, \\tau) = y(t) + \\tau \\Phi(t, y(t), y(t+\\tau), \\tau) - y(t+\\tau).\n",
"\\label{ode:eq:consist_err} \\tag{2}\n",
"\\end{equation}\n",
"$$\n",
"\n",
"$\\eta(t, \\tau)$ is often also called the **local discretization** or **consistency error**.\n",
"\n",
"A one step method is called **consistent of order $p\\in \\mathbb{N}$** if\n",
"there is a constant $C > 0$ such that\n",
"\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{equation}\n",
"|\\eta(t, \\tau) | \\leqslant C \\tau^{p+1} \\quad \\text{for } \\tau \\to 0.\n",
"\\label{_auto1} \\tag{3}\n",
"\\end{equation}\n",
"$$\n",
"\n",
"A short-hand notation for this is to write\n",
"$\n",
"\\eta(t, \\tau) = \\mathcal{O}(\\tau^{p+1})$ for $\\tau \\to 0.\n",
"$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Example 2:\n",
"\n",
"Euler's method has consistency order $p=1$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Definition 3: Global truncation error\n",
"\n",
"For a numerical solution\n",
"$\n",
"y_{\\Delta}:\n",
"\\{\n",
"t_0, \\ldots, t_N\n",
"\\} \\to \\mathbb{R}\n",
"$\n",
"the **global truncation error** is defined by\n",
"\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{equation}\n",
"e_k(t_k, \\tau_k) = y(t_k) - y_k\n",
"\\quad \\text{for } k=0,\\ldots,N.\n",
"\\label{ode:eq:global_err} \\tag{4}\n",
"\\end{equation}\n",
"$$\n",
"\n",
"A one step method is called **convergent with order $p\\in\\mathbb{N}$** if\n",
"\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{equation}\n",
"\\max_{k \\in \\{0,1,\\ldots,N_t\\}}\n",
"|e_k(t_k,\\tau_k)|\n",
"= \\mathcal{O}(\\tau^p)\n",
"\\label{ode:eq:global_err_conv} \\tag{5}\n",
"\\end{equation}\n",
"$$\n",
"\n",
"with $\\tau = \\max_k \\tau_k$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Discussion.**\n",
"If a one step method has convergence order equal to $p$, the maximum\n",
"error\n",
"$e(\\tau) = \\max_k{|e(t_k, \\tau)|}$\n",
"can be thought as a function of the step size $\\tau$ is of the form\n",
"\n",
"$$\n",
"e(\\tau) = O(\\tau^p) \\leqslant C \\tau^p.\n",
"$$\n",
"\n",
"This implies that if we change the time step size\n",
"from $\\tau$ to $\\tfrac{\\tau}{2}$,\n",
"we can expect that the\n",
"error decreases from $C \\tau^p$\n",
"to $C (\\tfrac{\\tau}{2})^p$, that is, the error\n",
"will be reduced by a factor $2^{-p}$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"How can we determine the convergence rate by means of numerical\n",
"experiments?\n",
"Starting from\n",
"$\n",
"e(\\tau) = O(\\tau^p) \\leqslant C \\tau^p\n",
"$\n",
"and taking the logarithm gives\n",
"\n",
"$$\n",
"\\log(e(\\tau)) \\leqslant p \\log(\\tau) + \\log(C).\n",
"$$\n",
"\n",
"Thus $\\log(e(\\tau))$ is a linear function of $\\log(\\tau)$ and the slope\n",
"of this linear function corresponds to the order of convergence $p$."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"So if you have an *exact solution* at your disposal, you can for an\n",
"increasing sequence `Nmax_list` defining a descreasing sequence of\n",
"*maximum* time-steps $\\{\\tau_0,\n",
"\\ldots, \\tau_M\\}$\n",
"and solve your problem numerically and then compute the resulting exact error\n",
"$e(\\tau_i)$ and plot it against $\\tau_i$ in a $\\log-\\log$ plot to determine\n",
"the convergence order."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"In addition you can also compute the\n",
"**Experimentally Observed Convergence rate**\n",
"EOC for $i=1,\\ldots M$ defined by\n",
"\n",
"$$\n",
"\\mathrm{EOC}(i) =\n",
"\\dfrac{\n",
"\\log(e(\\tau_{i})) - \\log(e(\\tau_{i-1}))\n",
"}{\n",
"\\log(\\tau_{i}) - \\log(\\tau_{i-1})\n",
"}\n",
"=\n",
"\\dfrac{\n",
"\\log(e(\\tau_{i})/e(\\tau_{i-1}))\n",
"}{\n",
"\\log(\\tau_{i}/\\tau_{i-1})\n",
"}\n",
"$$\n",
"\n",
"Ideally, $\\mathrm{EOC}(i)$ is close to $p$.\n",
"\n",
"This is implemented in the following `python` function."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"source": [
"def compute_eoc(y0, t0, T, f, Nmax_list, solver, y_ex):\n",
" errs = []\n",
" for Nmax in Nmax_list:\n",
" ts, ys = solver(y0, t0, T, f, Nmax)\n",
" ys_ex = y_ex(ts)\n",
" errs.append(np.abs(ys - ys_ex).max())\n",
" print(f\"For Nmax = {Nmax:3}, max ||y(t_i) - y_i||= {errs[-1]:.3e}\")\n",
"\n",
" errs = np.array(errs)\n",
" Nmax_list = np.array(Nmax_list)\n",
" dts = (T - t0) / Nmax_list\n",
"\n",
" eocs = np.log(errs[1:] / errs[:-1]) / np.log(dts[1:] / dts[:-1])\n",
" return errs, eocs"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"\n",
"\n",
"## Exercise 1: Convergence order for Euler and Heun\n",
"\n",
"Use the `compute_eoc` function and\n",
"any of the examples with a known analytical solution from the previous lecture\n",
"to determine convergence order for Euler's and Heun's method.\n",
"\n",
"\n",
"Start from importing our numerical schemes from yesterday's lecture."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"def explicit_euler(y0, t0, T, f, Nmax):\n",
" ys = [y0]\n",
" ts = [t0]\n",
" dt = (T - t0) / Nmax\n",
" while ts[-1] < T:\n",
" t, y = ts[-1], ys[-1]\n",
" ys.append(y + dt * f(t, y))\n",
" ts.append(t + dt)\n",
" return (np.array(ts), np.array(ys))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"def heun(y0, t0, T, f, Nmax):\n",
" ys = [y0]\n",
" ts = [t0]\n",
" dt = (T - t0) / Nmax\n",
" while ts[-1] < T:\n",
" t, y = ts[-1], ys[-1]\n",
" k1 = f(t, y)\n",
" k2 = f(t + dt, y + dt * k1)\n",
" ys.append(y + 0.5 * dt * (k1 + k2))\n",
" ts.append(t + dt)\n",
" return (np.array(ts), np.array(ys))"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"\n",
"**Solution.**"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"t0, T = 0, 1\n",
"y0 = 1\n",
"lam = 1\n",
"\n",
"# rhs of IVP\n",
"f = lambda t, y: lam * y\n",
"\n",
"# Exact solution to compare against\n",
"y_ex = lambda t: y0 * np.exp(lam * (t - t0))\n",
"\n",
"Nmax_list = [4, 8, 16, 32, 64, 128]\n",
"\n",
"errs, eocs = compute_eoc(y0, t0, T, f, Nmax_list, explicit_euler, y_ex)\n",
"print(eocs)\n",
"\n",
"errs, eocs = compute_eoc(y0, t0, T, f, Nmax_list, heun, y_ex)\n",
"print(eocs)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"\n",
"\n",
"\n",
"\n",
"\n",
"## A general convergence result for one step methods"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Theorem 1: Convergence of one-step methods\n",
"\n",
"\n",
"Assume that there exist positive constants $M$ and $D$ such that the\n",
"increment function satisfies\n",
"\n",
"$$\n",
"\\| \\mathbf{\\Phi}(t,\\mathbf{y};\\tau) - \\mathbf{\\Phi}(t,\\mathbf{z};\\tau) \\| \\leq M \\| \\mathbf{y}-\\mathbf{z} \\|\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"and\n",
"the local trunctation error satisfies\n",
"\n",
"$$\n",
"\\| {\\boldsymbol \\eta}(t, \\tau) \\| =\n",
"\\| \\mathbf{y}(t+\\tau) - \\left (\\mathbf{y}(t) + \\tau \\mathbf{\\Phi}(t, \\mathbf{y}(t),\n",
"\\tau)\\right) \\|\n",
"\\leqslant D \\tau^{p+1}\n",
"$$\n",
"\n",
"for all $t$, $\\mathbf{y}$ and $\\mathbf{z}$ in the neighbourhood of the\n",
"solution. "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"In that case, the global error satisfies\n",
"\n",
"$$\n",
"\\max_{k \\in \\{0,1,\\ldots,N_t\\}}\n",
"\\|e_k(t_k,\\tau_k) \\|\n",
"\\leqslant C \\tau^p, \\qquad C =\n",
"\\frac{e^{M(T-t_0)}-1}{M}D,\n",
"$$\n",
"\n",
"where $\\tau = \\max_{k \\in \\{0,1,\\ldots,N_t\\}} \\tau_k$.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Proof.**\n",
"We omit the proof here.\n",
"\n",
"It can be proved that the first of these conditions are satisfied for\n",
"all the methods that will be considered here."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Summary.**\n",
"\n",
"The convergence theorem for one step methods can be summarized as\n",
"\n",
"* \"local truncation error behaves like $\\mathcal{O}(\\tau^{p+1})$\" + \"Increment \n",
" function satisfies a Lipschitz condition\"\n",
" $\\Rightarrow$ \"global truncation error behaves like $\\mathcal{O}(\\tau^{p})$\"\n",
"\n",
"or equivalently,\n",
"\n",
"* \"consistency order $p$\" + \"Lipschitz condition for the Increment function\"\n",
" $\\Rightarrow$ \"convergence order $p$\"."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Convergence properties of Heun's method\n",
"Thanks to Theorem [Theorem 1: Convergence of one-step methods](#ode:thm:osm-convergence-theory),\n",
"we need to show two things to prove convergence and find the\n",
"corresponding convergence of a given one step methods:\n",
"* determine the local truncation error, expressed as a power series in the step\n",
" size $\\tau$\n",
"\n",
"* the condition\n",
" $\\| {\\boldsymbol \\Phi}(t,{\\boldsymbol y}, \\tau) - {\\boldsymbol \\Phi}(t,{\\boldsymbol z},\\tau)\n",
" \\| \\leqslant M\n",
" \\| {\\boldsymbol y} - {\\boldsymbol z} \\|$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Determining the consistency order.**\n",
"The local truncation error is found by making Taylor expansions of the\n",
"exact and the numerical solutions starting from the same point, and\n",
"compare. In practice, this is not trivial. For simplicity, we will\n",
"here do this for a scalar equation $y'(t)=f(t,y(t))$. The result is\n",
"valid for systems as well."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"In the following, we will use the notation\n",
"\n",
"$$\n",
"f_t = \\frac{\\partial f}{\\partial t}, \\qquad f_y = \\frac{\\partial f}{\\partial y}, \n",
"\\qquad f_{tt} = \\frac{\\partial^2 f}{\\partial t^2} \\qquad f_{ty} \n",
"= \\frac{\\partial^2f}{\\partial t\\partial y} \\qquad\\text{etc.}\n",
"$$\n",
"\n",
"Further, we will surpress the arguments of the function $f$ and its\n",
"derivatives. So $f$ is to be understood as $f(t,y(t))$ although it is\n",
"not explicitly written."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"The Taylor expansion of the exact solution $y(t+\\tau)$ is given by\n",
"\n",
"$$\n",
"y(t+\\tau)=y(t)+\\tau y'(t) + \\frac{\\tau^2}{2}y''(t) + \\frac{\\tau^3}{6}y'''(t) + \\dotsm.\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Higher derivatives of $y(t)$ can be expressed in terms of the function\n",
"$f$ by using the chain rule and the product rule for differentiation.\n",
"\n",
"$$\n",
"\\begin{align*}\n",
" y'(t) &= f, \\\\ \n",
" y''(t) &= f_t + f_y y' = f_t + f_y f,\\\\ \n",
" y'''(t) &= f_{tt} + f_{ty} y' + f_{yt}f + f_{yy}y'f + f_yf_t +f_y f_y y' \n",
" = f_{tt}+2f_{ty}f+f_{yy}f^2 +f_yf_t+ (f_y)^2f.\n",
"\\end{align*}\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"Find the series of the exact and the numerical solution around\n",
"$x_0,y_0$ (any other point will do equally well). From the discussion\n",
"above, the series for the exact solution becomes\n",
"\n",
"$$\n",
"y(t_0+\\tau) = y_0 + \\tau f + \\frac{\\tau^2}{2}(f_t + f_y f) +\n",
"\\frac{\\tau^3}{6}(f_{tt}+2f_{ty}f+f_{yy}ff + f_yf_xf + f_yf_t+ (f_y)^2f\n",
") + \\dotsm,\n",
"$$\n",
"\n",
"where $f$ and all its derivatives are evaluated in $(t_0,y_0)$. "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"For the numerical solution we get\n",
"\n",
"$$\n",
"\\begin{align*}\n",
" k_1 &= f(t_0,y_0) = f, \n",
" \\\\ \n",
" k_2 &= f(t_0+\\tau, y_0+\\tau k_1) \n",
" \\\\ \n",
" & = f + \\tau f_t + f_y\\tau k_1 + \\frac{1}{2}f_{tt}\\tau^2 + f_{ty}\\tau \\tau k_1 + \\frac{1}{2}f_{yy}\\tau^2 k_1^2 \n",
" + \\dotsm \n",
" \\\\ \n",
" &= f + \\tau(f_t + f_yf) + \\frac{\\tau^2}{2}(f_{tt} + 2f_{ty}f + f_{yy}f^2) + \\dotsm, \n",
" \\\\ \n",
" y_1 &= y_0 + \\frac{\\tau}{2}(k_1 + k_2)\n",
" = y_0 + \\frac{\\tau}{2}(f + f + \\tau(f_t + f_yf) + \\frac{\\tau^2}{2}(f_{tt} + 2f_{ty}k_1 + f_{yy}f^2)) + \\dotsm \n",
" \\\\ \n",
" &= y_0 + \\tau f + \\frac{\\tau^2}{2}(f_t+f_yf)+ \\frac{\\tau^3}{4}(f_{tt} + 2f_{ty}f + f_{yy}f^2) + \\dotsm\n",
"\\end{align*}\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"Thus the local truncation error will be\n",
"\n",
"$$\n",
"\\eta(t_0, \\tau) = y(t_0+\\tau)-y_1 = \\frac{\\tau^3}{12}(-f_{tt}-2f_{ty}f-f_{yy}f^2 + 2f_yf_t + 2(f_y)^2f) + \\dotsm\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"The first nonzero term in the local truncation error series is called\n",
"*the principal error term*. For $\\tau $ sufficiently small this is the\n",
"term dominating the error, and this fact will be used later.\n",
"\n",
"Although the series has been developed around the initial point,\n",
"series around $t_n, y(t_n)$ will give similar results, and it is\n",
"possible to conclude that, given sufficient differentiability of $f$\n",
"there is a constant $D$ such that\n",
"\n",
"$$\n",
"\\max_i |\\eta(t_i, \\tau)| \\leq D\\tau^3.\n",
"$$\n",
"\n",
"*Consequently, Heun's method is of consistency order $2$.*"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Lipschitz condition for $\\Phi$.**\n",
"Further, we have to prove the condition on the increment function\n",
"$\\Phi(t,y)$. For $f$ differentiable, there is for all $y,z$ some $\\xi$\n",
"between $x$ and $y$ such that $f(t,y)-f(t,z) = f_y(t,\\xi)(y-z)$. Let L\n",
"be a constant such that $|f_y|\n",
"\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 4
}