Partial differential equations

A foundational course for understanding mathematical modeling, differential equations and multiscale modeling.

Course Overview

This course introduces the fundamental ideas behind partial differential equations (PDEs), including topics such as linear PDEs, separation of variables, linear operators and more.

As you progress through this course, you will find links to related topics in other courses (such as calculus and ordinary differential equations). This interconnected structure is designed to help you quickly revisit prerequisite ideas without breaking your workflow.

Partial Differential Equations

We should start with, what exactly is a partial differential equation. In the field of differential equations we generally break the differential equations down into two major classes, ordinary differential equations, click here to see the ordinary differnetial equations course and partial differential equations. A typical progression through coursework would generally take you through a full ordinary differential equations course first, and then move into partial differential equations because a lot of important topics; such as classification of the differential equations, as well as understanding solutions, end up being useful in partial differential equations as well. Worry not, however, if you have not yet learned ordinary differential equations, as there will be plenty of links back to the important concepts throughout this course.

So getting back to the primary question, what exactly is a partial differential equation? A partial differential equation is an equation that involves an unknown function \(u(x_1,...,x_n)\) of two or more variables (i.e \(n\) in the subscript above is 2 or greater), along with certain of it's partial derivatives. You may wonder exactly how this differs from ordinary differential equations, the major difference is in the number of independent variables, so in an ordinary differential equation there is a single independent variable, however in partial differential equations there are \(n \geq 2\) independent variables. To start, we will begin by defining things in terms of differential operators, but don't worry, we will drop down to another notation shortly after, (click here to learn about differential operators), assuming we have a vector \(x \in U\) where \(U \subseteq \mathbb{R}^n\) and \(U\) is an open set, then $$F(D^k u(x), ..., D u(x), u(x), x) = 0,$$ is called a kth-order differential equation, where $$F:\mathbb{R}^{n^k} \times ... \times \mathbb{R}^{n} \times \mathbb{R} \times U \rightarrow \mathbb{R}.$$ Now if any of this notation is unfamiliar to you, such as the Cartesian product (\(\times\)) of sets (click here to learn about Cartesian products), then it is definitely strongly suggested that you review that by clicking on the link. Note that there is a key difference between differential operators that operate on functions of a single independent variable, such as the ones from the link above, and the ones that operate on functions of multiple independent variables here, which is where the \(n^k\) dimensionality arises from in the first term of the above equation. The difference is that in general, the ordering of the derivatives in a partial derivative matter, and since there are \(n^k\) different ways of arranging a partial derivative taken on \(n\) independent variables, the dimensionality of the space should now make sense. However, often times if we make some common assumptions, the ordering does not matter and this point becomes moot, just keep in the back of you mind that there are cases where the order of the partial derivative matters.

Now note what is given and what is not, the above kth order partial differential equation is given, but the function \(u(x)\), which is a function of \(n\) independent variables as already noted, is unknown. Our goal will be to solve for this unknown function. Note that \(u: U \rightarrow \mathbb{R}\). To solve the PDE, requires some kind of boundary (or initial and boundary) conditions on some part of \(\partial U\) (which is the boundary of the set \(U\) if you are unfamiliar with the notation). Now I personally prefer viewing things from this differential operator theoretic perspective, however, this may be intimidating due to it's unfamiliarity in the beginning, so we will back off a little bit and examine a simple situation where it is easy to write out the partial differential equation, suppose we have a second order differential equation and the unknown function \(u(x,y)\) is a function of the independent variables \(x,y\) as can be clearly seen. Then for this situation, we may define the general form of the partial differential equation as, $$F(u_{yy},u_{xx},u_{xy},u_x,u_y,u,x,y) = 0,$$ where we define \(\frac{\partial u}{\partial x} := u_x, \frac{\partial^2 u}{\partial x^2} := u_{xx}\) and the other terms are defined equivalently.

Now I scared you a bit in the beginning by jumping right in with operators, but if you don't remember (or never learned) what an operator is then now is probably a good time to teach you as we will see operators quite a bit.

Linear Operators

An operator is a mapping between functions, that is when you apply an operator to a function, the result is another (or possibly the same in the case of the identity operator) function. We will begin by diving into linear operators. An example of an operator is \(\mathcal{L} = \frac{\partial}{\partial x}\) or \(\frac{\partial}{\partial y}+x \frac{\partial}{\partial x}\), both of which are examples of what we will be focused on here, differential operators. A linear operator \(\mathcal{L}\) is an operator with the following two properties, $$\mathcal{L}(u+v) = \mathcal{L}u + \mathcal{L}v, \mathcal{L}(cu) = c \mathcal{L}u$$ and the operator is called nonlinear otherwise. We will check a couple of examples now, $$\mathcal{L}u = u_x+xu_y$$ is linear (try to figure out why this is true before I show you, it is always good to keep an active learning mind, rather than mindlessly following along, that may feel like learning but your brain is not absorbing it if you don't push it to work hard on such problems). To prove the above is linear, note that, $$\mathcal{L}u = u_x+xu_y, \mathcal{L}v = v_x+xv_y,$$ now we will find, $$\mathcal{L}(u+v) = (u+v)_x + x(u+v)_y = u_x+v_x+xu_y+xv_y,$$ and finally we will add, $$\mathcal{L}u + \mathcal{L}v = u_x+v_x+xu_y+xv_y,$$ which is the same as \(\mathcal{L}(u+v)\), therefore this satisfies the first property of a linear operator. You may finish the proof by verifying the second property, it isn't too difficult. I will do another example now, and hopefully now that you have seen the process, you can work through this one before I show you how to do it, $$\mathcal{L}u = u_x+uu_y,$$ is a nonlinear operator. To show this, $$\mathcal{L}u = u_x+uu_y, \mathcal{L}v = v_x+vv_y,$$ but, $$\mathcal{L}(u+v) = (u+v)_x + (u+v)(u+v)_y = u_x+v_x+uu_y+uv_y+vu_y+vv_y,$$ while, $$\mathcal{L}u+\mathcal{L}v = u_x+uu_y + v_x+ vv_y.$$ Notice that the equation above is missing the "cross terms" from the \(\mathcal{L}(u+v)\) equation, and since these two do not equal to each other (remember the definition of linear operators) this operator is nonlinear.

Linear Homogeneous PDEs

If you remember you ordinary differential equations, this part won't come as a surprise at all. A linear homogeneous is one in which we can write the equation as, $$\mathcal{L}u = 0,$$ and it is called inhomogenous if, $$\mathcal{L}u = g,$$ where the function of the \(n\) independent variables \(g(x_1,...,x_n) \neq 0\). As an example, the equation $$\sin(xy^2)u_x - x^2u_y = \cos(x^2+y^3)$$ is an inhomogenoues linear equation. Wait this is linear? Yes, lets varify. We can actually combine both properties as follows (to save ourselves time), a PDE of 2 independent variables may be called linear if, $$\mathcal{L}(c_1u+c_2v) = c_1\mathcal{L}u + c_2 \mathcal{L}v$$ so applying this to the equation above, note that, $$c_1 \mathcal{L}u = c_1 \sin(xy^2)u_x -c_1x^2u_y, c_1 \mathcal{L}v = c_2 \sin(xy^2)v_x -c_2x^2v_y$$ and $$\mathcal{L}(c_1u+c_2v) = \sin(xy^2)(c_1u+c_2v)_x - x^2(c_1u+c_2v)_y = \sin(xy^2)c_1u_x+\sin(xy^2)c_2v_x - x^2c_1u_y - x^2c_2v_y.$$ We can see by rearranging the above equation we get the same thing as adding the two previous equations, which tells us this is indeed linear. Now note that there is no way to isolate the right hand side of the original equation such that it gets absorbed into the operator. Because of that we must choose \(g(x,y) = \cos(x^2+^3)\), which gives us \(g(x,y) \neq 0\), meaning that the equation is inhomogeneous.

Now we can note an important fact about linear inhomogeneous equations (emphasis on the linear part here). Suppose we have a linear homogeneous equation, \(\mathcal{L}u = g\), then if there are two solutions, say \(u_1,u_2\) to this equation, the difference in those solutions represents a solution to the homogeneous linear equation \(\mathcal{L}u = 0\). This is quite easy to prove, by using linearity to our advantage. Note that we stated \(\mathcal{L}u_1=g, \mathcal{L}u_2=g\). This means that, from linearity (note that I am choosing \(c_1 = 1, c_2 = -1\) in this case), $$\mathcal{L}u_1 - \mathcal{L}u_2 = g - g \rightarrow \mathcal{L}(u_1-u_2) = 0.$$ I will note that we are making the assumption that \(g\) is sufficiently well behaved in the domain (no blowing up to infinity), but that is a rather mild condition to place on this. For now we will sweep such issues under the rug, but keep in mind that this doesn't work in every possible scenario, and we will have to adjust for "badly behaved" functions \(g\).

Introduction to solutions of linear PDEs

Now we will briefly introduce the solutions to linear PDEs. Recall from the beginning that we said that the function \(u\) is unknown, and thus the solution will be finding the appropriate functions \(u\) that are suitable to boundary and initial conditions. You may wonder why I say "solutions" and the reason is that in general there are multiple solutions. And furthermore, when the PDE is linear, we can put the solutions into a beautiful relationship to one another, and this again will not be a surprise to anyone who remembers ordinary differential equations. If \(u_1,...,u_n\) are all solutions to the linear homogeneous PDE, \(\mathcal{L}u = 0\), then so is any linear combination of those solutions, $$\sum \limits_{j=1}^n c_ju_j(x) = c_1u_1(x)+ c_2u_2(x) + ... + c_nu_n(x),$$ where \(c_j\) are constants (that may be either real or complex numbers based on the scenario) this is often referred to as the superposition principle (yes that old superposition term that gets thrown around in quantum mechanics). We should note that the \(c_j\) here are taken as constants, but they can in principle be time dependent, though we won't deal with time-dependent coefficients, at least until much later. Now we will see an example of how the solution process goes, this won't work in general, but it is illuminating about what to expect as we get to more general methods for solution.

To begin, suppose that we have an unknown function \(u(x,y)\) which satisfies the following equation, \(u_{xx} = 0\). Note that this is a linear, homogeneous, second order (because of two derivatives) PDE. Since it is homogeneous we can integrate (click here to learn about derivatives), both sides (with respect to x) to find, $$u_x = f(y).$$ Now you might protest, why isn't it just a constant? Why do we end up with a function of \(y\)? Well, you have to remember that \(u(x,y)\) is a function of both \(x\) and \(y\). To understand better, we can work backwards, by supposing that we have some function \(u(x,y)\) that would satisfy \(u_{xx} = 0\), for instance if we chose \(u(x,y) = x + y^2\) then naturally $$\frac{\partial u}{\partial x} = 1 \rightarrow \frac{\partial^2 u}{\partial x^2} = 0$$ as desired. In fact, we can put any other functions of only \(y\) in the place of \(y^2\) and get exactly the same result. Now let's take it one step further so we can suss out the \(f(y)\) after a single integration that we get. Imagine that we have \(u(x,y) = x + xy^2\) for example. Notice that, $$\frac{\partial u}{\partial x} = 1+y^2,$$ and it can obviously be argued that \(1+y^2\) is a function of \(y\)! So hopefully this illuminates why we found that after integration \(u_x = f(y)\). Now we need to integrate again to find our solution, $$u(x,y) = xf(y) + g(y).$$ This is our general solution in this case, notice that if we go in the other direction and take the first derivative (click here to learn about derivatives), with respect to \(x\) we get exactly what we would expect (since \(g(y)\) is a function of only \(y\) its derivative with respect to \(x\) is 0), \(u_x = f(y)\), so it seems we have found the consistency we desire.

Now we can do another example, \(u(x,y)\) where, $$u_{xx}-u=0.$$ Note that this is a linear, second order, homogeneous PDE. Again, we can lean on our understanding on ordinary differential equations for this. We can guess the solution here, we need a function that when we take it's derivative (with respect to \(x\)) twice it is equal to itself. I can quickly see two such functions \(a(x) = e^x,b(x) = e^{-x}\), (notice that constants multiplying the \(x\) term in the exponent will NOT work) but how do we account for the \(y\) term in the \(u(x,y)\)? Well for one thing, we might notice that due to the fact this is a partial derivative with respect to \(x\) only, we can actually put any function of \(y\) in the exponent, because by the chain rule (click here to learn about chain rule), we can see that \(\frac{\partial}{\partial x}e^{x+f(y)} = e^{x+f(y)}\). But also notice that, again because the partial derivative is only being taken with respect to \(x\) that if I multiply either function \(a(x),b(x)\) by a function of \(y\), it gets treated as a constant when taking the derivative, thus in general the solution becomes, $$u(x,y) = f(y)e^{x}+g(y)e^{-x}.$$ Now you might protest, why did you not include the function in the exponent? Well, sneakily I did, because if \(f(y) = e^{k(y)}\) then note by the rules of exponents the \(k(y)\) will end up as an exponent (summed with the \(x\) term).

For posterity, we should do another example, again we will assume (as we will for much of the discussion that follows) that \(u(x,y)\) is a function of two independent variables. $$u_{xy} = 0,$$ will be our example. Now notice how this is different than before (we will assume for now the solution does not blow up to infinity over the domain we are interested in), we are taking the partial derivative with respect to one variable and then the other, and so long as both \(u_{xy}, u_{yx}\) are continuous on the domain of interest we may switch the order freely by Clairaut's Theorem. Again we can hazard a guess at the solution (don't worry, as I mentioned we will learn more general methods of solution soon enough), clearly for this to be 0 after partial differentiation with respect to both \(x\) and \(y\) there cannot be a function of \(x\) multiplying a function of \(y\), since the product rule would ruin this becoming zero, so the easiest way is to have, $$u(x,y) = f(x) + g(y),$$ because taking the derivative with respect to \(x\) takes the \(g(y)\) term to 0 and then taking the derivative with respect to \(y\) takes the term \(g(x)\) to 0 (or vice-versa by Clairaut's theorem).

We will do another example for good measure. Verify by direct substitution that $$u_n(x,y) = \sin(nx)\sinh(ny)$$ is a solution of $$u_{xx}+u_{yy} = 0$$ for every \(n>0\). Well this is simple enough to do, but it is good practice (this is a way you can check if the solution you have come up with is actually a solution to the PDE). We will start with \(u_x\), $$u_x = n\cos(nx)\sinh(ny)$$ by the chain rule (i.e. \(f'(g(x))\) where \(f(x) = \sin(x), g(x) = nx\) thus \(f'(x) = \cos(x), g'(x) = n\) and by the chain rule \(f'(g(x))g'(x) = \cos(x)n\)), and the fact that the term with only a \(y\) in it is treated as a constant when taking the derivative with respect to \(x\). Similarly, $$u_{xx} = -n^2\sin(nx)\sinh(ny).$$ Now this is where it might get tricky, remember that \(\cosh(x)\) behaves differently than \(\cos(x)\) when you take it's derivative (no negative sign pops up in the \(\cosh(x)\) case when taking derivatives) $$u_y = n\sin(nx)\cosh(ny), u_{yy} = n^2\sin(nx)\sinh(ny)$$ and thus $$u_{xx}+u_{yy} = 0,$$ regardless of the value of \(n\) since \(u_{xx}=-u_{yy}\).

First order linear PDE solutions

Again anyone who has taken ordinary differential equations will recall, when we have a linear differential equation, we can break it into a homogeneous part and a inhomogeneous part. Thus, we can first solve the corresponding homogeneous equation to find the solution \(u_h\) and a particular solution, for the inhomogeneous part \(u_p\), and the general solution then becomes \(u = u_h+u_p\). This is easy to see, using the linearity of the operator (obviously use caution, this only works when the operator is linear) $$\mathcal{L}u = \mathcal{L}(u_h+u_p) = \mathcal{L}u_h + \mathcal{L}u_p = 0 + g,$$ where the \(0\) comes from the homogeneous part and the \(g\) comes from the particular (inhomogeneous) part.