# Method of characteristics

## Branko Ćurgus

A first order partial differential equation

Here we consider the following first order partial differential equation: $$\label{eq:pde} A(x,y,u) \, u_x(x,y) + B(x,y,u) \, u_y(x,y) = C(x,y,u)$$ subject to the initial condition $$\label{eq:ic} u(x,0) = f(x), \quad x \in \mathbb R.$$ For simplicity we assume that the given functions $A$, $B$ and $C$ are smooth functions defined on ${\mathbb R}^3$ with the values in $\mathbb R$ and that the given function $f$ is a smooth function defined on $\mathbb R$ with values in $\mathbb R$.
A geometric interpretation of \eqref{eq:pde}

• Assume that a smooth function $z = u(x,y)$ is a solution of \eqref{eq:pde}. Let $x_0,y_0 \in \mathbb R$ and set $z_0 = u(x_0,y_0).$ Then the point $P_0 = (x_0,y_0,z_0)$ is a point on the graph of the function $z = u(x,y)$. From a multivariable calculus course we know that the vector $$\label{eq:tvx} \bigl\langle 1, 0, u_x(x_0,y_0) \bigr\rangle$$ is tangent to the curve $\bigl\{ \bigl( x, y_0, u_x(x,y_0) \bigr) : x_0 -\epsilon \lt x \lt x_0 + \epsilon \bigr\}$ at the point $P_0$. Similarly, the vector $$\label{eq:tvy} \bigl\langle 0, 1, u_y(x_0,y_0) \bigr\rangle$$ is tangent to the curve $\bigl\{ \bigl( x_0, y, u_y(x_0,y) \bigr) : y_0 -\epsilon \lt y \lt y_0 + \epsilon \bigr\}$ at the point $P_0$. Thus both vectors \eqref{eq:tvy} and \eqref{eq:tvx} are tangent to the graph of $z = u(x,y)$ at the point $P_0$. Consequently the cross product of \eqref{eq:tvy} and \eqref{eq:tvx}, that is the vector $$\label{eq:nv} \bigl\langle u_x(x_0,y_0), u_y(x_0,y_0), - 1 \bigr\rangle,$$ is orthogonal to the graph of $z = u(x,y)$ at the point $P_0$.
• Since we assume that $z= u(x,y)$ is a solution of \eqref{eq:pde}, \eqref{eq:pde} holds for the values $x = x_0$, $y= y_0$ and $z_0 = u(x_0,y_0)$. That is we have \begin{equation*} A(x_0,y_0,z_0) \, u_x(x_0,y_0) + B(x_0,y_0,z_0) \, u_y(x_0,y_0) = C(x_0,y_0,z_0) \end{equation*} The last identity can be written as a dot product of two vectors: $\Bigl\langle A(x_0,y_0,z_0), B(x_0,y_0,z_0), C(x_0,y_0,z_0) \Bigr\rangle \cdot \bigl\langle u_x(x_0,y_0), u_y(x_0,y_0), - 1 \bigr\rangle = 0.$ Hence the vector $$\label{eq:vvf} \Bigl\langle A(x_0,y_0,z_0), B(x_0,y_0,z_0), C(x_0,y_0,z_0) \Bigr\rangle$$ is orthogonal to the vector \eqref{eq:nv}. Since the vector \eqref{eq:nv} is orthogonal to the graph of $z = u(x,y)$ at the point $P_0$, we conclude that the vector \eqref{eq:vvf} is tangent to the graph of $z = u(x,y)$ at the point $P_0$.
• The point $P_0 = (x_0,y_0,z_0)$, $z_0 = u(x_0,y_0)$ in the previous item was an arbitrary point on the graph of $z = u(x,y)$. Therefore, the previous item shows that the vector field $$\label{eq:vf} \Bigl\langle A(x,y,z), B(x,y,z), C(x,y,z) \Bigr\rangle$$ which consists of the given functions $A$, $B$, $C$ is tangent to the surface $z= u(x,y)$. Thus, to solve \eqref{eq:pde} subject to \eqref{eq:ic} we have to find a surface which is tangent to the vector field \eqref{eq:vf} and passes through the curve $$\label{eq:ic-curve} \bigl\{ \bigl(\xi, 0, f(\xi) \bigr) : \xi \in \mathbb R \bigr\}.$$ The reason why I use $\xi$ instead of $x$ will be clear in the next section.

The related system of ordinary differential equations

• From the previous section we learned that to solve \eqref{eq:pde} we need to find a surface which is tangent to the vector field \eqref{eq:vf} and passes through the curve \eqref{eq:ic-curve}.
• Now recall that studying systems of ordinary differential equations we learned how to find a curve $\Bigl\{ \bigl(X(s), Y(s), Z(s) \bigr) : s \geq 0 \Bigr\}$ which is tangent to the vector field \eqref{eq:vf} and starts at the given point $\bigl(X(0), Y(0), Z(0) \bigr).$ Such curve is called an integral curve of the vector field \eqref{eq:vf}. It is obtained by solving the system of ordinary differential equations $$\label{eq:sys} \begin{array}{l} \dfrac{dX}{ds} = A(X,Y,Z) \\ \dfrac{dY}{ds} = B(X,Y,Z) \\ \dfrac{dZ}{ds} = C(X,Y,Z) \end{array}$$ subject to the initial conditions $$\label{eq:sys-ic} \begin{array}{l} X(0) = \xi \\ Y(0) = 0 \\ Z(0) = f(\xi) \end{array}$$ These initial conditions are chosen so that the integral curves that we find start at the curve \eqref{eq:ic-curve}.
• Assume that we can solve the system of ODEs \eqref{eq:sys} subject to \eqref{eq:sys-ic}. The solution is a triple of functions $(X, Y, Z)$ which depend on two variables $s$ and $\xi$: \begin{equation*} \begin{split} x &= X(s,\xi) \\ y & = Y(s,\xi) \\ z &= Z(s,\xi) \\ \end{split} \end{equation*} For a fixed $\xi$ there above equations represent a curve in $xyz$-space. These curves are called characteristics. The union of all the characteristics is the surface which passes through the curve in \eqref{eq:ic-curve} and is tangent to the vector field \eqref{eq:vf}. This surface is the graph of the solution that we are seeking.
• There is one more step to find the formula for the function $z= u(x,y)$. We need to solve the system \begin{equation*} \begin{split} x &= X(s,\xi) \\ y & = Y(s,\xi) \end{split} \end{equation*} for $s$ and $\xi$ in terms of $x$ and $y$. Solving this system will lead to two functions \begin{equation*} \begin{split} s &= S(x,y) \\ \xi & = \Xi(x,y). \end{split} \end{equation*} Now the desired function $u(x,y)$ is $u(x,y) = Z\bigl( S(x,y), \Xi(x,y) \bigr).$

Mathematica notebooks

• This Mathematica notebook contains the examples below worked out in Mathematica. This notebook has been written in Mathematica 8. It should run well in later versions as well. Here is a pdf print-out of this notebook so that you can view it when Mathematica is not available.

Example 1

Consider the following first order PDE \begin{equation*} y \, u_x + 3 \, u_y = -u \quad \text{in} \quad \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = \cos(x), \quad \text{for} \quad x \in \mathbb R. \end{equation*}
• The corresponding system of ODEs is \begin{equation*} \begin{array}{l} \frac{dX}{ds} = Y \\ \frac{dY}{ds} = 3 \\ \frac{dZ}{ds} = -Z \end{array} \end{equation*} subject to the initial conditions \begin{equation*} \begin{array}{l} X(0) = \xi \\ Y(0) = 0 \\ Z(0) = \cos(\xi) \end{array} \end{equation*}
• The solution of the above system is \begin{equation*} \begin{array}{l} X(s,\xi) = \frac{3}{2}s^2 +\xi \\ Y(s,\xi) = 3s \\ Z(s,\xi) = e^{-s} \cos(\xi) \end{array} \end{equation*}
• Now solve the system \begin{equation*} \begin{array}{l} x = \frac{3}{2}s^2 +\xi \\ y = 3s \end{array} \end{equation*} for $s$ and $\xi$ to get \begin{equation*} \begin{array}{l} s = \frac{1}{3} y \\ \xi = x - \frac{1}{6} y^2. \end{array} \end{equation*}
• Finally, substitute the formulas for $s$ and $xi$ into $Z(s,\xi) = (\cos \xi)e^{-s}$ to get $u(x,y) = e^{-y/3} \cos\!\left(x - \frac{1}{6} y^2\!\right)$ Clearly the domain of $u$ is the entire plane ${\mathbb R}^2$.

Example 2

Consider the following first order PDE \begin{equation*} 2\, u_x + u_y = u^2 \quad \text{in} \quad U \subseteq \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = \cos(x), \quad x \in \mathbb R. \end{equation*} Notice that the domain $U$ above is not specified. As a part of your solution you should determine the largest "rectangular" box $U$ (whose boundary is the $x$-axis) on which the problem has a solution.
• The corresponding system of ODEs is \begin{equation*} \begin{array}{l} \frac{dX}{ds} = 2 \\ \frac{dY}{ds} = 1 \\ \frac{dZ}{ds} = Z^2 \end{array} \end{equation*} subject to the initial conditions \begin{equation*} \begin{array}{l} X(0) = \xi \\ Y(0) = 0 \\ Z(0) = \cos(\xi) \end{array} \end{equation*}
• The solution of the above system is \begin{equation*} \begin{array}{l} X(s,\xi) = 2s +\xi \\ Y(s,\xi) = s \\ Z(s,\xi) = \frac{\cos \xi}{1- s \cos \xi } \end{array} \end{equation*}
• Now solve the system \begin{equation*} \begin{array}{l} x = 2s +\xi \\ y = s \end{array} \end{equation*} for $s$ and $\xi$ to get \begin{equation*} \begin{array}{l} s = y \\ \xi = x - 2 y. \end{array} \end{equation*}
• Finally, substitute the formulas for $s$ and $\xi$ into $Z(s,\xi) = \frac{\cos \xi}{1- s \cos \xi }$ to get $u(x,y) = \frac{\cos(x-2y)}{1- y \cos(x-2y)}$
• The domain of the function $u$ is complicated. However, since for $y \in [0,1)$ we have $y \cos(x-2y) \lt 1$, the function $u$ is defined on the infinite rectangle $\mathbb R \times [0,1)$. Below is its graph on a part of this rectangle.

The above graph shows that the function $u$ becomes large near the points $(2-2\pi,1)$ and $(2,1)$. In fact the function $u(x,1)$ is not defined at $x = 2 + 2k\pi$ with $k \in \mathbb Z$.
• Often a partial differential equation is a model for a physical process. In this setting it is common to think of the variable $y$ as time and denote it by $t$. The initial condition $u(x,0) = \cos x$ describes the state of the process at time $t=0$ and the solution $u(x,t)$ describes the state of the process at any time $t \geq 0$. Therefore it is of interest to show the movie of the graph of $u(x,t)$ as $t$ changes

Place the cursor over the image to start the animation.

Or, it might be useful to see all the graphs in one picture

Example 3

Consider the following first order partial differential equation \begin{equation*} u_t + u\, u_x = 0 \quad \text{in} \quad U \subseteq \bigl\{(x,t) \in \mathbb R^2 : t \gt 0 \bigr\} \end{equation*} subject to the initial condition \begin{equation*} u(x,0) = f(x), \quad x \in \mathbb R. \end{equation*} You should consider the following three specific functions $f(x) = \arctan x$, $f(x) = -\arctan x$ and $f(x) = \exp(-x^2)$.
Notice that the domain $U$ above is not specified. As a part of your solution, for each specific $f$ you should determine the largest "rectangular" box $U$ (whose boundary is the $x$-axis) on which the problem has a solution.
• Solved in the Mathematica file. Some details are below.
• The corresponding system of ODEs is \begin{equation*} \begin{array}{l} \frac{dX}{ds} = Z \\ \frac{dT}{ds} = 1 \\ \frac{dZ}{ds} = 0 \end{array} \end{equation*} subject to the initial conditions \begin{equation*} \begin{array}{l} X(0) = \xi \\ T(0) = 0 \\ Z(0) = f(\xi) \end{array} \end{equation*} with $\xi \in \mathbb R$.
• The solution of the above system is \begin{equation*} \begin{array}{l} X(s,\xi) = s f(\xi) + \xi \\ T(s,\xi) = s \\ Z(s,\xi) = f(\xi) \end{array} \end{equation*} with $s \geq 0$ and $\xi \in \mathbb R$.
• The equations \begin{equation*} x = s f(\xi) + \xi, \quad t = s \quad z = f(\xi), \quad s \geq 0, \ \xi \in \mathbb R. \end{equation*} are parametric equations of a surface in ${\mathbb R}^3$. Next we have to find the largest $t_0 > 0$ such that this surface restricted to the rectangle $\bigl\{(x,t) : x \in \mathbb R, \ 0 \leq t \leq t_0 \bigr\}$ represents a graph of a function $z = u(x,t)$ defined on this rectangle. This will depend on the function $f$. So, we will consider some simple functions $f$s next.
• To be continued.

Problems

1. Solve the following first order PDE \begin{equation*} y\, u_x + u_y = 0 \quad \text{in} \quad \mathbb R^2 \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = f(x) \quad \text{for} \quad x \gt 0. \end{equation*} You can try $f(x) = x$, $f(x) = x^2$, $f(x) = \cos x$ as some specific examples.
2. Solve the following first order PDE \begin{equation*} u_x - x u_y = 0 \quad \text{in} \quad \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = f(x) \quad \text{for} \quad x \gt 0. \end{equation*} You can try $f(x) = x$, $f(x) = x^2$, $f(x) = \cos x$ as some specific examples.
3. Solve the following first order PDE \begin{equation*} y\, u_x - x u_y = 0 \quad \text{in} \quad \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = f(x) \quad \text{for} \quad x \gt 0. \end{equation*} You can try $f(x) = \sin x$, $f(x) = \cos x$, $f(x) = \exp(-x^2)$ as some specific examples.
4. Solve the following first order PDE \begin{equation*} u_x + x u_y = u \quad \text{in} \quad \mathbb R^2 \end{equation*} subject to the boundary condition \begin{equation*} u(0,y) = g(y) \quad \text{for} \quad x \in \mathbb R. \end{equation*} You can try $g(y) = y$, $g(y) = \cos y$ as some specific examples.
5. Solve the following first order PDE \begin{equation*} y\, u_x - x u_y = u \quad \text{in} \quad \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = f(x) \quad \text{for} \quad x \geq 0. \end{equation*} You can try $f(x) = \sin x$, $f(x) = \cos x$ as some specific examples.
6. Solve the following first order PDE \begin{equation*} x u_x + y\, u_y = u \quad \text{in} \quad \mathbb R^2 \end{equation*} subject to the condition \begin{equation*} u\bigl(\cos \theta, \sin \theta\bigr) = 1 \quad \text{for} \quad 0 \leq \theta \lt 2 \pi. \end{equation*}
7. Solve the following first order PDE \begin{equation*} y u_x + u_y = x \quad \text{in} \quad \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = x^2 \quad \text{for} \quad x \in \mathbb R. \end{equation*}
8. Solve the following first order PDE \begin{equation*} x^2 u_x + u_y = 0 \quad \text{in} \quad U \subseteq \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\} \end{equation*} subject to the boundary condition \begin{equation*} u(x,0) = f(x) \quad \text{for} \quad x \in \mathbb R. \end{equation*} Notice that the domain $U$ is not given in the problem.
1. For an arbitrary differentiable function $f$ find the solution $u(x,y)$ of the above problem and determine its maximum domain $U\subseteq \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\}$.
2. Under which condition on $f$ the solution $u(x,y)$ will be defined on $\bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\}$.
9. Consider the following first order PDE \begin{equation*} u_x - u\, u_y = 0 \quad \text{in} \quad \boxed{U \subseteq \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\}} \end{equation*} subject to the boundary condition \begin{equation*} u (x,0) = x \quad \text{for} \quad \boxed{x \in \mathbb R}. \end{equation*}
1. Does there exist an open set $U \subseteq \bigl\{(x,y) \in \mathbb R^2 : y \gt 0 \bigr\}$ whose boundary is the $x$-axis such that the above problem has a solution on $U$?
2. Choose smaller specific sets in the boxed formulas in such a way that the corresponding modified problem has a solution. Prove your claim by providing a solution of the modified problem.
10. Solve the following first order PDE \begin{equation*} (1+x^2) u_x + 2 x y \, u_y = 0 \quad \text{in} \quad {\mathbb R}^2 \end{equation*} subject to the condition \begin{equation*} u(0,y) = g(y) \quad \text{for all} \quad x \in \mathbb R. \end{equation*}
11. Solve the following first order PDE \begin{equation*} (1+x^2) u_x - 2 x y \, u_y = 0 \quad \text{in} \quad {\mathbb R}^2 \end{equation*} subject to the condition \begin{equation*} u(0,y) = g(y) \quad \text{for all} \quad x \in \mathbb R. \end{equation*}
12. Solve the following first order PDE \begin{equation*} x \, u_x + y \, u_y = 2 u \ln u \quad \text{in} \quad {\mathbb R}^2 \end{equation*} subject to the condition \begin{equation*} u(x, 1) = e^{x^2-1} \quad \text{for all} \quad x \in \mathbb R. \end{equation*}