# Transport equation $u_t + xu_x + u = 0$ with $u(x_0, 0) = \cos(x_0)$

I have been studying PDEs using Peter Olver's textbook. I have learnt how to solve equations such as $u_t + 2u_x = \sin(x)$ subject to an initial condition such as $u(0,x) = \sin x$. Letting $\epsilon = x - 2t$ and $u(t,x) = v(t,\epsilon)$, I then plug this into the transport equation.

However, I am not sure how to define a characteristic to solve the following equation

$$u_t + xu_x + u = 0, \qquad u(x_0, 0) = \cos(x_0)$$

because it has a variable 'speed' term $x$ and it is also not homogenous because of the term $u$.

A solution would be very helpful so I can see how to approach these problems.

• If you change coordinates to $x = e^y$ then $u_y = xu_x$ so your PDE in these new coordinates simplifies to $u_t + 2u_y + u = 0$. You can even simplify it further by taking $v = e^{t} u$ then $v_t + 2v_y = 0$ which is the equation you say you already know how to solve. – Winther May 9 '18 at 17:48

$$u_t + xu_x = -u$$ $\frac{dt}{1}=\frac{dx}{x}=\frac{du}{-u}$

First characteristics, from $\quad \frac{dt}{1}=\frac{dx}{x}$ :

$$x\,e^{-t}=c_1$$

Second characteristics, from $\quad\frac{dx}{x}=\frac{du}{-u}$ : $$x\,u=c_2$$ General solution of the PDE : $\quad x\,u=F(x\,e^{-t})$

$$u(x,t)=\frac{1}{x}F(x\,e^{-t})$$ $F$ is an arbitrary function, to be determined according to the boundary condition.

Condition : $\quad u(x_0, 0) = \cos(x_0)=\frac{1}{x_0}F(x_0\,e^{0})$

$F(x_0)=x_0\cos(x_0)$. Now the function $F$ is determined, i.e.: $F(X)=X\cos(X)$.

We put it into the above general solution , where $X=x\,e^{-t}$ , thus $F(x\,e^{-t})=(x\,e^{-t})\cos(x\,e^{-t})$ :

$$u(x,t)=\frac{1}{x}(x\,e^{-t})\cos(x\,e^{-t})=e^{-t}\cos(x\,e^{-t})$$

• Hi, thank you. Can you explain how you obtain your general solution of the PDE from the two characteristics? – PhysicsMathsLove May 11 '18 at 10:37
• The general solution can be expressed on various forms. For example on the form of implicit equation : $\Phi(c_1,c_2)=0$, or $c_1=f(c_2)$ or $c_2=F(c_1)$ or other forms. All functions introduced are arbitrary, but they are related one to the other. Doesn't matter the form chosen, the final result is the same after applying the boundary condition. – JJacquelin May 11 '18 at 10:51
• Ok I am still not sure how you obtain $xu = F(xe^{-t})$ from your characteristics, I.e. how it depends on $xe^{-t}$? – PhysicsMathsLove May 11 '18 at 10:57
• $c_2=F(c_1)$ with $c_2=xu$ and $c_1=xe^{-t}$ gives $xu=F(xe^{-t})$. – JJacquelin May 11 '18 at 11:02
• Why do you know one constant is a function of the other? – PhysicsMathsLove May 11 '18 at 11:12

Let us apply the method of characteristics. We get the characteristic equations $$\frac{\text{d} t}{\text{d} s} = 1 \, , \qquad \frac{\text{d} x}{\text{d} s} = x \, , \qquad \frac{\text{d} u}{\text{d} s} = -u \, .$$ Letting $t(0) = 0$, we know $t=s$. Letting $x(0) = x_0$, we get $x(t) = x_0\, e^t$. Since $u(0) = \cos(x_0)$, we have $u(t) = \cos(x_0)\, e^{-t}$. Finally, $$u(x,t) = \cos(x\, e^{-t})\, e^{-t} \, .$$

Note that \begin{align} \frac{\rm d}{{\rm d}t}u(e^t,t+t_0)&=\frac{\partial u}{\partial t}(e^t,t+t_0)+e^t\frac{\partial u}{\partial x}(e^t,t+t_0)\\ &=\left(\frac{\partial u}{\partial t}+x\frac{\partial u}{\partial x}\right)(e^t,t+t_0)\\ &=-u(e^t,t+t_0) \end{align} holds for all $t$ and $t_0$. Thus $$\frac{\rm d}{{\rm d}t}u(e^t,t+t_0)+u(e^t,t+t_0)=0,$$ or equivalently, $$\frac{\rm d}{{\rm d}t}\left(e^tu(e^t,t+t_0)\right)=0.$$ Therefore, $$e^tu(e^t,t+t_0)=e^{-t_0}u(e^{-t_0},-t_0+t_0)=e^{-t_0}u(e^{-t_0},0)=e^{-t_0}\cos e^{-t_0},$$ or equivalently, $$u(e^t,t+t_0)=e^{-t-t_0}\cos e^{-t_0}.$$ Finally, let $x=e^t>0$ and $\tau=t+t_0$. This gives $t=\log x$ and $t_0=\tau-\log x$. Hence $$u(x,\tau)=e^{-\log x-\tau+\log x}\cos e^{-\tau+\log x}=e^{-\tau}\cos\left(e^{-\tau}x\right).$$