% This is lecture no. 1 of MH3110/: Ordinary Differential Equations.

\chapter{Notation \& Definitions}%
\label{cha:notation_&_definitions}

We are familiar with \textbf{algebraic equations}.
For example, find the value of $x$ such that:
\[
x^2-4=0
,\]
whose solution is $x=\pm 2$.
As a second example, find the pair of numbers $(x,y)$ such that
\[
x-y = 1,\quad x+y = 3
,\]
which is a system of two linear equations.
Its solution is $(x,y) = (2,1)$.

Different from these algebraic equations, we consider an equation with the solution being a function, and it involves derivatives of unknown functions.
For example, find a function $y(x)$ such that $y^{\prime}(x)=f(x)$ for a given function $f(x)$,
\[
y^{\prime} = \cos(x)\quad\text{or}\quad
\frac{\upd y}{\upd x} = \cos (x)
.\]
We know from calculus that $y$ is the anti-derivative of $f(x)$, so for our example,
\[
y(x) = \int \cos(x) \ud x + C = \sin(x) + C
,\]
where $C$ is an arbitrary constant.

\begin{definition}
	Differential Equation.
	A \textbf{differential equation}, DE is short, is an equation involving an unknown function and its derivatives.
	A few examples:
	\[
		\frac{\upd x}{\upd y} = 5x + 3
	\]
	\[
		\frac{\upd^2 y}{\upd t^2} + 2t\frac{\upd y}{\upd t} + y^2 = \sin (t)
	\]
	\[
		\frac{\partial^2u(x,y)}{\partial x^2} + \frac{\partial^2u(x,y)}{\partial y^2} = \cos (xy)
	\]
	If the unknown function is a function of a single variable, then the DE is an \textbf{ordinary differential equation}(ODE).
	A \textbf{partial differential equation} (PDE) is an equation involving an unknown function of two or more independent variables, in which the derivatives are partial derivatives.
\end{definition}

\begin{definition}
	Order.
	The \textbf{order} of a differential equation is the highest derivative that appears in the equation.
\end{definition}

ODE's can be classified into linear or nonlinear ODE's.

\begin{definition}
	Linear differential equations.
	Consider the $n$-th order ordinary differential equations in the general form
	\[
	F\left(x,y,y^{\prime}, y^{\prime\prime},\dotsc,y^{(n)}\right) = 0
	.\]
	If $F$ is a \textbf{linear} function of $y, y^{\prime}, y^{\prime\prime},\dotsc,y^{(n)}$, that is, it takes the form:
	\[
	a_0(x)y^{(n)} + a_1(x)y^{(n-1)} + \dotsb + a_n(x)y = f(x)
	,\]
	then it is \textbf{linear}, otherwise the equation is \textbf{nonlinear}.
\end{definition}

As a general rule, in a linear equation, the unknown function and its derivatives occur up to the first degree, and not as products or arguments of other functions.
More rigorously, we view $F$ as a function of $y$ and denote $g(y) = F(x,y,\dotsc)$.
If $g(y)$ is linear in $y$, that is
\[
g(y_1+y_2) = g(y_1) + g(y_2)
,\]
then the DE is linear.
On the contrary, if
\[
g(y_1+y_2) \neq g(y_1) + g(y_2)
,\]
then the DE is nonlinear.
\begin{exmp}
	The equations
	\[
	y^{\prime\prime} + xy^{\prime} + \sin(x)y = e^{x},\quad\text{and}\quad xy^{\prime\prime\prime} + 4x^2y^{\prime} - \frac{2}{1+x^2}y = 0
	,\]
	is a linear second-order DE and a linear third-order DE respectively, whereas the DEs:
	\[
	y^{\prime\prime}+x\sin(y^{\prime})-xy = x^2\quad\text{and}\quad y^{\prime\prime}-x^2y + y^2 = 0
	\]
	are nonlinear.
\end{exmp}

\begin{definition}
	Solution to DE.
	A  function $y=\phi(x)$ is a \textbf{solution} to the ODE
	\[
	F\left(x,y,y^{\prime},y^{\prime\prime},\dotsc,y^{(n)}\right) = 0
	\]
	if it satisfies the equation
	\[
	F\left(x,\phi,\phi^{\prime},\phi^{\prime\prime},\dotsc,\phi^{(n)}\right) = 0
	.\]
\end{definition}

\begin{exmp}
	Consider the differential equation
	\[
	y^{\prime\prime}-5y^{\prime} + 6y = 0
	.\]
	Verify that $y_1(x) = e^{2x}$ and $y_2(x) = e^{3x}$ are both solutions.
\end{exmp}

\begin{definition}
	General Solution, Particular Solution.
	A solution to an $n$-th order DE on an interval $I$ is called the \textbf{general solution} on $I$, if it satisfies the following conditions:
	\begin{enumerate}
		\item The solution contains $n$ constants $c_1,c_2,\dotsc,c_n$;
		\item All solutions to the DE can be obtained by assigning appropriate values to the constants.
	\end{enumerate}
	A solution to a DE is called a \textbf{particular solution} if it does not contain any arbitrary constants.
\end{definition}

\begin{exmp}
	Find the general solution to the DE:
	\[
	y^{\prime\prime} = e^{-x}
	.\]
	\begin{sol}
		A direct integration on both sides yields:
		\begin{align*}
			\int y^{\prime\prime}\ud x & = \int e^{-x}\ud x + c_1\\
			y^{\prime} & = -e^{-x}+c_1.
		\end{align*}
		Therefore we have:
		\begin{align*}
			\int y^{\prime} \ud x & = \int (-e^{-x}+c_1)\ud x + c_2\\
			y & = e^{-x} + c_1x + c_2,
		\end{align*}
		where $c_1$ and $c_2$ are arbitrary constants.
	\end{sol}
\end{exmp}

\begin{definition}
	Initial Value Problem.
	An $n$-th order DE together with $n$ initial conditions of the form
	\[
	F\left(y, y^{\prime}, y^{\prime\prime}, \dotsc,y^{(n)}\right) = 0
	,\]
	where
	\[
	y(x_0) = y_0, y^{\prime}(x_0) = y_1, \dotsc, y^{(n-1)}(x_0) = y_{n-1}
	\]
	are given constants, is called an \textbf{initial value problem}, or \textbf{IVP} in short, whose solution is a \textbf{particular solution}.
\end{definition}
