Solution (source code)

= Solution

The <characteristic curves> are $x=\xi+at$. Along one of them, $U(t)=u(t,\xi+at)$ obeys the separable <ordinary differential equation>
$$
U'=U^2,
\qquad
U(0)=\cos\xi.
$$
Therefore
$$
U(t)=\frac{\cos\xi}{1-t\cos\xi},
\qquad
u(t,x)=\frac{\cos(x-at)}{1-t\cos(x-at)}.
$$
For $0\leq t<1$, the denominator is positive everywhere. At $t=1$, it first vanishes where $\cos\xi=1$, namely at $\xi=2\pi k$. The solution consequently has <finite-time blowup> at time
$$
T_*=1
$$
along the points $x=a+2\pi k$. No finite classical solution can continue through that time.