Problem: Solve the following differential equation. \[ \frac{\partial u}{\partial t} - e^{-t} \frac{\partial u}{\partial x} + u = 0,~u(x,0)=x. \]
Solution: Let us consider the corresponding Lagrange's auxiliary equations. \begin{equation}\label{eq:12May2023-1} \frac{\mathrm{d} x}{-e^{-t}} = \frac{\mathrm{d} t}{1} = \frac{\mathrm{d} u}{-u}. \end{equation} Considering the first two terms, \begin{align*} \frac{\mathrm{d} x}{e^{-t}} = -\mathrm{d} t & \implies \mathrm{d} x = -e^{-t} \mathrm{d} t \\ & \implies x = e^{-t} + c_1 \\ & \implies c_1 = x - e^{-t}. \end{align*} Similarly, considering the last two terms of equation \eared{eq:12May2023-1} \begin{align*} \frac{\mathrm{d}t}{1} = \frac{\mathrm{d} u}{-u} & \implies t = - \ln u + \ln C_2 \\ & \implies C_2 = ue^{t}. \end{align*}
Therefore, the general solution is \[ C_1 = \varphi \left( C_2 \right) \implies x - e^{-t} = \varphi \left( u e^{t} \right). \] Now, we will use the given condition that $u(x,0) = x$. \begin{align*} x - e^{0} = \varphi \left( u(x,0)e^0 \right) \implies x -1 = \varphi \left( x \right). \end{align*} Therefore, the solution of the given differential equation is \[ x - e^{-t} = ue^{t} - 1 \implies u(x,t) = e^{-t} \left( x - e^{-t} + 1 \right). \]