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)\).

  1. Plot the complex number \(2 + 3i\) in the complex plane.

  2. Plot the complex number \(-1 + 4i\) in the complex plane.

  3. Plot the complex number \(-2 - 2i\) in the complex plane.

  4. Plot the complex number \(3\) (in other words, \(3 + 0i\)) in the complex plane.

  5. Plot the complex number \(-5i\) (in other words, \(0 - 5i\)) in the complex plane.

  6. Find the absolute value, argument, and complex conjugate of the complex number \(1 + i\).

  7. Find the absolute value, argument, and complex conjugate of the complex number \(-1 + i\).

  8. Find the absolute value, argument, and complex conjugate of the complex number \(2\).

  9. Find the absolute value, argument, and complex conjugate of the complex number \(-3\).

  10. Find the absolute value, argument, and complex conjugate of the complex number \(-5i\).

I’ll leave plotting exercises a-e to you.

  1. \(|1 + i| = \sqrt{2}\), \(\arg(1 + i) = \frac{\pi}{4}\), \(\overline{1 + i} = 1 - i\).

  2. \(|-1 + i| = \sqrt{2}\), \(\arg(-1 + i) = \frac{3\pi}{4}\), \(\overline{-1 + i} = -1 - i\).

  3. \(|2| = 2\), \(\arg(2) = 0\), \(\overline{2} = 2\).

  4. \(|-3| = 3\), \(\arg(-3) = \pi\), \(\overline{-3} = -3\).

  5. \(|-5i| = 5\), \(\arg(-5i) = -\frac{\pi}{2}\), \(\overline{-5i} = 5i\).

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. \]

Compute the following.

  1. \((1 + 2i) + (3 + 4i)\)

  2. \((5 + 6i) - (7 + 8i)\)

  3. \((1 + 2i)(4 - i)\)

  4. \(\displaystyle\frac{2 + 3i}{1 + 4i}\)

  1. \((1 + 2i) + (3 + 4i) = 4 + 6i\)

  2. \((5 + 6i) - (7 + 8i) = -2 - 2i\)

  3. \((1 + 2i)(4 - i) = 6 + 7i\)

  4. \(\displaystyle\frac{2 + 3i}{1 + 4i} = \frac{14}{17} - \frac{5}{17}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\).

  1. One of the most important relationships involving complex exponentials is Euler’s formula, which says that \[ e^{iz} = \cos{z} + i\sin{z} \] for all \(z\in \mathbb{C}\). Use the power series definitions above to verify Euler’s formula.

  2. Use Euler’s formula to derive the following formulas for cosine and sine in terms of complex exponentials: \[ \cos{z} = \frac{e^{iz} + e^{-iz}}{2} \] and \[ \sin{z} = \frac{e^{iz} - e^{-iz}}{2i}. \]

Note: One of the most important properties of the complex exponential function is that it satisfies the same exponential rules as the real exponential function. In particular, for any complex numbers \(z\) and \(w\), we have \[ e^{z+w} = e^z e^w. \]

You will not need to prove this fact, but it is useful to keep in mind.

  1. The solution is just a matter of substituting \(iz\) into the power series definition of the exponential function and then separating the resulting series into real and imaginary parts: \[ \begin{align*} e^{iz} &= \sum_{n=0}^\infty \frac{(iz)^n}{n!} \\ &= \sum_{n=0}^\infty \frac{i^n z^n}{n!} \\ &= \sum_{m=0}^\infty \frac{i^{2m} z^{2m}}{(2m)!} + \sum_{m=0}^\infty \frac{i^{2m+1} z^{2m+1}}{(2m+1)!} \\ &= \sum_{m=0}^\infty \frac{(-1)^m z^{2m}}{(2m)!} + i\sum_{m=0}^\infty \frac{(-1)^m z^{2m+1}}{(2m+1)!} \\ &= \cos{z} + i\sin{z}. \end{align*} \] In the last equality, we used the power series definitions of sine and cosine.

  2. First note that \[ e^{-iz} = \cos{-z} + i\sin{-z} = \cos{z} - i\sin{z}, \] since all powers of \(z\) in the cosine series are even and all powers of \(z\) in the sine series are odd. Now we can add and subtract Euler’s formula and this new formula to get the desired results: \[ \begin{align*} e^{iz} + e^{-iz} &= (\cos{z} + i\sin{z}) + (\cos{z} - i\sin{z}) = 2\cos{z}, \\ e^{iz} - e^{-iz} &= (\cos{z} + i\sin{z}) - (\cos{z} - i\sin{z}) = 2i\sin{z}. \end{align*} \] Dividing both equations by the appropriate constants gives the desired formulas.

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.

Describe the graphs of the follwing functions \(f:\mathbb{R} \to \mathbb{C}\), along with their orientations.

  1. \(f(x) = 2 + ix\)

  2. \(f(x) = -x^2 - x\)

  3. \(f(x) = e^{ix}\)

  4. \(f(x) = e^{-ix}\)

  5. \(f(x) = e^{2\pi ix}\)

  6. \(f(x) = e^{-3\pi ix}\)

  1. The graph is a vertical line at \(x=2\) in the complex plane, traced from bottom to top as \(x\) increases.

  2. The graph is a downward-opening parabola in the complex plane, traced from right to left as \(x\) increases.

  3. The graph is the unit circle in the complex plane, traced counterclockwise as \(x\) increases, completing one revolution over the interval \([0,2\pi]\). This is because, using Euler’s formula, we have \(e^{ix} = \cos{x} + i\sin{x}\), and it is well-known from trigonometry that the point \((\cos{x}, \sin{x})\) traces out the unit circle as \(x\) varies over the real numbers.

  4. The graph is the unit circle in the complex plane, traced clockwise as \(x\) increases, completing one revolution over the interval \([0,2\pi]\).

  5. The graph is the unit circle in the complex plane, traced counterclockwise as \(x\) increases, completing one revolution over the interval \([0,1]\).

  6. The graph is the unit circle in the complex plane, traced clockwise as \(x\) increases, completing one revolution over the interval \([0, \frac{2}{3}]\).

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. \]

Compute the following.

  1. \(\displaystyle\frac{d}{dx} \left( \cos{x} + i(2x^3-5) \right)\).

  2. \(\displaystyle\int_0^{\pi/4} \left( \sec^2{x} + i e^x \right)\ dx\).

  1. \(-\sin{x} + i6x^2\)

  2. \(1 + i\left( e^{\pi/4} - 1 \right)\)

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)}. \]

Compute the following.

  1. \(\displaystyle \frac{\partial}{\partial x} \left( x^3 y + \ln{(xy)} \right)\).

  2. \(\displaystyle \frac{\partial}{\partial y} \left( e^{xy} + x^2 y^2 \right)\).

  1. \(3x^2 y + \frac{1}{x}\)
  2. \(x e^{xy} + 2x^2 y\)

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

  1. Preservation of addition: \(T(u + v) = T(u) + T(v)\).

  2. 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.

Let \(V\) be the function space above, and consider the operator \(L: V\to V\), defined by

\[ L = \frac{\partial}{\partial y} + x^2 \frac{\partial^2}{\partial x^2} - \sin{y} \frac{\partial}{\partial x \partial y}. \]

  1. Compute \(L(x^2 y + y^3\cos{x})\).
  2. Now compute \(L(x^2y) + L(y^3\cos{x})\).
  3. Make sure that your answers in parts (a) and (b) agree.
  4. Compute \(L(2x^2 y)\).
  5. Now compute \(2L(x^2 y)\).
  6. Make sure that your answers in parts (d) and (e) agree.
  7. Do you think \(L\) is a linear operator on \(V\)? Why or why not? What would you need to check to be sure?
  1. We have \[ \begin{align*} L(x^2 y + y^3\cos{x}) &= \frac{\partial}{\partial y} (x^2 y + y^3\cos{x}) + x^2 \frac{\partial^2}{\partial x^2} (x^2 y + y^3\cos{x}) - \sin{y} \frac{\partial}{\partial x \partial y} (x^2 y + y^3\cos{x}) \\ &= x^2 + 3y^2 \cos{x} + x^2(2y - y^3 \cos{x}) - \sin{y}(2x - 3y^2 \sin{x}) \\ &= x^2 + 3y^2 \cos{x} + 2x^2 y - x^2y^3 \cos{x} - 2x\sin{y} + 3y^2 \sin{x}\sin{y}. \end{align*} \]

  2. We have \[ \begin{align*} L(x^2 y) + L(y^3\cos{x}) &= \left[ \frac{\partial}{\partial y} (x^2 y) + x^2 \frac{\partial^2}{\partial x^2} (x^2 y) - \sin{y} \frac{\partial}{\partial x \partial y} (x^2 y) \right] \\ &\quad + \left[ \frac{\partial}{\partial y} (y^3\cos{x}) + x^2 \frac{\partial^2}{\partial x^2} (y^3\cos{x}) - \sin{y} \frac{\partial}{\partial x \partial y} (y^3\cos{x}) \right] \\ &= (x^2 + 2x^2 y - 2x\sin{y}) + (3y^2 \cos{x} - x^2 y^3 \cos{x} + 3y^2 \sin{x}\sin{y}) \\ &= x^2 + 3y^2 \cos{x} + 2x^2 y - x^2y^3 \cos{x} - 2x\sin{y} + 3y^2 \sin{x}\sin{y}. \end{align*} \]

  3. Yes, the answers in parts (a) and (b) agree.

  4. We have \[ \begin{align*} L(2x^2 y) &= \frac{\partial}{\partial y} (2x^2 y) + x^2 \frac{\partial^2}{\partial x^2} (2x^2 y) - \sin{y} \frac{\partial}{\partial x \partial y} (2x^2 y) \\ &= 2x^2 + 4x^2 y - 4x\sin{y}. \end{align*} \]

  5. We have \[ \begin{align*} 2L(x^2 y) &= 2 \left[ \frac{\partial}{\partial y} (x^2 y) + x^2 \frac{\partial^2}{\partial x^2} (x^2 y) - \sin{y} \frac{\partial}{\partial x \partial y} (x^2 y) \right] \\ &= 2(x^2 + 2x^2 y - 2x\sin{y}) \\ &= 2x^2 + 4x^2 y - 4x\sin{y}. \end{align*} \]

  6. Yes, the answers in parts (d) and (e) agree.

  7. If \(L\) were linear, then it need to preserve addition, i.e., \(L(f+g) = L(f) + L(g)\) for all \(f,g\in V\), and it would need to preserve scaling, i.e., \(L(cf) = cL(f)\) for all \(f\in V\) and all scalars \(c\). We have verified both of these properties for the specific functions \(f(x,t) = x^2 t\) and \(g(x,t) = t^3 \cos{x}\), and for the scalar \(c=2\). From this evidence, it seems likely that \(L\) is a linear operator on \(V\). To be sure, we would need to verify these properties for all functions in \(V\) and all scalars.

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.

Let \(V\) be a vector space of all functions \(f:\mathbb{R} \to \mathbb{R}\), with input variable \(x\) (and with suitable differentiability properties).

  1. Consider the first-order differential operator \[ \frac{d}{dx}: V\to V. \] For each real number \(c\), there is an eigenfunction of this operator associated to the eigenvalue \(c\). Find such an eigenfunction.

  2. Consider the second-order differential operator \[ \frac{d^2}{dx^2}: V\to V. \] For each negative real number \(c\), there is an eigenfunction of this operator associated to the eigenvalue \(c\). Find such an eigenfunction.

  1. We are looking for a nonzero function \(f(x)\) such that \[ \frac{df}{dx} = c f(x). \] This is a (first-order, linear, homogeneous) ordinary differential equation, and its general solution is \[ f(x) = Ae^{cx}, \] where \(A\) is any nonzero constant. Thus, for each real number \(c\), the function \(f(x) = e^{cx}\) is an eigenfunction of the operator \(\frac{d}{dx}\) associated to the eigenvalue \(c\).

  2. We are looking for a nonzero function \(f(x)\) such that \[ \frac{d^2 f}{dx^2} = c f(x). \] This is a (second-order, linear, homogeneous) ordinary differential equation. The general solution to this equation is \[ f(x) = A\cos{(\sqrt{-c} x)} + B\sin{(\sqrt{-c} x)}, \] where \(A\) and \(B\) are constants, not both zero. Thus, for each negative real number \(c\), the functions \(f(x) = \cos{(\sqrt{-c} x)}\) and \(f(x) = \sin{(\sqrt{-c} x)}\) are eigenfunctions of the operator \(\frac{d^2}{dx^2}\) associated to the eigenvalue \(c\).

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.

Show that the function

\[ y(x,t) = \sin{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)} \]

is a solution to the wave equation, for any fixed positive integer \(n\). (Note: This is the formula for the \(n\)-th harmonic of a vibrating string of length \(L\) with fixed endpoints.)

To show that \(y(x,t)\) is a solution to the wave equation, we need to compute the second partial derivatives of \(y\) with respect to \(t\) and \(x\), and then verify that they satisfy the wave equation.

The first derivatives are:

\[ \begin{align*} \frac{\partial y}{\partial t} &=\left(-\frac{n\pi a}{L}\right)\cdot \sin{\left(\frac{n\pi x}{L}\right)} \sin{\left(\frac{n\pi a t}{L}\right)}, \\ \frac{\partial y}{\partial x} &= \left(\frac{n\pi}{L}\right)\cdot \cos{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)}. \end{align*} \]

Then, the second derivatives are:

\[ \begin{align*} \frac{\partial^2 y}{\partial t^2} &= -\left(\frac{n\pi a}{L}\right)^2 \sin{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)}, \\ \frac{\partial^2 y}{\partial x^2} &= -\left(\frac{n\pi}{L}\right)^2 \sin{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)}. \end{align*} \]

Therefore:

\[ \begin{align*} a^2 \frac{\partial^2 y}{\partial x^2} &= -a^2 \left(\frac{n\pi}{L}\right)^2 \sin{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)} \\ &= -\left(\frac{n\pi a}{L}\right)^2 \sin{\left(\frac{n\pi x}{L}\right)} \cos{\left(\frac{n\pi a t}{L}\right)} \\ &= \frac{\partial^2 y}{\partial t^2}. \end{align*} \]

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.

Show that the function

\[ u(x,t) = t^{-1/2} e^{-x^2/(4kt)} \]

is a solution to the heat equation, for all \(t > 0\).

As in the previous exercise, we begin with the first derivatives:

\[ \begin{align*} \frac{\partial u}{\partial t} &= - \frac{1}{2} t^{-3/2} e^{-x^2/(4kt)} + t^{-1/2} e^{-x^2/(4kt)} \cdot \frac{x^2}{4kt^2}, \\ \frac{\partial u}{\partial x} &= t^{-1/2} e^{-x^2/(4kt)} \cdot \left( -\frac{x}{2kt} \right). \end{align*} \]

Then, the second derivative with respect to \(x\) is:

\[ \begin{align*} \frac{\partial^2 u}{\partial x^2} &=t^{-1/2} e^{-x^2/(4kt)} \cdot \left( -\frac{1}{2kt} \right) + t^{-1/2} e^{-x^2/(4kt)} \cdot \left( -\frac{x}{2kt} \right)^2 \\ &= -\frac{1}{2k} t^{-3/2} e^{-x^2/(4kt)} + t^{-1/2} e^{-x^2/(4kt)} \cdot \left( \frac{x^2}{4k^2t^2} \right). \end{align*} \]

Thus:

\[ k \frac{\partial^2 u}{\partial x^2} = -\frac{1}{2} t^{-3/2} e^{-x^2/(4kt)} + t^{-1/2} e^{-x^2/(4kt)} \cdot \left( \frac{x^2}{4kt^2} \right) = \frac{\partial u}{\partial t}. \]

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). \]

Show that if \(y(x,t)\) is a solution to the wave equation, then we have \[ \frac{\partial^2 y}{\partial \tau^2} = \frac{\partial^2 y}{\partial x^2}, \]

which is the “rescaled” wave equation with no constant of proportionality.

We begin by noting that if \(f(x, \tau)\) is any function of \(x\) and \(\tau\), then by the chain rule we have

\[ \frac{\partial f}{\partial t} = \frac{\partial f}{\partial \tau} \cdot \frac{\partial \tau}{\partial t} = a \frac{\partial f}{\partial \tau}. \]

In particular, with \(f(x,\tau) = y(x,\tau)\), we have

\[ \frac{\partial y}{\partial t} = a \frac{\partial y}{\partial \tau}. \]

But then, applying the chain rule again with \(f(x,\tau) = \frac{\partial y}{\partial \tau}(x,\tau)\), we get

\[ \frac{\partial^2 y}{\partial t^2} = \frac{\partial}{\partial t} \left( \frac{\partial y}{\partial t} \right) = \frac{\partial}{\partial t} \left( a\frac{\partial y}{\partial \tau} \right) = a \left[ \frac{\partial}{\partial t} \left( \frac{\partial y}{\partial \tau} \right)\right] = a \left[ a \frac{\partial}{\partial \tau} \left( \frac{\partial y}{\partial \tau}\right) \right] = a^2 \frac{\partial^2 y}{\partial \tau^2}. \]

Therefore, we have

\[ \frac{\partial^2 y}{\partial \tau^2} = \frac{1}{a^2} \frac{\partial^2 y}{\partial t^2} = \frac{1}{a^2} \left( a^2 \frac{\partial^2 y}{\partial \tau^2} \right) = \frac{\partial^2 y}{\partial x^2}, \]

as desired.