I want to solve the following pde ( nonlinear transport - I guess ?)
$\phantom{}$
$ u_t - a(x) u_x = 0 $
with $a(x) > 0 $ and $u(x,0) = u_0(x)$
$\phantom{}$
I tried the method of characteristics, but I can't get it to work:
I set up the characteristics by writing $\frac{dx}{dr} = a(s) $ , $\frac{dt}{dr} = 1$, $ \frac{du}{dr} = 0 $
and initial conditions as :
$x(0) = s$, $t(0) = 0$, $u(0) = u_0(s)$
solving this for s and and t and plugging into u gives then
$u(x(r,s),t(r)) = u_0(x(r,s) - a(s) t(r))$
or $u(x,t) = u_0(x -a(x)t)$
[This solution is also shock-free as $det J = -1$ which is never zero]
$\phantom{}$
sadly this turns out to be the wrong solution when plugged into the original equation (also it is just the linear result so I fear I missed a chain rule somewhere), can you maybe hint me to where I went wrong ?
regards, Jonas
Finding the general solution is easy:
Follow the method in http://en.wikipedia.org/wiki/Method_of_characteristics#Example:
$\dfrac{dt}{dr}=1$ , letting $t(0)=0$ , we have $t=r$
$\dfrac{dx}{dr}=-a(x)$ , we have $r=t=-\int_k^x\dfrac{ds}{a(s)}+x_0$
$\dfrac{du}{dr}=0$ , letting $u(0)=f(x_0)$ , we have $u=f(x_0)=f\left(t+\int_k^x\dfrac{ds}{a(s)}\right)$
But it does not guarantee that regularizing the arbitrary function according to the condition $u(x,0)=u_0(x)$ is easy.
Since when putting the condition, we get $f\left(\int_k^x\dfrac{ds}{a(s)}\right)=u_0(x)$ , which is difficult to find $f(x)$ as finding the inverse function of $\int_k^x\dfrac{ds}{a(s)}$ for general $a(x)$ is difficult.