So far, we’ve found the general solutions for two types of linear, homogeneous, first order PDEs: those with constant coefficients, and those with varying coefficients. It turns out that you can also extend the method of characteristics for linear, *inhomogeneous*, first order PDEs. In fact, the procedure is almost exactly the same.

So consider a PDE of the form , where , , and can be either constant or variable (just so long as the PDE is still linear). Let’s assume that they’re all functions.

As before, we need to solve the ODE , getting some implicit solution . But now, , where . This means that our solution does *not* in general attain the same value along a single characteristic, as it did in the homogeneous case. So what can we do here?

Well let’s consider what does happen when we move along a characteristic. Let’s look at a picture we’ve seen before:

Let’s focus in on one characteristic curve, and ignore the rest. Clearly moving along a characteristic simply means going forward (or backward) in time. In our case, moving forward in time increases and moving backward in time decreases it. Therefore the characteristic curve depends on time. Let’s call our curve . Then our solution should be of the form . Let’s check and see if this makes sense. This solution is dependent upon time alone, therefore let’s take the derivative. By the chain rule we get:

which equals by hypothesis. So this works.

Well, that’s convenient, because now we have a second ODE involving and , namely . Let’s assume we can solve this. We should get an implicit function , where depends on the characteristic we’re on. Well, if it depends on the characteristic we’re on, then we’re just back the case we derived previously. Now we just need to solve in terms of , i.e. rearrange so that we end up with , where is some function and is the part that’s dependent on the characteristic.

We already know that , where was the solution of the ODE . Plugging in, we end up with the solution .

**Example:**

Let’s solve , where .

Let . Differentiating, as above, we get . Solving by separation of variables gives , where .

Let’s solve for . From the equation, we get the second ODE . Solving, we get ; this is our . Therefore .

Plugging in, we get the general solution . Let’s use our initial condition now: . Let’s substitute so that . Rewriting the equation, we get .

As in a previous post, is simply a dummy variable. Just let . Then our final solution becomes:

Differentiate this and plug it into the PDE to check.