2.1.34 \(u_t+u u_x=x\) with \(u(x,0)=f(x)\) Example 3.5.11 in Lokenath Debnath.

problem number 34

Added June 2, 2019.

From example 3.5.11, page 219 nonlinear pde’s by Lokenath Debnath, 3rd edition.

Solve for \(u(x,y)\)

\[ u_t+u u_x=x \]

with \(u(x,0)=f(x)\)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] +u[x,t]*D[u[x, t], x] ==x; 
ic  = u[x,0]==f[x]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde,ic}, u[x, t], {x, t}], 60*10]];
 

Failed

Maple

restart; 
pde := diff(u(x,t),t)+u(x,t)*diff(u(x,t),x)=x; 
ic  := u(x,0)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,t))),output='realtime'));
 
\[u \left (x , t\right ) = f \left (\operatorname {RootOf}\left (\left ({\mathrm e}^{2 t} f \left (\textit {\_Z} \right )+{\mathrm e}^{2 t} \textit {\_Z} -2 \,{\mathrm e}^{t} x -f \left (\textit {\_Z} \right )+\textit {\_Z} \right ) \left (f \left (\textit {\_Z} \right )+\textit {\_Z} \right )\right )\right ) {\mathrm e}^{t}+\operatorname {RootOf}\left (\left ({\mathrm e}^{2 t} f \left (\textit {\_Z} \right )+{\mathrm e}^{2 t} \textit {\_Z} -2 \,{\mathrm e}^{t} x -f \left (\textit {\_Z} \right )+\textit {\_Z} \right ) \left (f \left (\textit {\_Z} \right )+\textit {\_Z} \right )\right ) {\mathrm e}^{t}-x\]

___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________