{ "cells": [ { "cell_type": "markdown", "metadata": { "lang": "en" }, "source": [ "# Appendix: a gentle introduction to differential equations\n", "\n", "\n", "\n", "## What is the differential equation?\n", "\n", "\n", "The differential equation is the relationship between the function sought and its function\n", "derivative.\n", "\n", "In the general case, we are talking about the equation of the $n$th rank if we have\n", "relations:\n", "\n", "$$F(y^{(n)}(x),y^{(n-1)}(x),\\dots,y(x),x) = 0,$$\n", "\n", "where:\n", "\n", "- $y^{(n)}(x) = \\frac{d^n f(x)}{dx^n}.$\n", "- $y(x)$ is the function you are looking for, or a dependent variable,\n", "- $x$ is called an independent variable\n", "\n", "We may also have a situation that we have $m$ $n$ equations on $m$\n", "$y_i.$ function A special case is the $m$ system of the first equations\n", "$m$ degree of function. It turns out that it is possible from the $n$ equation of this degree,\n", "create an equivalent $n$ system of first order equations.\n", "\n", "## Example: Newton equation for one particle in one dimension\n", "\n", "\n", "The particle's motion is described by:\n", "\n", "$$m a = F$$\n", "\n", "Acceleration is the second derivative of the position over time, and the force is in\n", "generality some function of $x$ position and time. So we have:\n", "\n", "$$m \\ddot x = F(\\dot x, x, t)$$\n", "\n", "Let's introduce the new $v = \\frac{dx(t)}{dt}$ function now. Substituting in\n", "the previous equation can be written:\n", "\n", "$$\\begin{cases} \\dot x = v \\\\ \\dot v = - \\frac{F(\\dot x,x,t)}{m} x. \\end{cases}$$\n", "\n", "We see that we have received two systems from one equation of the second degree\n", "first degree equations.\n", "\n", "First order equations are often presented in a form in which after\n", "the right side of the equal sign stands for the derivative and the left for the expression\n", "depending on the function:\n", "\n", "$$\\underbrace{\\frac{dx}{dt}}_{\\text{derivative }} = \\underbrace{f(x,t)}_{\\text{Right Hand Side}}$$\n", "\n", "## Geometric interpretation of differential equations.\n", "\n", "\n", "Consider the system of two equations:\n", "\n", "$$\\begin{cases} \\dot x = f(x,y) \\\\ \\dot y = g(x,y) \\end{cases}.$$\n", "\n", "This is the so-called two-dimensional autonomous system of differential equations\n", "ordinary. Autonomy means the independence of right parties from time\n", "(ie, independent variable). An example of such a system can be traffic\n", "particles in one dimension with forces independent of time.\n", "\n", "Equations from the above system can be approximated by substituting derivatives\n", "differential quotient:\n", "\n", "$$\\begin{cases} \\frac{x(t+h)-x(t)}{h} = f(x,y) \\\\ \\frac{y(t+h)-y(t)}{h} = g(x,y) \\end{cases},$$\n", "\n", "multiplying each equation by $h$ and transferring a member from value\n", "dependent variables at the moment $t$ to the right page we get:\n", "\n", "$$\\begin{cases} x(t+h) = x(t) + h \\cdot f(x,y) \\\\ y(t+h) = y(t) +h \\cdot g(x,y). \\end{cases}$$\n", "\n", "According to the definition of a derivative, in the $h\\to\\infty$ border of the $f(x,y)$ expression\n", "can be taken at the time between $t$ and $t+h$. Let's assume for ease,\n", "that we will take a moment $t$.\n", "\n", "