Use the method of characteristics to solve $$u_t+uu_x+\frac{1}{2}u=0, \quad t>0, \quad {-\infty}<x<\infty$$ $$u(x,0)=\sin(x)\quad {-\infty}<x<\infty$$ (solution may be expressed in implicit form). Show that a shock solution is possible if $t=t_c=2\ln(2)$.
Notes: Although I have used the method of characteristics to solve the wave equation and have cover basic theory in class. But, I am bit lost in application. Any hints would be appreciated.
$$u_t+uu_x=-\frac{1}{2}u $$ Characteristic set of ODEs : $\quad \frac{dt}{1}=\frac{dx}{u}=\frac{du}{-\frac{1}{2}u}$
First characteristic equation, from $\quad \frac{dx}{u}= -2\frac{du}{u} \quad\to\quad u+\frac{1}{2}x=c_1$
Second characteristic equation, from $\quad dt=-2\frac{du}{u}\quad\to\quad ue^{t/2}=c_2$
General solution of the PDE expressed on the form of implicit equation : $$\Phi\left(u+\frac{1}{2}x\:,ue^{t/2}\right)=0$$
where $\Phi$ is any differentiable function of two variables.
Or, equivalently: $u+\frac{1}{2}x=F\left(ue^{t/2}\right)$ $$u=-\frac{1}{2}x+F\left(ue^{t/2}\right)$$
where $F(X)$ is any differentiable function with $X=ue^{t/2}$
CONDITION : $u(x,0)=\sin(x)$
In this condition, $X=ue^{0/2}\quad\to\quad X=u=\sin(x)$.
$x=\sin^{-1}(X)\quad$ Hence $u= -\frac{1}{2}x+F(X)=-\frac{1}{2}\sin^{-1}(X)+F(X) =X$
$$ F(X)=X+\frac{1}{2}\sin^{-1}(X)$$
Now, the function $F$ is determined and can be put into the above general solution, which becomes the particular solution according to the specified condition.
$$u=-\frac{1}{2}x+F\left(ue^{t/2}\right)=-\frac{1}{2}x+\left(X+\frac{1}{2}\sin^{-1}(X)\right)$$ where $X=ue^{t/2}\quad\to\quad u=-\frac{1}{2}x+ue^{t/2}+\frac{1}{2}\sin^{-1}(ue^{t/2})$
$\sin^{-1}(ue^{t/2})=x+2u\left(1-e^{t/2}\right)\quad\to\quad ue^{t/2}=\sin\left(x+2u\left(1-e^{t/2}\right)\right)$ $$u=e^{-t/2}\sin\left(x+2u\left(1-e^{t/2}\right)\right)$$
Note that $u(x,t)$ is multivalued for $t>2\ln(2)$ in some range of $x$.
Explanations are provided (for example) in : http://www1.maths.leeds.ac.uk/~kersale/Teach/M3414/Notes/m3414_2.pdf
Especially, compare to the next figure taken from this pdf, page 28 :