Partial Differential Equations: Exercises
01 An introduction to PDEs
Exercise 1: Visualizing complex numbers
Recall that a complex number \(z\) can be written in the form \(z = x + iy\), where \(x\) and \(y\) are real numbers and \(i\) is the imaginary unit, satisfying \(i^2 = -1\). The numbers \(x\) and \(y\) are called the real and imaginary parts of \(z\), respectively. For example, the complex number
\[ z = 3 + 4i \]
has real part \(3\) and imaginary part \(4\).
The set of all complex numbers is denoted by \(\mathbb{C}\). The set of all ordered pairs \((x,y)\) of real numbers is denoted \(\mathbb{R}^2\). As you well know, we can visualize \(\mathbb{R}^2\) as the Cartesian plane, with the first coordinate \(x\) representing the horizontal axis and the second coordinate \(y\) representing the vertical axis.
There is a natural way to visualize complex numbers as points in the Cartesian plane as well, by identifying the complex number \(z = x + iy\) with the point \((x,y)\) in \(\mathbb{R}^2\). In this way, the real part of the complex number corresponds to the horizontal coordinate of the point, and the imaginary part corresponds to the vertical coordinate of the point. This visualization of \(\mathbb{C}\) is called the complex plane.
The absolute value (or magnitude, or modulus) of a complex number \(z = x + iy\) is defined by
\[ |z| = \sqrt{x^2 + y^2}. \]
Visually, this corresponds to the distance from the origin \((0,0)\) to the point \((x,y)\) in the complex plane.
The argument (or angle, or phase) of a complex number \(z = x + iy\) is defined as the angle \(\theta\) in \((-\pi, \pi]\) (measured in radians, measured counterclockwise) between the positive real axis and the line segment connecting the origin to the point \((x,y)\). It is denoted \(\arg{z}\).
Finally, the complex conjugate of a complex number \(z = x + iy\) is defined as the complex number \(\overline{z} = x - iy\). Visually, this corresponds to reflecting the point \((x,y)\) across the real axis to get the point \((x,-y)\).
Exercise 2: Algebra with complex numbers
Addition and subtraction of complex numbers work exactly as you would expect, essentially by collecting like terms. For example:
\[ (2 + 3i) + (4 + 5i) = 6 + 8i \]
and
\[ (2 - 2i) - (1 + 3i) = 1 - 5i. \]
To multiply complex numbers, you use the distributive property (i.e., “FOIL”) and the fact that \(i^2 = -1\). For example:
\[ (2+3i)(4+5i) = 8 + 10i + 12i + 15i^2 = 8 + 22i - 15 = -7 + 22i. \]
For division of complex numbers, it is first helpful to define the complex conjugate of a complex number \(z = x + iy\) as the number \(\overline{z} = x - iy\). The complex conjugate has the property that
\[ z\overline{z} = |z|^2, \]
where \(|z| = \sqrt{x^2 + y^2}\) is the magnitude of the complex number, which is a real number. Thus,
\[ \frac{1}{z} = \frac{\overline{z}}{|z|^2}. \]
This, then, gives us a formula for division of complex numbers: If \(z\) and \(w\) are two complex numbers, with \(z\neq 0\), then
\[ \frac{w}{z} = \frac{w\overline{z}}{z\overline{z}} = \frac{w\overline{z}}{|z|^2}. \]
For example:
\[ \frac{2 + 3i}{4 + 5i} = \frac{(2 + 3i)(4 - 5i)}{(4 + 5i)(4 - 5i)} = \frac{8 - 10i + 12i - 15i^2}{16 + 25} = \frac{23 + 2i}{41} = \frac{23}{41} + \frac{2}{41}i. \]
Exercise 3: Complex exponentials, trigonometric functions, and Euler’s formula
If \(z\in \mathbb{C}\) is a complex number, we define the number \(e^z\) via the power series expansion:
\[ e^z = \sum_{n=0}^\infty \frac{z^n}{n!} = 1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots. \]
Similarly, we define the sine and cosine of \(z\) via their power series expansions:
\[ \sin{z} = \sum_{n=0}^\infty \frac{(-1)^n z^{2n+1}}{(2n+1)!} = z - \frac{z^3}{3!} + \frac{z^5}{5!} - \cdots \]
and
\[ \cos{z} = \sum_{n=0}^\infty \frac{(-1)^n z^{2n}}{(2n)!} = 1 - \frac{z^2}{2!} + \frac{z^4}{4!} - \cdots. \]
You might never have seen power series with complex arguments before, but all of the usual rules for manipulating power series still apply. In particular, these series all converge for every complex number \(z\).
Exercise 4: Graphs of functions \(f:\mathbb{R} \to \mathbb{C}\)
Suppose that we have a function \(f:\mathbb{R} \to \mathbb{C}\), which means that the inputs to \(f\) are real numbers and the outputs are complex numbers. For example, the function
\[ f(x) = x + 3x^2 i \]
takes a real number \(x\) and outputs the complex number \(x + 3x^2 i\). The graph of such a function is a curve in the complex plane traced out by the points \(f(x)\) as \(x\) varies over the real numbers. For example, the graph of the function above is simply the parabola \(y=3x^2\) traced out from left to right, when you think of \(\mathbb{C}\) as \(\mathbb{R}^2\). (Can you see why?) The direction in which the curve is traced out as \(x\) increases is called the orientation of the graph.
Exercise 5: Derivatives and integrals of functions \(f:\mathbb{R} \to \mathbb{C}\)
A function \(f:\mathbb{R} \to \mathbb{C}\) can be written as
\[ f(x) = u(x) + iv(x), \]
where \(u(x)\) and \(v(x)\) are real-valued functions of the real variable \(x\) called the real and imaginary parts of \(f\), respectively. For example, the function \[ f(x) = 2x^2 + i\sin{x} \]
has real part \(u(x) = 2x^2\) and imaginary part \(v(x) = \sin{x}\).
We shall say \(f\) is continuous at a point \(x = a\) if both \(u\) and \(v\) are continuous at \(x = a\). Similarly, we say \(f\) is differentiable at \(x = a\) if both \(u\) and \(v\) are differentiable at \(x = a\). In this case, we define the derivative of \(f\) at \(x = a\) by
\[ f'(x) = u'(x) + iv'(x). \]
In the example above, we have
\[ f'(x) = 4x + i\cos{x}. \]
Integrals of complex-valued functions of a real variable are defined similarly. We say that \(f\) is integrable on an interval \([a,b]\) if both \(u\) and \(v\) are integrable on \([a,b]\). In this case, we define the integral of \(f\) on \([a,b]\) by
\[ \int_a^b f(x)\ dx = \int_a^b u(x)\ dx + i\int_a^b v(x)\ dx. \]
In the example above, we have
\[ \int_0^\pi f(x)\ dx = \int_0^\pi 2x^2\ dx + i\int_0^\pi \sin{x}\ dx = \frac{2\pi^3}{3} + 2i. \]
Exercise 6: Partial derivatives of functions \(f:\mathbb{R}^n \to \mathbb{R}\)
A function of the form \(f:\mathbb{R}^n \to \mathbb{R}\) means that \(f\) takes \(n\)-tuples \((x_1,x_2,\ldots,x_n)\) of real numbers as inputs, and outputs a single real number. We think of \(f\) as a function of multiple variables, namely the \(n\) input variables \(x_1,x_2,\ldots,x_n\).
For example, the function \(f:\mathbb{R}^2 \to \mathbb{R}\) defined by \[ f(x,y) = x^2 e^{-y} + \sin{(xy)} \]
takes the orded pair \((x,y)\) as input and returns a real number.
When dealing with functions of several variables, we often want to measure how the function changes as we vary just one of the input variables, while holding the others constant. This leads us to the concept of partial derivatives.
For simplicity, suppose we have only two input variables, \(x\) and \(y\), so that we are dealing with a function \(f:\mathbb{R}^2 \to \mathbb{R}\). Recall that the partial derivative of \(f\) with respect to \(x\) is defined via the usual limit of a difference quotient, treating \(y\) as a constant:
\[ \frac{\partial f}{\partial x}(x,y) = \lim_{h\to 0} \frac{f(x+h,y) - f(x,y)}{h}. \]
Similarly, the partial derivative of \(f\) with respect to \(y\) is defined via the usual limit of a difference quotient, treating \(x\) as a constant:
\[ \frac{\partial f}{\partial y}(x,y) = \lim_{h\to 0} \frac{f(x,y+h) - f(x,y)}{h}. \]
Physically, \(\frac{\partial f}{\partial x}(x,y)\) measures the (instantaneous) rate of change of \(f\) with respect to \(x\) at the point \((x,y)\) while \(y\) is held constant, while \(\frac{\partial f}{\partial y}(x,y)\) measures the (instantaneous) rate of change of \(f\) with respect to \(y\) at the point \((x,y)\) while \(x\) is held constant.
Partial derivatives may be computed using the same rules as ordinary derivatives, treating all other variables as constants. For example, for the function above, we have
\[ \frac{\partial f}{\partial x}(x,y) = 2x e^{-y} + y\cos{(xy)} \]
and
\[ \frac{\partial f}{\partial y}(x,y) = -x^2 e^{-y} + x\cos{(xy)}. \]
Exercise 7: Linear transformations on vector spaces
Let \(V\) be a vector space, which means that, roughly speaking, \(V\) is a set of objects (called vectors) that can be added together and multiplied by scalars (numbers, either real or complex) in a way that satisfies certain axioms (like commutativity, associativity, distributivity, etc.).
The central example of a finite-dimensional (real) vector space is \(\mathbb{R}^n\), the set of all \(n\)-tuples of real numbers. Vectors in \(\mathbb{R}^n\) can be added componentwise and multiplied by real numbers componentwise. This should be familiar to you from your course on linear algebra, though in that course vectors in \(\mathbb{R}^n\) were often represented as column vectors.
On the other hand, the central example of an infinite-dimensional (real) vector space is the set of all real-valued functions defined on some interval \([a,b]\). Very often, the functions will be required to satisfy some additional properties, such as continuity, differentiability, or integrability, but we won’t focus on those details here. In these “function spaces,” two functions \(f\) and \(g\) can be added together to form a new function \(f + g\), which is just the “pointwise” sum of the two functions: evaluating \(f+g\) at a point \(x\) goes like this:
\[ (f + g)(x) = f(x) + g(x). \]
Similarly, a function \(f\) can be multiplied by a scalar \(c\) to form a new function \(cf\), defined by
\[ (cf)(x) = c \cdot f(x). \]
Now, if \(V\) and \(W\) are any two vector spaces, recall that a function \(T: V \to W\) is called a linear transformation if for all vectors \(u,v \in V\) and all scalars \(c\), we have
Preservation of addition: \(T(u + v) = T(u) + T(v)\).
Preservation of scaling: \(T(cu) = cT(u)\).
If \(W\) coincides with \(V\), then \(T\) is often called a linear operator on \(V\).
Suppose now that \(V\) is a vector space of functions \(f:\mathbb{R}^2 \to \mathbb{R}\), with input variables \(x\) and \(y\), and with suitable differentiability properties. Convince yourself that all partial derivative operators are linear transformations on \(V\): for example, we have the function
\[ \frac{\partial}{\partial x}: V\to V \]
that carries a function \(f\) to its partial derivative with respect to \(x\), \(\frac{\partial f}{\partial x}\). You know very well that this operator satisfies both properties of a linear transformation:
\[ \frac{\partial}{\partial x} (f + g) = \frac{\partial f}{\partial x} + \frac{\partial g}{\partial x} \]
and
\[ \frac{\partial}{\partial x} (cf) = c \frac{\partial f}{\partial x}. \]
Likewise, all second-order partial derivative operators are linear operators on \(V\): for example, the transformations
\[ \frac{\partial^2}{\partial x^2}: V\to V, \quad \text{and} \quad \frac{\partial^2}{\partial x \partial y}: V\to V, \]
have the properties
\[ \frac{\partial^2}{\partial x^2} (f + g) = \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 g}{\partial x^2} \quad \text{and} \quad \frac{\partial^2}{\partial x \partial y} (f + g) = \frac{\partial^2 f}{\partial x \partial y} + \frac{\partial^2 g}{\partial x \partial y} \]
as well as
\[ \frac{\partial^2}{\partial x^2} (cf) = c \frac{\partial^2 f}{\partial x^2}\quad \text{and} \quad \frac{\partial^2}{\partial x \partial y} (cf) = c \frac{\partial^2 f}{\partial x \partial y}. \]
This pattern continues: all partial differential operators, of all degrees and no matter if they are mixed or non-mixed—all are linear operators.
The following exercise gives you a chance to check linearity for a more complicated partial differential operator, which is expressed as a “linear combination” of several partial derivative operators.
Exercise 8: Eigenfunctions of differential operators
Let \(V\) be a vector space and \(T:V\to V\) a linear operator. A nonzero vector \(v\in V\) is called an eigenvector of \(T\) if there exists a scalar \(\lambda\) such that
\[ T(v) = \lambda v. \]
If \(V\) happens to be a function space, then eigenvectors of \(T\) are often called eigenfunctions of \(T\).
This definition is the generalization to arbitrary vector spaces of the familiar notion of eigenvalues and eigenvectors from your linear algebra course.
Exercise 9: A solution to the wave equation
Recall the wave equation
\[ \frac{\partial^2 y}{\partial t^2} = a^2 \frac{\partial^2 y}{\partial x^2}, \]
from class, where \(a\) is a known constant.
Exercise 10: A solution to the heat equation
Recall the heat equation
\[ \frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2}, \]
from class, where \(k\) is a known constant.
Exercise 11: Eliminating constants of proportionality
Consider the wave equation
\[ \frac{\partial^2 y}{\partial t^2} = a^2 \frac{\partial^2 y}{\partial x^2}, \]
where \(a\) is a known (nonzero) constant. Very often, it is convenient to eliminate the constant \(a\) by rescaling the time variable. Specifically, we introduce a new variable \(\tau\) defined by \(\tau = at\), so that
\[ y(x,\tau) = y(x, at). \]