How to determine whether a solution of a transport PDE is classical?

I have to determine whether the solution of:$$u_y+2u_x=0 , x>0,y>0 ,\quad u(x,0)=x ,x\geq 0 ,\quad u(0,y)=y ,y\geq0$$ is a classical solution.

I found that the solution is:$$u(x,y)=\frac{-x+2y}{2} , \quad if \quad 0<x<2y$$ $$u(x,y)=x-2y , \quad if \quad x>2y$$

My solution is continous when $x=2y$ but how to show if it is differentiable(once) both for $u_x, u_y$?


Your $u$ can be rewritten

\begin{align} u(x,y) &= U(x-2y),\\ U(z) &= \begin{cases}-z/2 & z<0 \\ z & z>0\end{cases} \\ &=\frac{|z|}2+ \frac12\begin{cases}0 & z<0 \\ z & z>0\end{cases} \\ &=\frac{|z|}2 + \frac{z+|z|}4 = \frac34|z| + \frac z4. \end{align} Because $$ |x-2y|$$ is not differentiable, it follows that $u$ is not either.