Find an explicit expression for the solution of the IVP
$$ \begin{cases} u_{t}(x,t)+u_{x}(x,t)+u(x,t)=e^{t+2x}\\ \\ u(0,x)=0, \end{cases} $$
by using the method of characteristics
Find an explicit expression for the solution of the IVP
$$ \begin{cases} u_{t}(x,t)+u_{x}(x,t)+u(x,t)=e^{t+2x}\\ \\ u(0,x)=0, \end{cases} $$
by using the method of characteristics
This is a linear PDE so
$$ u = u^h + u^p $$
with
$$ u_t^h+u_x^h=-u^h\\ u_t^p+u_x^p+u^p=e^{t+2x} $$
Using the Characteristics method with $u^h$ we have
$$ \begin{cases} \frac{dt}{d\tau} = 1 & t(0) = 0 & t(\tau) = \tau\\ \frac{dx}{d\tau} = 1 & x(0) = s & x(\tau) = s+\tau\\ \frac{du^h}{d\tau} = -u^h & u^h(0) = \phi(s) & -\ln u^h(\tau) = \phi(s)+\tau \end{cases} $$
or
$$ u^h(t,x) = e^{-t}\psi(x-t) $$
regarding the particular we have that $u^p(t,x) = \frac 14e^{t+2x}$ verifies the particular equation then
$$ u(t,x) = e^{-t}\psi(x-t)+\frac 14e^{t+2x} $$
and for $t=0$ we have
$$ \psi(x) + \frac 14e^{2x}=0 $$
then $\psi(x) = -\frac 14 e^{2x}$ and finally
$$ u(t,x) = \frac 14\left(-e^{-t}e^{2(x-t)}+e^{t+2x}\right) $$