# First order partial differential equation - method of characteristics

I am trying to solve following PDE:

\begin{equation} \frac{\partial g}{\partial t} = (1 - x) \mu \frac{\partial g}{\partial x} - \tau (1 - x) g, \quad g = g(x,t) \end{equation} where \begin{equation} g(x,0) = x^{n_0}, \quad x(1,t) = 1 \end{equation}

I wanted to solve this by method of characteristics. First, I have parameterized my variables with parameter $s$ with initial conditions \begin{equation} t(0) = 0, \quad x(0) = x_{0} \end{equation} from which \begin{align} \frac{\partial g}{\partial t} &= \tau (x - 1) g \\ \frac{\partial t}{ \partial s} &= 1, \quad \implies t = s \\ \frac{\partial x}{\partial s} &= \mu (x - 1) \implies x - 1 = (x_{0} - 1) e^{\mu s} \end{align} From first differential equation (using third) \begin{equation} \ln \frac{g(x,t)}{g_{0}} = \frac{\tau}{\mu} (x_{0} - 1) e^{\mu t} \implies g(x,t) = g_{0} \exp \left\{ \frac{\tau}{\mu}(x_{0} - 1) e^{\mu t} \right\} \end{equation} From boundary condition $g(x,0) = x^{n_{0}}$ we have \begin{equation} g_{0} = x^{n_{0}} \exp \left\{ - \frac{\tau}{\mu} (x_{0} - 1) \right\} \end{equation} Using third differential equation again \begin{equation} g_{0} = x^{n_{0}} \exp \left\{ - \frac{\tau}{\mu} (x - 1) e^{- \mu t} \right\} \end{equation} and so I got \begin{equation} g(x,t) = x^{n_{0}} \exp \left\{ \frac{\tau}{\mu}(x-1)(1 - e^{-\mu t}) \right\} \end{equation}

I would be generally satisfied with this solution... but mathematica gives: \begin{equation} \left\{\left\{g(x,t)\to \left(1 + (x-1)e^{-\mu t} \right)^{n_0} \exp \left(\frac{\tau}{\mu} (x-1)(1-e^{-\mu t}) \right) \right\}\right\} \end{equation} And I have no idea what I did wrong.... Any ideas?

## 1 Answer

I have found what was wrong with it.

I forgot to consider, that also $g_0$ can be $x_0$ depended.... Corrected solution is following:

\begin{align} \frac{\partial g}{\partial t} &= \tau (x - 1) g \\ \frac{\partial t}{ \partial s} &= 1, \quad \implies t = s \\ \frac{\partial x}{\partial s} &= \mu (x - 1) \implies x - 1 = (x_{0} - 1) e^{\mu s} \end{align} Using third equation on first one $(s = t)$ \begin{equation} \ln \frac{g(x,t)}{g_{0}(x_{0})} = \frac{\tau}{\mu} (x_{0} - 1) e^{\mu t} \implies g(x,t) = g_{0}\left[ (x-1)e^{-\mu t} + 1 \right] \exp \left\{ \frac{\tau}{\mu} (x - 1) \right\} \end{equation} where we have used, that constant $g_{0}$ can be also $x_{0}$ depended. From boundary condition $g(x,0) = x^{n_{0}}$ we have \begin{equation} g_{0}[x] = x^{n_{0}} \exp \left\{ - \frac{\tau}{\mu} (x - 1) \right\} \implies g_{0}\left[ (x-1)e^{-\mu t} + 1 \right] = ((x-1)e^{-\mu t} + 1)^{n_{0}} \exp \left\{ - \frac{\tau}{\mu} (x-1)e^{-\mu t} \right\} \end{equation} and so we have \begin{equation} g(x,t) = \left(1 + (x-1)e^{-\mu t} \right)^{n_0} \exp \left\{ \frac{\tau}{\mu} (x-1)(1-e^{-\mu t}) \right\} \end{equation}