PDE initial value problem

Show that the solution of the initial value problem for $u_t+u_x=\cos ^2 u$ is given by $u(x,t)=\tan^{-1} \{ \tan [u_o(x-t)]+t\}$, where $u_0(x)$ is the initial condition.

My attempts at a solution: I first tried directly taking the partial derivatives of $u(x,t)$ to plug them in and verify, but I got stuck on how I would do that with the $u_o(x-t)$ part of $u(x,t)$.

I then tried separation of variables, but I couldn't successfully separate the variables $x$ and $t$.

My most recent attempt involved Laplace transform. I got to this: $U_x(x,s)+sU(x,s)=\frac{2}{s(s^2+4)}+u_0(x)$ but didn't know how to proceed (I was trying to teach myself).

Which method would you use? Also, could you please show the first few steps of your method, especially if it's one that I tried and got stuck on?

Thanks!

Here is a solution by the method of characteristics. So, we assume that the equation is $$u_t+u_x=\cos^2 u,\quad u(x,0)=u_0(x).$$ Consider the characteristics defined by $$\frac{dx}{ds}=1,\quad x(0)=\tau,\\ \frac{dt}{ds}=1,\quad t(0)=0,\\ \frac{du}{ds}=\cos^2 u,\quad u(0)=u_0(\tau).$$ Obviously, from first two equations $$x=s+\tau,\quad t=s\implies \tau=x-t.$$ From the third equation $$\tan u=s+\tan u_0(\tau),$$ or, finally, $$u=\tan^{-1}(\tan u_0(x-t)+t)$$ as required.

• Interesting! I have never seen this method before. Thank you for the wiki link. I'll take the time to read up on it. It seems like it works well for this problem.
– User
May 22 '13 at 4:23
• Quick question, you mention "from the third equation." Do you mean $\frac{du}{ds}=\cos^2u$?
– User
May 22 '13 at 4:30
• @user78026 Yes. May 22 '13 at 4:30
• $$\frac{du}{\cos^2 u}=ds\implies \tan u=s+\mbox{Const}$$ and use the initial conditions. May 22 '13 at 4:41
• Ah of course! Thank you so very much!
– User
May 22 '13 at 4:42