Given several dependent variables, suppose \(y_1\text{,}\) \(y_2\text{,}\) ..., \(y_n\text{,}\) we can have a differential equation involving all of them and their derivatives with respect to one independent variable \(x\text{.}\) For example, \(y_1'' = f(y_1',y_2',y_1,y_2,x)\text{.}\) Usually, when we have two dependent variables, we have two equations such as
\begin{equation*}
\begin{aligned}
y_1'' & = f_1(y_1',y_2',y_1,y_2,x) , \\
y_2'' & = f_2(y_1',y_2',y_1,y_2,x) ,
\end{aligned}
\end{equation*}
for some known functions \(f_1\) and \(f_2\text{.}\) We call the above a system of differential equations. More precisely, the above is a second-order system of ODEs as second-order derivatives appear. The system
\begin{equation*}
\begin{aligned}
x_1' & = g_1(x_1,x_2,x_3,t) , \\
x_2' & = g_2(x_1,x_2,x_3,t) , \\
x_3' & = g_3(x_1,x_2,x_3,t) ,
\end{aligned}
\end{equation*}
is a first-order system, where \(x_1,x_2,x_3\) are the dependent variables, and \(t\) is the independent variable.
The terminology for systems is essentially the same as for single equations. For the system above, a solution is a set of three functions \(x_1(t)\text{,}\) \(x_2(t)\text{,}\) \(x_3(t)\text{,}\) such that
\begin{equation*}
\begin{aligned}
x_1'(t) &= g_1\bigl(x_1(t),x_2(t),x_3(t),t\bigr) , \\
x_2'(t) &= g_2\bigl(x_1(t),x_2(t),x_3(t),t\bigr) , \\
x_3'(t) &= g_3\bigl(x_1(t),x_2(t),x_3(t),t\bigr) .
\end{aligned}
\end{equation*}
We may also have an
initial condition. As for single equations, we specify
\(x_1\text{,}\) \(x_2\text{,}\) and
\(x_3\) for some fixed
\(t\text{.}\) For example,
\(x_1(0) = a_1\text{,}\) \(x_2(0) = a_2\text{,}\) \(x_3(0) = a_3\text{,}\) where
\(a_1\text{,}\) \(a_2\text{,}\) and
\(a_3\) are some constants. For a second-order system, we must also specify the first derivatives at the initial point. If we find a solution with arbitrary constants in it, where solving for the constants gives a solution for any initial condition, we call this solution the
general solution. Best to look at a simple example.
Example 3.1.1.
Sometimes a system is easy to solve by solving for one variable and then for the second variable. Take the first-order system
\begin{equation*}
\begin{aligned}
y_1' & = y_1 , \\
y_2' & = y_1 - y_2 ,
\end{aligned}
\end{equation*}
with \(y_1\text{,}\) \(y_2\) as the dependent variables and \(x\) as the independent variable. Consider initial conditions \(y_1(0) = 1\text{,}\) \(y_2(0) = 2\text{.}\)
We note that \(y_1 = C_1 e^x\) is the general solution of the first equation. We then plug this \(y_1\) into the second equation and get the equation \(y_2' = C_1e^x - y_2\text{,}\) which is a linear first-order equation that is easily solved for \(y_2\text{.}\) By the integrating factor method, we get
\begin{equation*}
e^x y_2 = \frac{C_1}{2}e^{2x} + C_2 ,
\end{equation*}
or \(y_2 = \frac{C_1}{2}e^{x} + C_2e^{-x}\text{.}\) The general solution to the system is, therefore,
\begin{equation*}
y_1 = C_1 e^x , \qquad
y_2 = \frac{C_1}{2}e^{x} + C_2e^{-x} .
\end{equation*}
We solve for \(C_1\) and \(C_2\) given the initial conditions. We substitute \(x=0\) to find \(1 = y_1(0) = C_1\) and \(2 = y_2(0) = \nicefrac{C_1}{2} + C_2\text{,}\) or in other words, \(C_1=1\) and \(C_2=\nicefrac{3}{2}\text{.}\) Thus the solution is \(y_1 = e^x\text{,}\) and \(y_2 = (\nicefrac{1}{2}) e^x + (\nicefrac{3}{2}) e^{-x}\text{.}\)
Generally, we will not be so lucky to be able to solve for each variable separately as in the example—we will need to solve for all variables at once. While we cannot always solve one variable at a time, we will try to salvage as much as possible from this technique. In a certain sense, to solve systems, we will still (try to) solve a bunch of single equations and put their solutions together. Let us not worry right now about how to solve systems yet.
We will mostly consider
linear systems.
Example 3.1.1 is a
linear first-order system. It is linear as none of the dependent variables or their derivatives appear in nonlinear functions or with powers higher than one (
\(y_1\text{,}\) \(y_2\text{,}\) \(y_1'\text{,}\) \(y_2'\text{,}\) constants, and functions of
\(x\) can appear, but not
\(y_1y_2\) or
\({(y_2')}^2\) or
\(y_1^3\)). Another, more complicated, example of a linear (second-order) system is
\begin{equation*}
\begin{aligned}
y_1'' &= e^x y_1' + x^2 y_1 + 5 y_2 + \sin(x), \\
y_2'' &= x y_1'-y_2' + 2 y_1 + \cos(x).
\end{aligned}
\end{equation*}