MATLAB TUTORIAL for the First Course. Part IV: Boundary Value Problems

Prof. Vladimir A. Dobrushkin

This tutorial contains many matlab scripts.
You, as the user, are free to use all codes for your needs, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately. Any comments and/or contributions for this tutorial are welcome; you can send your remarks to

Email Vladimir Dobrushkin

Boundary Value Problems

Consider a second order differential equation

\[ x'' (t) = f(t,x,x' ) \qquad \mbox{for} \quad a \le t \le b, \]
subject to the boundary conditions of the first kind (also called the Dirichlet boundary conditions)
\[ x (a) = \alpha \qquad \mbox{and} \qquad x(b) = \beta . \]
Generally speaking, a boundry value problem may have a unique solutions, may have many solutions, or may have no solution. The conditions that guarantee that a solution to the formulated above Dirichlet boundary value problem exists should be checked before any numerical scheme is applied; otherwise,a list of meaningless output may be generated. The general conditions are stated in the following theorem.

Theorem: Suppose that f(t,x,y) is continuous on the region \( R = \left\{ (t,x,y)\, : \, a \le t \le b, \ -\infty < x < \infty , \ -\infty < y < \infty \right\} \) and that \( \partial f/\partial x = f_x \quad \partial f/\partial y = f_y \) are continuous on R. If there exists a positive constant M for which fx and fy satisfy

\[ \begin{split} f_x (t,x,y) > 0 \qquad\mbox{for all} \quad (t,x,y) \in R , \\ \left\vert f_y (t,x,y) \right\vert \le M \qquad\mbox{for all} \quad (t,x,y) \in R , \end{split} \]
then the boundary value problem
\[ x'' (t) = f(t,x,x' ) \qquad \mbox{subject} \quad u(a) = \alpha, \quad u(b) = \beta \]
has a unique solution x = x(t) for \( a \le t \le b . \)

The notation \( y = x' (t) \) has been used to distinguish the third variable of the function \( f(t,x,x' ) . \) Recall that we also use the dot notation for derivatives with respect to time variable t: \( \dot{x} = x' (t) . \) Finally, the special case of linear differential equations is worthy of mention.

Theorem: Assume that f in the previous theorem has the linear form \( f(t,x,x' ) = p(t)\,x' + q(t)\,x + r(t) , \) and that f and its partial derivatives \( q(t) = \partial f/\partial x \) and p(t) are continuous on R. If there exists a positive constant M for which p(t) and q(t) satisfy

\[ \begin{split} q (t) > 0 \qquad\mbox{for all} \quad (t,x,y) \in R , \\ \left\vert p (t) \right\vert \le M = \max_{a\le t \le b} \, |p(t)| \qquad\mbox{for all} \quad t \in [a,b] , \end{split} \]
then the linear boundary value problem
\[ x'' (t) = p(t)\,x' + q(t)\,x + r(t) \qquad \mbox{subject} \quad u(a) = \alpha, \quad u(b) = \beta \]
has a unqiue solution x = x(t) for \( a \le t \le b . \)

Conditions of the above theorem are fulfilled for constant coefficient equations when p(t) = p and q(t) = q. In this case, a closed form formula for solution is possible to obtain.

function  Complete


Complete