Numerical Solutions

We consider the 1st order differential equation $y^{\prime} = f(x,y)$. We can think of $y'$ as the slope of the tangent line at $(x,y)$. Then consider the line starting at $(x_{0},y_{0})$ with the slope $f(x_{0},y_{0})$. To draw this as graph, we first draw a curve $f(x,y) = c$. This curve is called isocline. Now we plot points on the curve, and at each point we draw a short pointed line with the slope $f(x,y)$. The collection of these pointed lines are called direction field of the differential equation $y^{\prime} = f(x,y)$.

Up to this point, we try to find the general solution. Thus we ignore the singular solution. In this section, we treat the singular solution using the direction field. A general solutin with a singular solution is called the complete solution.

Example 1..26   Find the complete solution of $y^{\prime} = \sqrt{1 - y^{2}}$.

SOLUTION We first find the general solution.

$\displaystyle \frac{dy}{\sqrt{1-y^{2}}} = \int dx $

$\displaystyle \sin^{-1}{y} = x + c $

$\displaystyle y = \sin{(x + c)} $

We note that the derivative of right-hand side becomes negative. Thus the derivative of left-hand side $y'$ becomes negative. But by the give differential equation, $y'$ never becomes negative. Then we draw directional fiels using isocline lines .

Figure 1.2: solutio curve
\begin{figure}\begin{center}
\includegraphics[width=10cm]{DFQ/Fig1-2.eps}
\end{center}\end{figure}

From this, $y \equiv 1$ and $y \equiv -1$ are solutions. Also, $y = 1$‚Æ$y = -1$are connected with $\sin$ curve. Thus the complete solution is $y = 1$ or $y = -1$ or

$\displaystyle y = \left\{\begin{array}{ll}
-1, & x+c \leq -\frac{\pi}{2} \\
\s...
...2}\\
1, & x+c \geq \frac{\pi}{2}
\end{array}\right.\ensuremath{\ \blacksquare}$

We next consider the way to obtain numerical solution from the graph. The idea is to draw a line with the slope $f(x_0,y_0)$ at the starting point $(x_0,y_0)$. Then the equation of line is given by

$\displaystyle y = f(x_{0},y_{0})(x - x_{0}) + y_{0} . $

Then take the next point as $x_{1} = x_{0} + h$ and $y_{1} = f(x_{0},y_{0})h + y_{0}$. Now with the point $(x_{1},y_{1})$ and the slope $f(x_{1},y_{1})$, we get

$\displaystyle y = f(x_{1},y_{1})(x - x_{1}) + y_{1} . $

Repeat this until we reach the given value of $x$.

Example 1..27   Given $y^{\prime} = y + x^{2}, y(0) = 1$, find the value of $y(3)$ provided $h=1$.

SOLUTION Since $(x_{0},y_{0}) = (0,1)$, we have $y = 1 + x$. Now since $(x_{1},y_{1}) = (1,2)$, we have $y = 3x - 1$. Finally, for $(x_{2},y_{2}) = (2,5)$, we have $y = 9x - 13$. Thus, $y(3) = 14$. Note that this differential equation is linear. Thus we can find the general solution. $y = 3e^{x} - x^{2} - 2x - 2$. Then $y(3) = 3e^{3} - 17 \doteq 43.3$ $\ \blacksquare$

As you noticed, the error by the approximation lines is large. To make the error small, we must use smaller $h$. The smaller the $h$, the more calsulation for computation. Then we use computer to calculate.

The more useful technique is known as Euler's method.
The approximated solution of

$\displaystyle y^{\prime} = f(x,y), \ y(a) = b$

can be obatinded by the following method.

\begin{displaymath}\begin{array}{ll}
x_{0} = a & y_{0} = b\\
x_{1} = a + h & y_...
...} = a + nh & y_{n} = y_{n-1} + f(x_{n-1},y_{n-1})h
\end{array} \end{displaymath}



Subsections