# Method of Characteristics(Advection equation with initial and boundary condition)

Solve, using the Method of Characteristics, the equation $\frac{\partial \rho}{\partial t} + \frac{\partial \rho}{\partial x}=-\mu\rho$
for $x,t>0$ with the conditions $\rho(x,0)=f(x)$ and $\rho(0,t)=g(t)$.

I'm currently trying to solve above problem using method of characteristics. I used initial condition $\rho(x,0)=f(x)$ and obtained $|\rho(x,t)|=|f(x-t)|e^{- \mu t}$. But I need to find $\rho(x,t)$ and also I don't know how to use the boundary condition $\rho(0,t)=g(t)$. I'm posting this problem here to get a hint.Thanks in advance.

$$\frac{\partial \rho}{\partial t} + \frac{\partial \rho}{\partial x}=-\mu\rho$$ System of ODEs for the characteristics equations : $\quad \frac{dt}{1}=\frac{dx}{1}=\frac{d\rho}{-\mu\rho}$

First family of characteristic curves, from $\quad \frac{dt}{1}=\frac{dx}{1} \quad\to\quad t-x=c_1$

Second family of characteristic curves, from $\quad \frac{dt}{1}=\frac{d\rho}{-\mu\rho}\quad\to\quad \rho e^{\mu t}=c_2$

General solution on form of implicit equation : $\quad\Phi(t-x\:,\:\rho e^{\mu t})=0$

$\Phi$ is any differentiable function of two variables.

Or equivalently, on explicit form : $\quad\rho e^{\mu t} =F(t-x)$

$F(X)$ is any differentiable function where $X=t-x$.

$$\rho(x,t)=e^{-\mu t}F(t-x)$$

Case of condition : $\rho(0,t)=g(t)$ :

$\rho(0,t)=g(t)=e^{-\mu t}F(t-0)\quad$ which determines the function $F$ :

$F(X)=g(X)e^{\mu X}\quad$ that we put into the above general solution with $X=t-x$ $$\rho(x,t)=e^{-\mu t}g(t-x)e^{\mu(t-x)} = g(t-x)e^{-\mu x}$$

Case of condition : $\rho(x,0)=f(x)$ :

$\rho(x,0)=f(x)=e^{-\mu 0}F(-x)\quad$ which determines the function $F$ :

$F(X)=f(-x)\quad$ that we put into the above general solution with $X=t-x$ $$\rho(x,t)=e^{-\mu t}f(-(t-x))=f(x-t)e^{-\mu t}$$

If the two conditions are specified together and without information about the functions $f$ and $g$, it seems doubtful that further calculus be possible about the respective ranges of validity of the two above different functions $\rho(x,t)$ and the boundaries between them.

Comment :

If we don't know what are the functions $f$ and $g$ ( smooth or piecewise, related functions or not), in the general case $f(0)\neq g(0)$. Then there would be a contradiction between the conditions $\rho(0,0)=e^{-\mu 0}f(0-0)=f(0)$ and $\rho(0,0)=e^{-\mu 0}g(0-0)=g(0)$.

This implies that $\rho(x,t)$ would be a piecewise function like this, for example : $$\rho(x,t)=H(x-t)f(x-t)e^{-\mu t}+H(t-x)g(t-x)e^{-\mu x}$$ $H$ is the Heaviside step function.

In writing such a form of solution, we accept that the PDE be not valid on the line $x=t$ where the partial derivatives would be not continuous.

• Thanks for your answer. It sounds good. – Mayuran Sriskandasingam Dec 7 '17 at 2:29
• I added to my answer a comment about the case of piecewise solution. – JJacquelin Dec 7 '17 at 6:24
• It makes more sense. Thanks again! – Mayuran Sriskandasingam Dec 7 '17 at 8:00