Taken from Mathematica Symbolic PDE document
quasilinear first-order PDE, scalar conservation law with initial value
Solve for \(u(x,y)\) \[ u_x+ u u_y = 0 \] With \(u(x,0)=\frac {1}{x+1}\)
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[x, y], {x}] + u[x, y]*D[u[x, y], {y}] == 0; ic = u[x, 0] == 1/(x + 1); sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, ic}, u[x, y], {x, y}]], 60*10]];
\[\left \{\left \{u(x,y)\to \frac {y+1}{x+1}\right \}\right \}\]
Maple ✓
restart; interface(showassumed=0); pde := diff(u(x, y), x) + u(x,y)*diff(u(x, y),y) =0; ic := u(x,0)=1/(x+1); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,y))),output='realtime'));
\[u \left ( x,y \right ) ={\frac {y+1}{1+x}}\]
Hand solution
Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin {align} \frac {dx}{ds} & =1\tag {1}\\ \frac {dy}{ds} & =u\tag {2}\\ \frac {du}{ds} & =0\tag {3} \end {align}
With initial conditions at \(s=0\)\[ x\left ( 0\right ) =t_{1},y\left ( 0\right ) =t_{2},u\left ( 0\right ) =t_{3}\] We are given that \(u\left ( x,0\right ) =\frac {1}{1+x}\). This initial condition translates to\begin {equation} t_{3}=\frac {1}{1+t_{1}},t_{2}=0\tag {4} \end {equation} Equation (1) gives\begin {equation} x=s+t_{1}\tag {5} \end {equation} Equation (2) gives\begin {align} y & =su+t_{2}\nonumber \\ & =su\tag {7} \end {align}
Equation (3) gives \[ u=t_{3}\] Hence the solution is \begin {align*} u & =t_{3}\\ & =\frac {1}{1+t_{1}}\\ & =\frac {1}{1+\left ( x-s\right ) }\\ & =\frac {1}{1+\left ( x-\frac {y}{u}\right ) } \end {align*}
Solving for \(u\) gives\begin {align*} u\left ( 1+\left ( x-\frac {y}{u}\right ) \right ) & =1\\ u+xu-y & =1\\ u\left ( 1+x\right ) & =1+y\\ u & =\frac {1+y}{1+x} \end {align*}
____________________________________________________________________________________