{"cells": [{"cell_type": "markdown", "metadata": {"tags": ["module-mm1", "module-mm2", "module-mse2"]}, "source": ["# Introduction to differential equations\n", "[Mathematics Methods 1](module-mm1) [Mathematics Methods 2](module-mm2) [Mathematics for Scientists and Engineers 2](module-mse2) \n", "```{index} Differential equation\n", "```\n", "Physical phenomena are described by functions that tell us about how the observables change in time, in space and with respect to other parameters of the observed system. That means that the equations which connect such functions and their changes will often contain derivatives. A **differential equation** is an equation involving derivatives of functions. For example, Newton's second law is a differential equation:\n", "\n", "$$ \\mathbf{F} = m \\mathbf{a} = m \\frac{d \\mathbf{v}}{dt} = m \\frac{d^2 \\mathbf{r}}{dt^2}, $$\n", "\n", "where $\\mathbf{r(t)}$ is a function of $t$. We refer to $\\mathbf{r}$ as the **dependent variable** and $t$ as the **independent variable**.\n", "\n", "(de_notation)=\n", "## Notation\n", "\n", "Let $f \\equiv f(x)$ be a function of one variable. We can denote the first derivative of $f$ as\n", "\n", "$$ \\frac{df}{dx} \\quad = \\quad f' \\quad = \\quad Df $$\n", "\n", "which are the Leibniz's, Lagrange's, and Euler's notation, respectively. $D$ is the differential operator (sometimes called D operator) with which we can also explicitly state w.r.t. which variable differentiation is being done, e.g. $ D_x $. We write the second derivative of $f$ as:\n", "\n", "$$ \\frac{d^2f}{dx^2} \\quad = \\quad f'' \\quad = \\quad D^2f $$\n", "\n", "and any $n$-th derivative as:\n", "\n", "$$ \\frac{d^nf}{dx^n} \\quad = \\quad f^{(n)} \\quad = \\quad D^nf $$\n", "\n", "**Time derivatives** are often denoted with a dot above:\n", "\n", "$$ \\dot{u} \\equiv \\frac{du}{dt}, \\quad \\ddot{u} \\equiv \\frac{d^2u}{dt^2}, \\quad \\dots $$\n", "\n", "Now let $f \\equiv f(x, y)$ be a function of two variables. We may want to take **partial derivatives** which we distinguish from ordinary derivatives by replacing the differential operator $d$ (and $D$ in Euler notation) with $\\partial$. A partial derivative of $f$ w.r.t. $x$ (meaning $y$ is treated as a constant) can be represented as:\n", "\n", "$$ \\frac{\\partial f}{\\partial x} \\quad = \\quad f_x \\quad = \\quad \\partial_x f $$\n", "\n", "Mixed partial derivatives:\n", "\n", "$$ \\frac{\\partial^2 f}{\\partial x \\partial y} \\quad = \\quad f_{xy} \\quad = \\quad \\partial_{xy} f $$\n", "\n", "A very important differential operator is $\\nabla$, called *del* or *nabla*. It is defined in vector form as\n", "\n", "$$ \\nabla \\equiv \\left( \\frac{\\partial}{\\partial x}, \\frac{\\partial}{\\partial y}, \\frac{\\partial}{\\partial z} \\right) $$\n", "\n", "\n", "(de_classification)=\n", "## Classification\n", "\n", "There are many ways to classify differential equations and it is important to be able to classify them as this can help inform the choice of approach to a solution.\n", "\n", "1. By number of independent variables:\n", " - **Ordinary differential equations (ODEs)** involve derivatives with respect to *only one* independent variable. An example of an ODE is Newton's second law of motion.\n", " - **Partial differential equations (PDEs)** involve more than one independent variable. For example, the 1-D wave equation:\n", " \n", " $$ u_{tt} = c^2 u_{xx} $$\n", " \n", "2. Linearity\n", " - **Linear DEs** are linear in the dependent variables and their derivatives (including boundary and initial conditions).\n", " - **Non-linear DEs** The following equation is non-linear because of the $yy'$ term:\n", " \n", " $$ y'' + yy' = \\sin x $$\n", " \n", "3. Order: The order of a differential equation is the order of the highest derivative in the equation. For example, the following equations are first, second and third order, respectively:\n", "\n", "$$ (y')^2 + 2y = 0, \\qquad e^{y''} - y' = x^3 + 1, \\qquad y^5 y''' + y' = 0, \\quad $$\n", "\n", " \n", "(de_solution)= \n", "## Solution\n", "\n", "A differential equation may have no, one or multiple solutions.\n", "\n", "A **general solution** contains an arbitrary function or constant while a **particular solution** does not. A particular solution might be obtained from a general solution from initial or boundary conditions."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": []}], "metadata": {"celltoolbar": "Tags", "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.8.8"}}, "nbformat": 4, "nbformat_minor": 4}