# Solving a general partial differential equation by using the method of characteristics

I want to solve $u_t + b \cdot \nabla u + cu =0$ with initial condition $u(x,0) = g(x)$. I started by using the method of characteristics. Define: $$z(s) := u(x + bs, t+s)$$ Then: $$\frac{dz}{ds} = b\cdot\nabla u + \frac{du}{dt} = -cu,$$ where I used the PDE in the last equality. Integrating this yields $z(s) = -cus + K$, where K is a constant. Furthermore: $$z(0) = u = K$$ and $$z(-t) = u(x-bt,0) = g(x-bt) = K + cut$$ Substracting these last two and rearranging yields: $$\boxed{u(x,t) = \frac{g(x-bt)}{1+ct}.}$$ However, plugging this into the PDE yields: $$(1+ct)^{-2}ct(b\cdot\nabla g + cg)\neq0$$ Does anyone see my mistake?

-

Your mistake is where you integrated the expression $\frac{\mathrm{d}z}{\mathrm{d}s}$ and treated $u$ as a constant in $s$. That is false, since $z$ is defined in terms of $u$, and so you can invert the condition to write $u$ in terms of $z$. In fact, what you need to do is to keep track of the arguments:

$$\frac{\mathrm{d}z}{\mathrm{d}s}(s) = (b\cdot \nabla u)(x + bs, t + s) + (\partial_t u)(x+bs, t+s) = - cu(x+bs, t+s) = - c z(s)$$

So integrating the above ODE should give you instead

$$z = z_0 \exp (-c s)$$

where $z_0$ is fixed by the boundary condition at $s = 0$.

-

$u_t+b\cdot\nabla u+cu=0$ with initial condition $u(x,0)=g(x)$ i.e. $u_t+bu_x+cu=0$ with initial condition $u(x,0)=g(x)$ .

$\dfrac{dt}{ds}=1$ , letting $t(0)=0$ , we have $t=s$

$\dfrac{dx}{ds}=b$ , letting $x(0)=x_0$ , we have $x=bs+x_0=bt+x_0$

$\dfrac{du}{ds}=-cu$ , letting $u(0)=f(x_0)$ , we have $u(x,t)=f(x_0)e^{-cs}=f(x-bt)e^{-ct}$

$u(x,0)=g(x)$ :

$f(x)=g(x)$

$\therefore u(x,t)=g(x-bt)e^{-ct}$

-