I'm fairly new to the whole field of PDE and I tried to work on some examples in order to become more familiar with the method of characteristics.
I've been working on this task:
You have the PDE $$\partial_t u(x,t)+a(u(x,t)) \partial_x u(x,t)=0~~ \forall x \in \mathbb{R}, t \in [0, T)$$ $$u(x,0)=u_0(x) ~~\forall x \in \mathbb{R}$$
where $a, u_0 \in C^1_b(\mathbb{R})$.
Let now $u \in C^1(\mathbb{R} \times [0,T])$ be a classical solution of the PDE above. Prove that this solution fulfills $$ u(x,t)=u_0(x-t\cdot a(u(x,t))).$$
My approach so far was to first come up with the characteristic equations:
$$\frac{d}{ds} \left(\begin{array}{c} x(s)\\t(s) \\ y(s) \end{array}\right) = \left(\begin{array}{c} a(y(s)\\1 \\ 0 \end{array}\right) $$ with the start values $$ \left(\begin{array}{c} x(0)\\t(0) \\ y(0) \end{array}\right)= \left(\begin{array}{c} x_0 \\0 \\ u_0(x_0) \end{array}\right).$$
Solving these equations gave me:
$$\left(\begin{array}{c} x(s) \\t(s) \\ y(s) \end{array}\right)= \left(\begin{array}{c} s \cdot a(y(s)) + x_0 \\s \\ u_0(x_0)\end{array}\right)$$ where I'm however not sure about the $x(s)$ part. I assume that there's something missing as my $y$ depends on $s$ which has to be considered when differentiating, but I don't know how to do this. Using the substitution $t=s$ and $x_0=x-t \cdot (u_0(x_0))$, I get the solution $$u(x,t)=u_0(x-t \cdot a(u_0(x_0))),$$ which has at least some resemblance to the actual solution...
I would be very grateful if someone could point out my mistakes and maybe even correct them. Thank you very much!
The purpose of the method of characteristics is to reduce the difficult problem of solving your PDE on the domain $\mathbb R \times [0, T)$ to the relatively easy of solving ODEs along curves within your domain. We want to chose these curves cleverly, so that these ODEs are nice. These cleverly-chosen curves are called the characteristic curves of the PDE.
So suppose that $u(x,t)$ is a solution to your PDE. And suppose that $$s \mapsto (t(s), x(s))$$ is a parametrisation of a curve inside our domain. Then along this curve, we can also think of the independent variable $u$ as a function, $$ s \mapsto u(s) := u(x(s), t(s)).$$
We're going to focus on a particular, cleverly-chosen family of curves: namely, the family of curves obeying the following set of ODEs: $$ \frac{dt(s)}{ds} = 1, \ \ \ \ \ \frac{dx(s)}{ds} = a(u(s)).$$ It is a simple exercise, involving nothing more than the chain rule, to verify that the PDE implies that $u(s)$ must itself satisfy the ODE $$ \frac{du(s)}{ds} = 0$$ along any curve within our family.
Solving these ODEs, we discover that the functions $t(s)$, $x(s)$ and $u(s) := u(t(s),x(s))$ for any curve within our family are given by $$ t(s) = s+ c_0, \ \ \ \ \ x(s) = a(c_2)s+c_1, \ \ \ \ \ u(s) = c_2,$$ for some constants $c_0, c_1, c_2$, specific to the particular curve that we're looking at.
However, these constants are not all independent. First, we may set $c_0 = 0,$ by redefining the parameter $s$ by a constant shift, $s_{\rm new} = s_{\rm old} + c_0$.
We can also determine the value of $c_2$ in terms of $c_1$, using the initial condition, $u(0,x) = u_0(x)$. Indeed, at $s = 0$, we have $$t = 0, \ \ \ x = c_1, \ \ \ u = c_2,$$ and applying the initial condition at $t = 0$ and $x = c_1$, we learn that $$ c_2 = u_0(c_1) .$$
So we may summarise as follows. We have a family of "special" curves, whose members are labelled by different choices of $c_1$: each choice of $c_1$ gives a different curve within our family. The points along a given curve within our family are parametrised by a parameter $s$, as follows: $$ s \mapsto (t(s), x(s)) = (s, a(u_0(c_1))s +c_1),$$ And along this curve, the values of $u$ are given by $$ u(t(s), x(s)) = u_0(c_1).$$
Now let's make use of this information to solve the PDE. We'll pick an arbitrary point $(t_1, x_1)$ in $\mathbb R \times [0,T)$, and we'll try to determine the value of $u$ at this point.
First, we should ask ourselves: which of the curves within our family contains the point $(t_1, x_1)$? Clearly, from our expressions above, the point $(t_1, x_1)$ lies on the curve with a value of $c_1$ that obeys $$ c_1 = x_1 - a(u_0(c_1)) t_1$$ and the value of the paramter $s$ at our point $(t_1, x_1)$ is $$ s = t_1.$$
The value of $u$ at our point $(t_1, x_1)$ is then given by $$ u(t_1, x_1) = u_0(c_1), $$ for this value of $c_1$.
It only remains to eliminate $c_1$, to leave an expression for $u(t_1, x_1)$ in terms of $t_1$ and $x_1$ alone. Plugging $u(t_1, x_1) = u_0(c_1)$ into the equation $ c_1 = x_1 - a(u_0(c_1)) t_1$, we learn that $$c_1 = x_1 - a(u(t_1, x_1))t_1,$$ and substituting this back into $u(t_1, x_1) = u_0(c_1)$, we find that $$ u(t_1, x_1) = u_0 ( x_1 - a(u(t_1, x_1)) t_1),$$ which is the expression we are looking for.
Finally, since our choice of $t_1 $ and $x_1$ was arbitrary, the solution to our PDE is $$ u(t,x) = u_0(x - a(u(t,x))t).$$
In terms of manipulating algebra, my explanation is identical to your solution (except that you could have finished off by substituting $u_0(x) \mapsto u(x,t)$ at the very end). All I've really done is flesh out some of the logic!