### 4 General ﬁrst order PDE’s

_______________________________________________________________________________________

#### 4.1 Linear PDE, the transport equation

problem number 1

Taken from Mathematica Symbolic PDE document

Solve for $$u(x,t)$$ $\frac{ \partial u}{\partial t} + \frac{ \partial u}{\partial x} = 0$

Mathematica

$\left \{\left \{u(x,t)\to c_1(t-x)\right \}\right \}$

Maple

$u \left ( x,t \right ) ={\it \_F1} \left ( -x+t \right )$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dt}{ds} & =1\tag{1}\\ \frac{dx}{ds} & =1\tag{2}\\ \frac{du}{ds} & =0\tag{3} \end{align}

With initial conditions$t_{s=0}=t_{1},x_{s=0}=t_{2},u_{s=0}=t_{3}$ Assuming $$u\left ( x,0\right ) =F\left ( x\right )$$ then this implies that $$t_{3}=F\left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align*} t & =s+t_{1}\\ & =s \end{align*}

Equation (2) gives\begin{align*} x & =s+t_{2}\\ t_{2} & =x-s\\ t_{2} & =x-t \end{align*}

Equation (3) gives$u=t_{3}$ Therefore (4) becomes$u\left ( x,t\right ) =F\left ( x-t\right )$ The traditional way to solve this is as follows. Let $$u\left ( x,t\right ) =u\left ( x\left ( t\right ) ,t\right )$$. Then $$\frac{du}{dt}=\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}\frac{dx}{dt}\tag{1}$$ If $$\frac{dx}{dt}=1\tag{2}$$ Then comparing (1) with given PDE $$\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}=0$$ shows that $$\frac{du}{dt}=0$$ or $$u$$ is constant on each characteristic line $$\frac{dx}{dt}=1$$. Integrating (2) gives$$x=t+x_{0}\tag{3}$$ Let $u\left ( x,0\right ) =F\left ( x\right )$ Since $$u$$ is constant on each characteristic line, then \begin{align*} u\left ( x,t\right ) & =u\left ( x_{0},0\right ) \\ & =F\left ( x_{0}\right ) \end{align*}

But from (3) $$x_{0}=x-t$$, hence the above solution becomes

$u\left ( x,t\right ) =F\left ( x-t\right )$

_______________________________________________________________________________________

#### 4.2 Linear PDE

problem number 2

Taken from Mathematica help pages

Solve for $$u(x,y)$$ $3 u_x + 5 u_y = x$

Mathematica

$\left \{\left \{u(x,y)\to \frac{1}{6} \left (6 c_1\left (\frac{1}{3} (3 y-5 x)\right )+x^2\right )\right \}\right \}$

Maple

$u \left ( x,y \right ) =1/6\,{x}^{2}+{\it \_F1} \left ( -5/3\,x+y \right )$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dx}{ds} & =3\tag{1}\\ \frac{dy}{ds} & =5\tag{2}\\ \frac{du}{ds} & =x\tag{3} \end{align}

With initial conditions$x_{s=0}=t_{1},y_{s=0}=t_{2},u_{s=0}=t_{3}$ Assuming $$u\left ( 0,y\right ) =F\left ( y\right )$$ then this implies that $$t_{3}=F\left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} x & =3s+t_{1}\nonumber \\ & =3s\nonumber \\ s & =\frac{x}{3}\tag{5} \end{align}

Equation (2) gives\begin{align} y & =5s+t_{2}\nonumber \\ t_{2} & =y-5s\nonumber \end{align}

From (5), the above becomes$$t_{2}=y-\frac{5x}{3}\tag{5A}$$ Equation (3) gives\begin{align*} \frac{du}{ds} & =x\\ & =3s \end{align*}

Hence by integrating and using $$u_{s=0}=t_{3}$$ the above becomes\begin{align*} u & =\frac{3s^{2}}{2}+t_{3}\\ & =\frac{3s^{2}}{2}+F\left ( t_{2}\right ) \end{align*}

Substituting (5,5A) into the above gives\begin{align*} u & =\frac{3\left ( \frac{x}{3}\right ) ^{2}}{2}+F\left ( y-\frac{5x}{3}\right ) \\ & =\frac{1}{6}x^{2}+F\left ( y-\frac{5x}{3}\right ) \end{align*}

The traditional way to solve this is as follows. Let $$u\left ( x,y\right ) =u\left ( x,y\left ( x\right ) \right )$$. Then $$\frac{du}{dx}=\frac{\partial u}{\partial x}+\frac{\partial u}{\partial y}\frac{dy}{dx}\tag{1}$$ Comparing to the PDE $$\frac{\partial u}{\partial x}+\frac{5}{3}\frac{\partial u}{\partial y}=\frac{1}{3}x$$, then If $$\frac{dy}{dx}=\frac{5}{3}\tag{2}$$ Then comparing (1) with given PDE shows that $$\frac{du}{dx}=\frac{1}{3}x$$ or \begin{align} u & =\frac{1}{6}x^{2}+C\nonumber \\ & =\frac{1}{6}x^{2}+u\left ( 0,y_{0}\right ) \tag{3} \end{align}

On each characteristic line. The characteristic lines are not constants in this case. Integrating (2) gives\begin{align} y & =\frac{5}{3}x+y_{0}\nonumber \\ y_{0} & =y-\frac{5}{3}x\tag{4} \end{align}

Let $u\left ( 0,y\right ) =F\left ( y\right )$ Then $u\left ( 0,y_{0}\right ) =F\left ( y_{0}\right )$ Substituting $$y_{0}$$ found in (4) into the above gives$u\left ( 0,y_{0}\right ) =F\left ( y-\frac{5}{3}x\right )$ Substituting the above into (3) gives the solution as$u\left ( x,y\right ) =\frac{1}{6}x^{2}+F\left ( y-\frac{5}{3}x\right )$

_______________________________________________________________________________________

#### 4.3 Linear PDE, initial value problem

problem number 3

Taken from Mathematica help pages

Solve for $$u(x,y)$$ $x \frac{ \partial u}{\partial x} + y \frac{ \partial u}{\partial y} = -4 x y u(x,y)$ with initial value $$u(x,0)=e^{-x^2}$$

Mathematica

$\left \{\left \{u(x,y)\to e^{-x^2-y^2}\right \}\right \}$

Maple

$u \left ( x,y \right ) ={{\rm e}^{-{x}^{2}-{y}^{2}}}$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dx}{ds} & =x\tag{1}\\ \frac{dy}{ds} & =y\tag{2}\\ \frac{du}{ds} & =-4xyu\tag{3} \end{align}

With initial conditions$x_{s=0}=t_{1},y_{s=0}=t_{2},u_{s=0}=t_{3}$ And $$u\left ( x,0\right ) =e^{-x^{2}}$$ becomes $$t_{3}=e^{-t_{1}^{2}},t_{2}=0\tag{4}$$ Equation (1) gives\begin{align} \ln x & =s+t_{1}\nonumber \\ x & =t_{1}e^{s}\nonumber \\ t_{1} & =\frac{x}{e^{s}}\tag{5} \end{align}

Equation (2) gives\begin{align} \ln y & =s+t_{2}\nonumber \\ \ln y & =s\tag{5A} \end{align}

Substituting the above in (5) gives$$t_{1}=\frac{x}{e^{\ln y}}=\frac{x}{y}\tag{5B}$$ Equation (3) gives\begin{align*} \frac{du}{u} & =-4xyds\\ & =-4\left ( t_{1}e^{s}\right ) \left ( e^{s}\right ) ds \end{align*}

Hence by integrating and using $$u_{s=0}=t_{3}$$ the above becomes\begin{align*} \ln u & =-\frac{4t_{1}e^{2s}}{2}+t_{3}\\ u & =t_{3}e^{-2t_{1}e^{2s}}\\ & =e^{-t_{1}^{2}}e^{-2t_{1}e^{2s}} \end{align*}

Substituting (5A,5B) into the above gives\begin{align*} u & =e^{-\left ( \frac{x}{y}\right ) ^{2}}e^{-2\left ( \frac{x}{y}\right ) e^{2\ln y}}\\ & =e^{-\left ( \frac{x}{y}\right ) ^{2}}e^{-2\left ( \frac{x}{y}\right ) y^{2}}\\ & =e^{-\left ( \frac{x}{y}\right ) ^{2}}e^{-2\left ( xy\right ) }\\ & =e^{-\frac{x^{2}}{y^{2}}-2xy} \end{align*}

To verify this solution, the LHS of the PDE is \begin{align*} xu_{x}+yu_{y} & =x\left ( -2\frac{x}{y^{2}}-2y\right ) \left ( e^{-\frac{x^{2}}{y^{2}}-2xy}\right ) +y\left ( -\frac{x^{2}}{y^{3}}-2x\right ) \left ( e^{-\frac{x^{2}}{y^{2}}-2xy}\right ) \\ & =x\left ( -2\frac{x}{y^{2}}-2y\right ) u+y\left ( 2\frac{x^{2}}{y^{3}}-2x\right ) u\\ & =u\left ( x\left ( -2\frac{x}{y^{2}}-2y\right ) +y\left ( 2\frac{x^{2}}{y^{3}}-2x\right ) \right ) \\ & =u\left ( -2\frac{x^{2}}{y^{2}}-2xy+2\frac{x^{2}}{y^{2}}-2yx\right ) \\ & =-4xyu \end{align*}

Which is the RHS of the PDE.

_______________________________________________________________________________________

#### 4.4 Initial-boundary value problem

problem number 4

Taken from Mathematica help pages

Solve for $$u(x,t)$$ $\frac{ \partial u}{\partial t} + \frac{ \partial u}{\partial x} = 0$ with initial value $$u(x,0)=\sin x$$ and boundary value $$u(0,t)=0$$

Mathematica

$\{\{u(x,t)\to (\theta (t-x)-1) \sin (t-x)\}\}$

Maple

$u \left ( x,t \right ) =-\sin \left ( -x+t \right ){\it Heaviside} \left ( -t+x \right )$

Hand solution

Since initial and boundary conditions are given, the Laplace transform method will be used to solve this PDE. Let $$U\left ( x,s\right )$$ be the Laplace transform of $$u\left ( x,t\right )$$. Applying Laplace transform to the PDE gives\begin{align*} sU-u\left ( x,0\right ) +\frac{dU}{dx} & =0\\ \frac{dU}{dx}+sU & =\sin x \end{align*}

Integrating factor is $$\mu =e^{\int sdx}=e^{sx}$$. Multiplying the above by $$\mu$$ gives$\frac{d}{dx}\left ( Ue^{sx}\right ) =e^{sx}\sin x$ Integrating \begin{align*} Ue^{sx} & =\int e^{sx}\sin xdx+C\\ & =\frac{e^{sx}\left ( s\sin x-\cos x\right ) }{1+s^{2}}+C\\ U\left ( x,s\right ) & =\frac{s\sin x-\cos x}{1+s^{2}}+Ce^{-sx} \end{align*}

Applying boundary conditions $$U\left ( 0,s\right ) =0$$ gives\begin{align*} 0 & =\frac{-1}{1+s^{2}}+C\\ C & =\frac{1}{1+s^{2}} \end{align*}

Hence \begin{align*} U\left ( x,s\right ) & =\frac{s\sin x-\cos x}{1+s^{2}}+\frac{e^{-sx}}{1+s^{2}}\\ & =\frac{s\sin x}{1+s^{2}}-\frac{\cos x}{1+s^{2}}+\frac{e^{-sx}}{1+s^{2}} \end{align*}

Applying inverse Laplace transform gives\begin{align*} u\left ( x,t\right ) & =\cos t\sin x-\cos x\sin t+\operatorname{Heaviside}\left ( t-x\right ) \sin \left ( t-x\right ) \\ & =-\sin \left ( t-x\right ) +\operatorname{Heaviside}\left ( t-x\right ) \sin \left ( t-x\right ) \\ & =\left ( \operatorname{Heaviside}\left ( t-x\right ) -1\right ) \sin \left ( t-x\right ) \end{align*}

_______________________________________________________________________________________

#### 4.5 Linear PDE, the transport equation with initial conditions

problem number 5

Taken from Mathematica help pages

Solve for $$u(x,t)$$ $\frac{ \partial u}{\partial t} + c \frac{ \partial u}{\partial x} = 0$ With initial conditions $$u(x,0)=e^{-x^2}$$

Mathematica

$\left \{\left \{u(x,t)\to e^{-(x-c t)^2}\right \}\right \}$

Maple

$u \left ( x,t \right ) ={{\rm e}^{- \left ( tc-x \right ) ^{2}}}$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dt}{ds} & =1\tag{1}\\ \frac{dx}{ds} & =1\tag{2}\\ \frac{du}{ds} & =0\tag{3} \end{align}

With initial conditions$t_{s=0}=t_{1},x_{s=0}=t_{2},u_{s=0}=t_{3}$ And $$u\left ( x,0\right ) =e^{-x^{2}}$$ becomes $$t_{3}=e^{-t_{2}^{2}},t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} t & =s+t_{1}\nonumber \\ & =s\tag{5} \end{align}

Equation (2) gives$$x=s+t_{2}\tag{6}$$ From (5,6) solving for $$t_{2}$$ gives\begin{align} t_{2} & =x-s\nonumber \\ & =x-t\tag{7} \end{align}

Equation (3) gives\begin{align*} u & =t_{3}\\ & =e^{-t_{2}^{2}} \end{align*}

Using (7) in the above gives the solution$u\left ( x,t\right ) =e^{-\left ( x-t\right ) ^{2}}$

_______________________________________________________________________________________

#### 4.6 First order wave PDE, with initial conditions (Haberman 12.2.2)

problem number 6

Problem 12.2.2 from Richard Haberman applied partial diﬀerential equations book, 5th edition

Solve for $$u(x,t)$$ $\frac{ \partial \omega }{\partial t} -3 \frac{ \partial \omega }{\partial x} = 0$ With initial conditions $$\omega (x,0)=\cos x$$.

See my HW 12, Math 322, UW Madison.

Mathematica

$\{\{w(x,t)\to \cos (3 t+x)\}\}$

Maple

$w \left ( x,t \right ) =\cos \left ( x+3\,t \right )$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dt}{ds} & =1\tag{1}\\ \frac{dx}{ds} & =-3\tag{2}\\ \frac{du}{ds} & =0\tag{3} \end{align}

With initial conditions$t_{s=0}=t_{1},x_{s=0}=t_{2},u_{s=0}=t_{3}$ And $$u\left ( x,0\right ) =\cos x$$ becomes $$t_{3}=\cos \left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} t & =s+t_{1}\nonumber \\ & =s\tag{5} \end{align}

Equation (2) gives$$x=-3s+t_{2}\tag{6}$$ From (5,6) solving for $$t_{2}$$ gives\begin{align} t_{2} & =x+3s\nonumber \\ & =x+3t\tag{7} \end{align}

Equation (3) gives\begin{align*} u & =t_{3}\\ & =\cos \left ( t_{2}\right ) \end{align*}

Using (7) in the above gives the solution$u\left ( x,t\right ) =\cos \left ( x+3t\right )$

_______________________________________________________________________________________

#### 4.7 First order wave PDE, with initial and boundary conditions (Haberman 12.2.4)

problem number 7

Problem 12.2.4 from Richard Haberman applied partial diﬀerential equations book, 5th edition

Solve for $$u(x,t)$$ $\frac{ \partial \omega }{\partial t} +c \frac{ \partial \omega }{\partial x} = 0$ With $$c>0$$. For $$x>0,t>0$$ if $$\omega (x,0)=f(x)$$ and $$\omega (0,t)=h(t)$$.

See my HW 12, Math 322, UW Madison.

Mathematica

$\text{DSolve}\left [\left \{c w^{(1,0)}(x,t)+w^{(0,1)}(x,t)=0,w(x,0)=f(x),w(0,t)=h(t)\right \},w(x,t),\{x,t\},\text{Assumptions}\to c>0\land x>0\land t>0\right ]$

Maple

$w \left ( x,t \right ) ={\frac{1}{c} \left ({\it Heaviside} \left ({\frac{tc-x}{c}} \right ) h \left ({\frac{tc-x}{c}} \right ) c+{\it invlaplace} \left ({{\rm e}^{-{\frac{sx}{c}}}}\int \!f \left ( x \right ){{\rm e}^{{\frac{sx}{c}}}}\,{\rm d}x,s,t \right ) -{\it invlaplace} \left ({{\rm e}^{-{\frac{sx}{c}}}}\int ^{0}\!f \left ({\it \_a} \right ){{\rm e}^{{\frac{s{\it \_a}}{c}}}}{d{\it \_a}},s,t \right ) \right ) }$ Solution contains unresolved invlaplace calls

Hand solution

$$\frac{\partial w}{\partial t}+c\frac{\partial w}{\partial x}=0\tag{1}$$ Let $w\equiv w\left ( x\left ( t\right ) ,t\right )$ Hence $$\frac{dw}{dt}=\frac{\partial w}{\partial t}+\frac{\partial w}{\partial x}\frac{dx}{dt}\tag{2}$$ Comparing given (1) and (2), we see that if we let $$\frac{dx}{dt}=c$$ in (2), then we obtain (1). Hence we conclude that $$\frac{dw}{dt}=0$$. Therefore, $$w\left ( x\left ( t\right ) ,t\right )$$ is constant. At $$t=0$$, we are given that $$w\left ( x\left ( t\right ) ,t\right ) =f\left ( x\left ( 0\right ) \right ) \qquad t=0\tag{3}$$ We just now need to determine $$x\left ( 0\right )$$. This is found from $$\frac{dx}{dt}=c$$, which has the solution $$x\left ( t\right ) =x\left ( 0\right ) +ct\,.$$ Hence $$x\left ( 0\right ) =x\left ( t\right ) -ct$$. Therefore (3) becomes$w\left ( x,t\right ) =f\left ( x-ct\right )$ This is valid for $$x>ct.$$ We now start all over again, and look at Let $w\equiv w\left ( x,t\left ( x\right ) \right )$ Hence $$\frac{dw}{dx}=\frac{\partial w}{\partial x}+\frac{\partial w}{\partial t}\frac{dt}{dx}\tag{4}$$ Comparing (4) and (1), we see that if we let $$\frac{dt}{dx}=\frac{1}{c}$$ in (4), then we obtain (1). Hence we conclude that $$\frac{dw}{dx}=0$$. Therefore, $$w\left ( x,t\left ( x\right ) \right )$$ is constant. At $$x=0$$, we are given that $$w\left ( x,t\left ( x\right ) \right ) =h\left ( t\left ( 0\right ) \right ) \qquad x=0\tag{5}$$ We just now need to determine $$t\left ( 0\right )$$. This is found from $$\frac{dt}{dx}=\frac{1}{c}$$, which has the solution $$t\left ( x\right ) =t\left ( 0\right ) +\frac{1}{c}x\,.$$ Hence $$t\left ( 0\right ) =t\left ( x\right ) -\frac{1}{c}x$$. Therefore (5) becomes$w\left ( x,t\right ) =h\left ( t-\frac{1}{c}x\right )$ Valid for $$t>\frac{x}{c}$$ or $$x<ct$$. Therefore, the solution is$w\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}f\left ( x-ct\right ) & & x>ct\\ h\left ( t-\frac{1}{c}x\right ) & & x<ct \end{array} \right .$

_______________________________________________________________________________________

#### 4.8 First order wave PDE, with initial conditions, non homogeneous (Haberman 12.2.5 (a))

problem number 8

Problem 12.2.5 (a) from Richard Haberman applied partial diﬀerential equations book, 5th edition

Solve for $$u(x,t)$$ $\frac{ \partial \omega }{\partial t} +c \frac{ \partial \omega }{\partial x} = e^{2 x}$

With $$\omega (x,0)=f(x)$$.

See my HW 12, Math 322, UW Madison.

Mathematica

$\left \{\left \{w(x,t)\to f(x-c t)+\frac{e^{2 x} \left (1-e^{-2 c t}\right )}{2 c}\right \}\right \}$

Maple

$w \left ( x,t \right ) =1/2\,{\frac{2\,f \left ( -tc+x \right ) c-{{\rm e}^{-2\,tc+2\,x}}+{{\rm e}^{2\,x}}}{c}}$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dt}{ds} & =1\tag{1}\\ \frac{dx}{ds} & =c\tag{2}\\ \frac{du}{ds} & =e^{2x}\tag{3} \end{align}

With initial conditions$t_{s=0}=t_{1},x_{s=0}=t_{2},u_{s=0}=t_{3}$ And $$u\left ( x,0\right ) =f\left ( x\right )$$ becomes $$t_{3}=f\left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} t & =s+t_{1}\nonumber \\ & =s\tag{5} \end{align}

Equation (2) gives$$x=cs+t_{2}\tag{6}$$ From (5,6) solving for $$t_{2}$$ gives\begin{align} t_{2} & =x-cs\nonumber \\ & =x-ct\tag{7} \end{align}

Equation (3) gives\begin{align*} du & =e^{2x}ds\\ & =e^{2\left ( cs+t_{2}\right ) }ds \end{align*}

Integrating $u=\frac{e^{2\left ( cs+t_{2}\right ) }}{2c}+t_{3}$ Using (7,4,5) in the above gives the solution\begin{align*} u\left ( x,t\right ) & =\frac{e^{2\left ( ct+\left ( x-ct\right ) \right ) }}{2c}+f\left ( x-ct\right ) \\ & =\frac{1}{2c}e^{2x}+f\left ( x-ct\right ) \end{align*}

My solution is not the same as CAS, but it was veriﬁed OK using Maple pdetest.

_______________________________________________________________________________________

#### 4.9 First order wave PDE, with initial conditions, non homogeneous (Haberman 12.2.5 (d))

problem number 9

Problem 12.2.5 (d) from Richard Haberman applied partial diﬀerential equations book, 5th edition

Solve for $$u(x,t)$$ $\frac{ \partial \omega }{\partial t} +3 t \frac{ \partial \omega }{\partial x} = \omega (x,t)$

with $$\omega (x,0)=f(x)$$.

See my HW 12, Math 322, UW Madison.

Mathematica

$\left \{\left \{w(x,t)\to e^{-\sqrt{t^2}} f\left (x-\frac{3 t^2}{2}\right )\right \},\left \{w(x,t)\to e^{\sqrt{t^2}} f\left (x-\frac{3 t^2}{2}\right )\right \}\right \}$

Maple

$w \left ( x,t \right ) =f \left ( -3/2\,{t}^{2}+x \right ){{\rm e}^{t}}$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dt}{ds} & =1\tag{1}\\ \frac{dx}{ds} & =3t\tag{2}\\ \frac{dw}{ds} & =w\tag{3} \end{align}

With initial conditions$t_{s=0}=t_{1},x_{s=0}=t_{2},w_{s=0}=t_{3}$ And $$w\left ( x,0\right ) =f\left ( x\right )$$ becomes $$t_{3}=f\left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} t & =s+t_{1}\nonumber \\ & =s\tag{5} \end{align}

Equation (2) gives, after replacing $$t$$ by $$s$$ from (5)\begin{align} \frac{dx}{ds} & =3s\nonumber \\ x & =\frac{3}{2}s^{2}+t_{2}\tag{6} \end{align}

Solving for $$t_{2}$$ gives$$t_{2}=x-\frac{3}{2}s^{2}\tag{7}$$ Equation (3) gives\begin{align*} \ln w & =s+t_{3}\\ w & =t_{3}e^{s}\\ & =f\left ( t_{2}\right ) e^{s} \end{align*}

Using (7,5) in the above gives the solution$w\left ( x,t\right ) =f\left ( x-\frac{3}{2}t^{2}\right ) e^{t}$

_______________________________________________________________________________________

#### 4.10 General solution for a quasilinear ﬁrst-order PDE

problem number 10

Taken from Mathematica help pages

Solve for $$u(x,y)$$ $2 \frac{ \partial u}{\partial x} + 5 \frac{ \partial u}{\partial y} = u^2(x,y) + 1$

Mathematica

$\left \{\left \{u(x,y)\to \tan \left (c_1\left (y-\frac{5 x}{2}\right )+\frac{x}{2}\right )\right \}\right \}$

Maple

$u \left ( x,y \right ) =\tan \left ( x/2+1/2\,{\it \_F1} \left ( -5/2\,x+y \right ) \right )$

Hand solution

Using the method of characteristics, the systems of characteristic lines are (from the PDE itself)\begin{align} \frac{dx}{ds} & =2\tag{1}\\ \frac{dy}{ds} & =5\tag{2}\\ \frac{du}{ds} & =u^{2}+1\tag{3} \end{align}

With initial conditions$x_{s=0}=t_{1},y_{s=0}=t_{2},u_{s=0}=t_{3}$ Let $$u\left ( 0,y\right ) =F\left ( y\right )$$, where $$F$$ is arbitray function. (we could also assume that $$u\left ( x,0\right ) =F\left ( x\right )$$, and both solutions should be valid), but CAS selected the ﬁrst choice based on ﬁnal result). Therefore$$t_{3}=F\left ( t_{2}\right ) ,t_{1}=0\tag{4}$$ Equation (1) gives\begin{align} x & =2s+t_{1}\nonumber \\ & =2s\tag{5} \end{align}

Equation (2) gives$$y=5s+t_{2}\tag{6}$$ Solving for $$t_{2}$$ from (6,5) gives\begin{align} t_{2} & =y-5s\nonumber \\ & =y-\frac{5}{2}s\tag{7} \end{align}

Equation (3) gives\begin{align*} \frac{du}{1+u^{2}} & =ds\\ \arctan \left ( u\right ) & =s+t_{3}\\ u & =\tan \left ( s+t_{3}\right ) \end{align*}

Using (4,5,7) in the above gives the solution$u\left ( x,t\right ) =\tan \left ( \frac{x}{2}+F\left ( y-\frac{5}{4}x\right ) \right )$

_______________________________________________________________________________________

#### 4.11 quasilinear ﬁrst-order PDE, scalar conservation law

problem number 11

Taken from Mathematica Symbolic PDE document

Solve for $$u(x,y)$$ $\frac{ \partial u}{\partial x} + u(x,y) \frac{ \partial u}{\partial y} = 0$

Mathematica

$\text{Solve}\left [u(x,y)=c_1\left (x-\frac{y}{u(x,y)}\right ),u(x,y)\right ]$ Implicit solution

Maple

$-y+xu \left ( x,y \right ) +{\it \_F1} \left ( u \left ( x,y \right ) \right ) =0$

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$x_{s=0}=t_{1},y_{s=0}=t_{2},u_{s=0}=t_{3}$ Let $$u\left ( x,0\right ) =F\left ( x\right )$$, where $$F$$ is arbitray function. Therefore$$t_{3}=F\left ( t_{1}\right ) ,t_{2}=0\tag{4}$$ Equation (1) gives$$x=s+t_{1}\tag{5}$$ 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}\\ & =F\left ( t_{1}\right ) \\ & =F\left ( x-s\right ) \\ & =F\left ( x-\frac{y}{u}\right ) \end{align*}

I do not know now how Maple obtained the solution it  shows.

_______________________________________________________________________________________

#### 4.12 quasilinear ﬁrst-order PDE, scalar conservation law with initial value

problem number 12

Taken from Mathematica Symbolic PDE document

Solve for $$u(x,y)$$ $u_x+ u(x,y) u_y = 0$ With $$u(x,0)=\frac{1}{x+1}$$

Mathematica

$\left \{\left \{u(x,y)\to \frac{y+1}{x+1}\right \}\right \}$

Maple

$u \left ( x,y \right ) ={\frac{y+1}{x+1}}$

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$x_{s=0}=t_{1},y_{s=0}=t_{2},u_{s=0}=t_{3}$ We are given that $$u\left ( x,0\right ) =\frac{1}{1+x}$$. This initial condition translates to$$t_{3}=\frac{1}{1+t_{1}},t_{2}=0\tag{4}$$ Equation (1) gives$$x=s+t_{1}\tag{5}$$ 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*}

_______________________________________________________________________________________

#### 4.13 nonlinear ﬁrst-order PDE, the Clairaut equation

problem number 13

Taken from Mathematica Symbolic PDE document

Solve for $$u(x,y)$$ $x \frac{ \partial u}{\partial x} + y \frac{ \partial u}{\partial y} + \frac{1}{2} \left ( \left ( \frac{ \partial u}{\partial x} \right )^2 + \left ( \frac{ \partial u}{\partial y} \right )^2 \right )=0$

Mathematica

$\left \{\left \{u(x,y)\to c_1 x+c_2 y+\frac{1}{2} \left (c_1^2+c_2^2\right )\right \}\right \}$

Maple

$u \left ( x,y \right ) =-1/2\,{x}^{2}-1/2\,x\sqrt{{x}^{2}+2\,{\it \_c}_{{1}}}-{\it \_c}_{{1}}\ln \left ( x+\sqrt{{x}^{2}+2\,{\it \_c}_{{1}}} \right ) +{\it \_C1}-1/2\,{y}^{2}-1/2\,y\sqrt{{y}^{2}-2\,{\it \_c}_{{1}}}+{\it \_c}_{{1}}\ln \left ( y+\sqrt{{y}^{2}-2\,{\it \_c}_{{1}}} \right ) +{\it \_C2}$

Hand solution

Assuming the solution is $$u\left ( x,y\right ) =X\left ( x\right ) +Y\left ( y\right )$$. Substituting this into the PDE gives\begin{align*} xX^{\prime }+yY^{\prime }+\frac{1}{2}\left ( \left ( X^{\prime }\right ) ^{2}+\left ( Y^{\prime }\right ) ^{2}\right ) & =0\\ \frac{1}{2}\left ( X^{\prime }\right ) ^{2}+xX^{\prime } & =-\frac{1}{2}\left ( Y^{\prime }\right ) ^{2}-yY^{\prime } \end{align*}

The above is possible when each side is equal to same constant, say $$C_{1}$$. This gives two ODE’s\begin{align} \frac{1}{2}\left ( X^{\prime }\right ) ^{2}+xX^{\prime } & =C_{1}\tag{1}\\ \frac{1}{2}\left ( Y^{\prime }\right ) ^{2}+yY^{\prime } & =-C_{1}\tag{2} \end{align}

ODE (1) becomes\begin{align*} \left ( X^{\prime }\right ) ^{2}+2xX^{\prime }-2C_{1} & =0\\ X^{\prime } & =\frac{-b}{2a}\pm \frac{1}{2a}\sqrt{b^{2}-4ac}\\ & =\frac{-2x}{2}\pm \frac{1}{2}\sqrt{4x^{2}+8C_{1}}\\ & =-x\pm \sqrt{x^{2}+2C_{1}} \end{align*}

For the case $$X^{\prime }=-x+\sqrt{x^{2}+2C_{1}}$$, the solution is \begin{align*} X\left ( x\right ) & =\int -x+\sqrt{x^{2}+2C_{1}}dx+C_{2}\\ & =-\frac{x^{2}}{2}+\frac{x\sqrt{x^{2}+2C_{1}}}{2}+C_{1}\ln \left ( x+\sqrt{x^{2}+2C_{1}}\right ) +C_{2} \end{align*}

For the case $$X^{\prime }=-x-\sqrt{x^{2}+2C_{1}}$$, the solution is\begin{align*} X\left ( x\right ) & =\int -x-\sqrt{x^{2}+2C_{1}}dx+C_{2}\\ & =-\frac{x^{2}}{2}-\frac{x\sqrt{x^{2}+2C_{1}}}{2}-C_{1}\ln \left ( x+\sqrt{x^{2}+2C_{1}}\right ) +C_{2} \end{align*}

Combining the above two solutions to one gives$$X\left ( x\right ) =-\frac{x^{2}}{2}\pm \frac{x\sqrt{x^{2}+2C_{1}}}{2}\pm C_{1}\ln \left ( x+\sqrt{x^{2}+2C_{1}}\right ) +C_{2}\tag{3}$$ ODE (2) becomes\begin{align*} \left ( Y^{\prime }\right ) ^{2}+2yY^{\prime }+2C_{1} & =0\\ Y^{\prime } & =\frac{-b}{2a}\pm \frac{1}{2a}\sqrt{b^{2}-4ac}\\ & =\frac{-2y}{2}\pm \frac{1}{2}\sqrt{4y^{2}-8C_{1}}\\ & =-y\pm \sqrt{y^{2}-2C_{1}} \end{align*}

For the case $$Y^{\prime }=-y+\sqrt{x^{2}-2C_{1}}$$, the solution is \begin{align*} Y\left ( y\right ) & =\int -y+\sqrt{y^{2}-2C_{1}}dy+C_{2}\\ & =\frac{-y^{2}}{2}+\frac{y\sqrt{y^{2}-2C_{1}}}{2}-C_{1}\ln \left ( y+\sqrt{y^{2}-2C_{1}}\right ) +C_{3} \end{align*}

For the case $$Y^{\prime }=-y-\sqrt{y^{2}-2C_{1}}$$, the solution is\begin{align*} Y\left ( y\right ) & =\int -y-\sqrt{y^{2}+2C_{1}}dy+C_{2}\\ & =-\frac{y^{2}}{2}-\frac{y\sqrt{x^{2}-2C_{1}}}{2}+C_{1}\ln \left ( y+\sqrt{y^{2}-2C_{1}}\right ) +C_{3} \end{align*}

Combining the above two solutions to one gives$$Y\left ( x\right ) =-\frac{y^{2}}{2}\pm \frac{y\sqrt{y^{2}-2C_{1}}}{2}\pm C_{1}\ln \left ( y+\sqrt{y^{2}-2C_{1}}\right ) +C_{3}\tag{4}$$ From (3,4) the ﬁnal solution is\begin{align*} u\left ( x,y\right ) & =X\left ( x\right ) +Y\left ( x\right ) \\ & =\left ( -\frac{x^{2}}{2}\pm \frac{x\sqrt{x^{2}+2C_{1}}}{2}\pm C_{1}\ln \left ( x+\sqrt{x^{2}+2C_{1}}\right ) +C_{2}\right ) +\left ( -\frac{y^{2}}{2}\pm \frac{y\sqrt{y^{2}-2C_{1}}}{2}\pm C_{1}\ln \left ( y+\sqrt{y^{2}-2C_{1}}\right ) +C_{3}\right ) \\ & =-\frac{x^{2}}{2}\pm \frac{x}{2}\sqrt{x^{2}+2C_{1}}\pm C_{1}\ln \left ( x+\sqrt{x^{2}+2C_{1}}\right ) -\frac{y^{2}}{2}\pm \frac{y}{2}\sqrt{y^{2}-2C_{1}}\pm C_{1}\ln \left ( y+\sqrt{y^{2}-2C_{1}}\right ) +C_{4} \end{align*}

Where $$C_{4}=C_{2}+C_{3}$$.

_______________________________________________________________________________________

#### 4.14 nonlinear ﬁrst-order PDE, the Clairaut equation with initial value

problem number 14

Taken from Mathematica Symbolic PDE document

Solve for $$u(x,y)$$ $x \frac{ \partial u}{\partial x} + y \frac{ \partial u}{\partial y} + \frac{1}{2} \left ( \left ( \frac{ \partial u}{\partial x} \right )^2 + \left ( \frac{ \partial u}{\partial y} \right )^2 \right ) = 0$ With $$u(x,0)= \frac{1}{2} (1-x^2)$$

Mathematica

$\left \{\left \{u(x,y)\to \frac{1}{2} \left (-x^2-2 y+1\right )\right \}\right \}$

Maple

$u \left ( x,y \right ) =-1/2\, \left ( x-y+1 \right ) \left ( x-y-1 \right )$

_______________________________________________________________________________________

#### 4.15 Another example of nonlinear Clairaut equation

problem number 15

Taken from Mathematica DSolve help pages

Solve for $$u(x,y)$$ $u(x,y)= x \frac{ \partial u}{\partial x} + y \frac{ \partial u}{\partial y} + \sin \left ( \frac{ \partial u}{\partial x} + \frac{\partial u}{\partial y} \right )$

Mathematica

$\left \{\left \{u(x,y)\to c_1 x+c_2 y+\sin \left (c_1+c_2\right )\right \}\right \}$

Maple

$u \left ( x,y \right ) =x{\it \_c}_{{1}}+y{\it \_c}_{{2}}+\sin \left ({\it \_c}_{{1}}+{\it \_c}_{{2}} \right )$

_______________________________________________________________________________________

#### 4.16 Recover a function from its gradient vector

problem number 16

Taken from Mathematica DSolve help pages

Solve for $$f(x,y)$$ \begin{align*} \frac{ \partial f}{\partial x} &= x y \cos (x y)+ \sin (x y) \\ \frac{ \partial f}{\partial y} &= -e^{-y} +x^2 \cos (x y) \end{align*}

Mathematica

$\left \{\left \{f(x,y)\to c_1+x \sin (x y)+e^{-y}\right \}\right \}$

Maple

$\left \{ f \left ( x,y \right ) =x\sin \left ( yx \right ) +{{\rm e}^{-y}}+{\it \_C1} \right \}$

_______________________________________________________________________________________

#### 4.17 General solution of a ﬁrst order nonlinear PDE

problem number 17

Taken from Maple pdsolve help pages

Solve for $$f(x,y)$$ \begin{align*} x \frac{ \partial f}{\partial y}- \frac{ \partial f}{\partial x} &= \frac{ f^2(x,y) g(x)}{h(y)} \end{align*}

Mathematica

$\text{DSolve}\left [x f^{(0,1)}(x,y)-f^{(1,0)}(x,y)=\frac{g(x) f(x,y)^2}{h(y)},f(x,y),\{x,y\}\right ]$

Maple

$f \left ( x,y \right ) = \left ( \int ^{x}\!{\frac{g \left ({\it \_a} \right ) }{h \left ( -1/2\,{{\it \_a}}^{2}+1/2\,{x}^{2}+y \right ) }}{d{\it \_a}}+{\it \_F1} \left ( 1/2\,{x}^{2}+y \right ) \right ) ^{-1}$ Has unresolved integral in the answer

_______________________________________________________________________________________

#### 4.18 Nonlinear ﬁrst order PDE

problem number 18

Taken from Maple pdsolve help pages, probem 5

Solve for $$f(x,y,z)$$ \begin{align*} f_x + (f_y)^2 &= f(x,y,z)+z \end{align*}

Mathematica

$\left \{\left \{f(x,y,z)\to \frac{1}{4} \left (c_1(z){}^2 \text{ProductLog}\left (-\frac{e^{\frac{y}{c_1(z)}+\frac{c_2(z)}{c_1(z)}+x-1}}{c_1(z)}\right ){}^2+2 c_1(z){}^2 \text{ProductLog}\left (-\frac{e^{\frac{y}{c_1(z)}+\frac{c_2(z)}{c_1(z)}+x-1}}{c_1(z)}\right )-4 z\right )\right \}\right \}$

Maple

$f \left ( x,y,z \right ) =-{\frac{{{\rm e}^{-x}}z{{\it \_C5}}^{2}+{{\rm e}^{x}}{{\it \_C3}}^{2}+{\it \_C3}\,y{\it \_C5}+z{\it \_C4}\,{\it \_C5}+{\it \_C1}\,{\it \_C5}}{{{\it \_C5}}^{2}{{\rm e}^{-x}}}}$

_______________________________________________________________________________________

#### 4.19 ﬁrst order PDE of three unknowns

problem number 19

From example 3.5.4, page 212 nonlinear pde’s by Lokenath Debnath, 3rd edition.

Solve for $$u(x,y,z)$$ \begin{align*} (y-z) u_x + (z-x) u_y + (x-y) u_z = 0 \end{align*}

Mathematica

$\text{Timed out}$ Timed out

Maple

$u \left ( x,y,z \right ) ={{\rm e}^{1/2\,{\it \_C2}\,{x}^{2}}}{{\rm e}^{{\it \_C1}\,x}}{{\rm e}^{1/2\,{\it \_C2}\,{y}^{2}}}{{\rm e}^{{\it \_C1}\,y}}{\it \_C3}\,{\it \_C5}\,{\it \_C4}\,{{\rm e}^{1/2\,{\it \_C2}\,{z}^{2}}}{{\rm e}^{{\it \_C1}\,z}}$