PDE for a damped oscillator I'm studying a PDE that describes a damped oscillator, given by:
$$u_t + uu_x = -\gamma u $$
with initial conditions $u(x,0)=f(x)$. I derived the characteristics as:
$$\frac{dx}{dt} = u$$ and $$\frac{du}{dt} = -\gamma u$$
so that $x = ut+c_1$ and $u = c_2\exp(-\gamma t)$.
I'm nut sure how to proceed since the textbook only quotes the solution as
$$ u = f(\zeta)\exp(-\gamma t)$$
and
$$x = \frac{f(\zeta)}{\gamma}( 1- \exp(-\gamma t))+\zeta$$
 A: $$u_t + uu_x = -\gamma u $$
Charpit-Lagrange characteristic ODEs :
$$\frac{dt}{1}=\frac{dx}{u}=\frac{du}{-\gamma u}$$
A first characteristic equation comes from solving $\frac{dx}{u}=\frac{du}{-\gamma u}$ :
$$u+\gamma x=c_1$$
A second characteristic equation comes from solving $\frac{dt}{1}=\frac{dx}{u}=\frac{dx}{c_1-\gamma x}$ :
$$\gamma x+e^{-\gamma t}=c_2$$
The general solution of the PDE on implicit form $c_1=F(c_2)$ is :
$$\boxed{u=\gamma x+F(\gamma x+e^{-\gamma t})}$$
$F$ is an arbitrary function (to be determined according to the initial condition).
Condition :
$$u(x,0)=f(x)=\gamma x+F(\gamma x+1)$$
$$F(\gamma x+1)=f(x)-\gamma x$$
Let $\gamma x+1=X\quad\implies\quad x=\frac{X-1}{\gamma}$
$$F(X)=f\left(\frac{X-1}{\gamma}\right)-X+1$$
Now the function $F(X)$ is known. We put it into the above general solution where $X=\gamma x+e^{-\gamma t}$
$$u=\gamma x+f\left(\frac{(\gamma x+e^{-\gamma t})-1}{\gamma}\right)-(\gamma x+e^{-\gamma t})+1$$
$$\boxed{u(x,t)=f\left(x+\frac{e^{-\gamma t}-1}{\gamma}\right)+1-e^{-\gamma t}}$$
