Linear first order PDE $u_x+u_t=u$ with the method of characteristics

characteristicslinear-pdepartial differential equations

I miss something so that I can understand how my teacher finds the solution. I will write the exercise as it is written first.

$$u_x+u_t=u, x\in \mathbb{R}, t>0$$ $$ u(x,0)=\cos x$$
Then I have:
$$\frac{\partial x(s)}{\partial s}=1, x(0)=x_0 $$
$$\frac{\partial t(s)}{\partial s}=1, t(0)=t_0 $$
$$\frac{\partial z(s)}{\partial s}=z, z(0)=u(x_0,t_0) $$
I get
$$\frac{\partial t}{\partial x}=\frac{\partial t}{\partial s}\frac{\partial s}{\partial x}=1 \Rightarrow t-x=c, t(x_0)=t_0$$
$$\frac{\partial z}{\partial x}=\frac{\partial z}{\partial s}\frac{\partial s}{\partial x}=z\Rightarrow z(x)c e^x$$
We conclude that $t-x$ is constant for all $s$, so $t-x=t_0-x_0$ and from initial conditions

$ z(x_0-t_0)=u(x_0-t_0,0)=\cos(x_0-t_0)$ and $z(x_0-t_0)=ce^{x_0-t_0}$ (I don't understand how I got the first equation)

So $z(x_0)=ce^{x_0}=e^{x_0-t_0}\cos(x_0-t_0)e^{x_0}=\cos(x_0-t_0)e^{t_0} \Rightarrow u(x_0,t_0)=\cos(x_0-t_0)e^{t_0}$ which means that $u(x,t)=\cos(x-t)e^{t}, x \in \mathbb{R}, t>0$

This is my teacher's solution. There is one other example, before this, that explains the method of characteristics which I think I have unsterstood (it's the linear transport equation). From research on the internet and some books I found, I got the idea that $u$ (any book I found doesn't explain why) is constant for $(x,t)$ belonging to the characteristic curve. Well I haven't yet understood why. My teacher says later in her notes that with the characteristics we create the surface of the solution (little-by-little for every value). I found a video and some posts here like this that explain the method but in the examples $\frac{\partial z}{\partial s}=0$ and I can't see how to manage different and more complicates cases. It seems to me that some steps of the solution are missing and I have nowhere found the ideas. In the link above the steps are more clear but I don't understand why we supposed that $s=t$. I just need some explanation around the steps and the thinking I have to do every time (for linear first order PDE generally)and how we thought of using $ x_0-t_0$ in $z(x_0-t_0)$. I think that everything else has been understood. Any explanation is very welcome because I am trying to understand this exercise since yesterday.

Best Answer

$$u_x+u_t=u$$ Charpit-Lagrange characteristic ODEs : $$\frac{dx}{1}=\frac{dt}{1}=\frac{du}{u}=ds$$ This is equivalent to the three equations that you correctly wrote.

A first characteristic equation comes from solving $\frac{dx}{1}=\frac{dt}{1}$ : $$x-t=c_1$$ A second characteristic equation comes from solving $\frac{dx}{1}=\frac{du}{u}$ : $$u\:e^{-x}=c_2$$ The general solution of the PDE expressed on implicit form $c_2=F(c_1)$ is : $$u\:e^{-x}=F(x-t)$$ $F$ is an arbitrary function (to be determined later according to a specified condition). $$\boxed{u(x,t)=e^xF(x-t)}$$ Condition : $u(x,0)=\cos(x)=e^xF(x)$ $$F(x)=e^{-x}\cos(x)$$ So the function $F(x)$ is determined. We put it into the above general solution where the argument is not $x$ but is $(x-t)$. Thus $F(x-t)=e^{-(x-t)}\cos(x-t)$ : $$u(x,t)=e^xe^{-(x-t)}\cos(x-t)$$ $$u(x,t)=e^t\cos(x-t)$$

Related Question