4 General first order PDE’s

4.1 Linear PDE, the transport equation
4.2 Linear PDE
4.3 Linear PDE, initial value problem
4.4 Initial-boundary value problem
4.5 Linear PDE, the transport equation with initial conditions
4.6 First order wave PDE, with initial conditions (Haberman 12.2.2)
4.7 First order wave PDE, with initial and boundary conditions (Haberman 12.2.4)
4.8 First order wave PDE, with initial conditions, non homogeneous (Haberman 12.2.5 (a))
4.9 First order wave PDE, with initial conditions, non homogeneous (Haberman 12.2.5 (d))
4.10 General solution for a quasilinear first-order PDE
4.11 quasilinear first-order PDE, scalar conservation law
4.12 quasilinear first-order PDE, scalar conservation law with initial value
4.13 nonlinear first-order PDE, the Clairaut equation
4.14 nonlinear first-order PDE, the Clairaut equation with initial value
4.15 Another example of nonlinear Clairaut equation
4.16 Recover a function from its gradient vector
4.17 General solution of a first order nonlinear PDE
4.18 Nonlinear first order PDE
4.19 first order PDE of three unknowns

____________________________________________________________________________________

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

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

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';t:='t'; 
pde := diff(u(x, t), t) + diff(u(x, t),x) =0; 
 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,t))),output='realtime'));
 

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

Hand solution

\begin {equation} u_{t}+u_{x}=0\tag {1} \end {equation}

Let \(u\equiv u\left ( x\left ( t\right ) ,t\right ) \). Then \begin {equation} \frac {du}{dt}=\frac {\partial u}{\partial x}\frac {dx}{dt}+\frac {\partial u}{\partial t}\tag {2} \end {equation}

Comparing (1) to (2) then we see that

\begin {align} \frac {du}{dt} & =0\tag {3}\\ \frac {dx}{dt} & =1\tag {4} \end {align}

(3) says that \(u\) is constant. Since no initial conditions are given, let \(u=F\left ( x\left ( 0\right ) \right ) \) where \(F\) is arbitrary function. To find \(x\left ( 0\right ) \) we solve (4). The solution to (4) is \(x=x\left ( 0\right ) +t\). Hence \(x\left ( 0\right ) =x-t\).  Therefore

\[ 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

ClearAll[u, x, y]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[3*D[u[x, y], x] + 5*D[u[x, y], y] == x, u[x, y], {x, y}], 60*10]];
 

\[ \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

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde:=3*diff(u(x, y), x) + 5*diff(u(x, y), y) = x; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y))),output='realtime'));
 

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

Hand solution

Solve\begin {align} 3u_{x}+5u_{y} & =x\nonumber \\ u_{x}+\frac {5}{3}u_{y} & =\frac {x}{3}\tag {1} \end {align}

Solution

Let \(u=u\left ( y\left ( x\right ) ,x\right ) \). Then \begin {equation} \frac {du}{dx}=\frac {\partial u}{\partial y}\frac {dy}{dx}+\frac {\partial u}{\partial x}\tag {2} \end {equation} Comparing (1),(2) shows that \begin {align} \frac {du}{dx} & =\frac {x}{3}\tag {3}\\ \frac {dy}{dx} & =\frac {5}{3}\tag {4} \end {align}

Solving (3) gives\begin {align*} u & =\frac {x^{2}}{6}+C_{1}\\ C_{1} & =u-\frac {x^{2}}{6} \end {align*}

From (4)\begin {align*} y & =\frac {5}{3}x+C_{2}\\ C_{2} & =y-\frac {5}{3}x \end {align*}

Let \(C_{1}=F\left ( C_{2}\right ) \) where \(F\) is arbutrary function. This gives\begin {align*} u-\frac {x^{2}}{6} & =F\left ( y-\frac {5}{3}x\right ) \\ u\left ( x,y\right ) & =F\left ( y-\frac {5}{3}x\right ) +\frac {x^{2}}{6} \end {align*}

____________________________________________________________________________________

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

ClearAll[u, x, y]; 
 pde = x*D[u[x, y], y] + y*D[u[x, y], x] == -4*x*y*u[x, y]; 
 ic = u[x, 0] == Exp[-x^2]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, y], {x, y}], 60*10]];
 

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde := x*diff(u(x, y), y) + y*diff(u(x, y), x) = -4*x*y*u(x, y); 
ic := u(x, 0) = exp(-x^2); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic], u(x, y))),output='realtime'));
 

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

Hand solution

Solve \[ xu_{y}+yu_{x}=-4xyu \] with \(u\left ( x,0\right ) =e^{-x^{2}}\).

Solution

Let \(u\equiv u\left ( x\left ( y\right ) ,y\right ) \). We’ve taken \(y\) as the independent variable for \(x\left ( y\right ) \) here, since the initial conditions has \(y\left ( 0\right ) \) in it. The PDE can be written as\begin {equation} u_{y}+\frac {y}{x}u_{x}=-4yu\tag {1} \end {equation} Then\begin {equation} \frac {du}{dy}=\frac {\partial u}{\partial x}\frac {dx}{dy}+\frac {\partial u}{\partial y}\tag {2} \end {equation} Comparing (1),(2) shows that \begin {align} \frac {du}{dy} & =-4yu\tag {3}\\ \frac {dx}{dy} & =\frac {y}{x}\tag {4} \end {align}

Solving (3) gives\begin {align} \ln \left \vert u\right \vert & =-\frac {4y^{2}}{2}+C_{1}\nonumber \\ u & =C_{1}e^{-2y^{2}}\tag {5} \end {align}

At \(y=0\), using initial conditions the above becomes\[ e^{-x\left ( 0\right ) ^{2}}=C_{1}\] (5) becomes\begin {align} u & =e^{-x\left ( 0\right ) ^{2}}e^{-2y^{2}}\nonumber \\ & =e^{-x\left ( 0\right ) ^{2}-2y^{2}}\tag {5A} \end {align}

All what is left is to find \(x\left ( 0\right ) \) to finish the solution. From (4)\begin {equation} \frac {x^{2}}{2}=\frac {y^{2}}{2}+C_{2}\tag {6} \end {equation} At \(y=0\)\[ \frac {x\left ( 0\right ) ^{2}}{2}=C_{2}\] Hence (6) becomes\begin {align*} \frac {x^{2}}{2} & =\frac {y^{2}}{2}+\frac {x\left ( 0\right ) ^{2}}{2}\\ x\left ( 0\right ) ^{2} & =x^{2}-y^{2} \end {align*}

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

The following is a plot of the above solution showing the initial conditions are red line

____________________________________________________________________________________

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

ClearAll[u, x, t]; 
 pde = D[u[x, t], t] + D[u[x, t], x] == 0; 
 bc = u[0, t] == 0; 
 ic = u[x, 0] == Sin[x]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}], 60*10]];
 

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

Maple

 
u:='u';x:='x';t:='t'; 
pde:=diff(u(x,t),t)+diff(u(x,t),x)=0; 
bc:=u(0,t)=0; 
ic:=u(x,0)=sin(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t)) assuming x>0),output='realtime'));
 

\[ 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

ClearAll[u, x, t, c]; 
 ic = u[x, 0] == Exp[-x^2]; 
 pde = D[u[x, t], {t}] + c*D[u[x, t], {x}] == 0; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, t], {x, t}], 60*10]];
 

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';t:='t';c:='c'; 
pde := diff(u(x, t), t) + c* diff(u(x, t),x) =0; 
ic:=u(x,0)=exp(-x^2); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,t))),output='realtime'));
 

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

Hand solution

Solve \begin {equation} u_{t}+cu_{x}=0\tag {1} \end {equation} with initial conditions \(u\left ( x,0\right ) =e^{-x^{2}}\).

Solution

Let \(u=u\left ( x\left ( t\right ) ,t\right ) \). Then \begin {equation} \frac {du}{dt}=\frac {\partial u}{\partial x}\frac {dx}{dt}+\frac {\partial u}{\partial t}\tag {2} \end {equation} Comparing (1),(2) shows that \begin {align} \frac {du}{dt} & =0\tag {3}\\ \frac {dx}{dt} & =c\tag {4} \end {align}

Solving (3) gives\begin {align} u & =u\left ( x\left ( 0\right ) \right ) \nonumber \\ & =e^{-x\left ( 0\right ) ^{2}}\tag {5} \end {align}

We need to find \(x\left ( 0\right ) \). From (4)\begin {align*} x & =ct+x\left ( 0\right ) \\ x\left ( 0\right ) & =x-ct \end {align*}

Then (5) becomes\[ u\left ( x\left ( t\right ) ,t\right ) =e^{-\left ( x-ct\right ) ^{2}}\]

____________________________________________________________________________________

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

problem number 6

Added Nov 25, 2018.

Problem 12.2.2 from Richard Haberman applied partial differential 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

ClearAll[x, t, w]; 
 pde = D[w[x, t], t] - 3*D[w[x, t], x] == 0; 
 ic = w[x, 0] == Cos[x]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, w[x, t], {x, t}], 60*10]];
 

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

Maple

 
x:='x'; t:='t'; w:='w'; 
pde:=diff(w(x,t),t)-3*diff(w(x,t),x)=0; 
ic:=w(x,0)=cos(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],w(x,t))),output='realtime'));
 

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

Hand solution

Solve \begin {equation} w_{t}-3w_{x}=0\tag {1} \end {equation} With I.C. \(w\left ( x,0\right ) =\cos x\)

Solution

Let \(w=w\left ( x\left ( t\right ) ,t\right ) \). Then \begin {equation} \frac {dw}{dt}=\frac {\partial w}{\partial x}\frac {dx}{dt}+\frac {\partial w}{\partial t}\tag {2} \end {equation} Comparing (1),(2) shows that \begin {align} \frac {dw}{dt} & =0\tag {3}\\ \frac {dx}{dt} & =-3\tag {4} \end {align}

Solving (3) gives\begin {align} w & =w\left ( x\left ( 0\right ) \right ) \nonumber \\ & =\cos \left ( x\left ( 0\right ) \right ) \tag {5} \end {align}

We need to find \(x\left ( 0\right ) \). From (4)\begin {align*} x & =-3t+x\left ( 0\right ) \\ x\left ( 0\right ) & =x+3t \end {align*}

Hence (5) becomes

\[ w\left ( x\left ( t\right ) ,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

Added Nov 25, 2018.

Problem 12.2.4 from Richard Haberman applied partial differential equations book, 5th edition

Solve for \(u(x,t)\) \[ \omega _t +c \omega _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

ClearAll[x, t, w, f, h]; 
 pde = D[w[x, t], t] + c*D[w[x, t], x] == 0; 
 ic = w[x, 0] == f[x]; 
 bc = w[0, t] == h[t]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, w[x, t], {x, t}, Assumptions -> c > 0 && x > 0 && t > 0], 60*10]];
 

\[ \text {Failed} \]

Maple

 
x:='x'; t:='t'; w:='w';f:='f';h:='h';c:='c'; 
pde:=diff(w(x,t),t)+c*diff(w(x,t),x)=0; 
ic:=w(x,0)=f(x); 
bc:=w(0,t)=h(t); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],w(x,t)) assuming t>0,x>0,c>0),output='realtime'));
 

\[ 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 ^{0}\!f \left ( {\it \_a} \right ) {{\rm e}^{{\frac {s{\it \_a}}{c}}}}{d{\it \_a}},s,t \right ) +{\it invlaplace} \left ( {{\rm e}^{-{\frac {sx}{c}}}}\int \!f \left ( x \right ) {{\rm e}^{{\frac {sx}{c}}}}\,{\rm d}x,s,t \right ) \right ) } \] Solution contains unresolved invlaplace calls

Hand solution

\begin {equation} \frac {\partial w}{\partial t}+c\frac {\partial w}{\partial x}=0\tag {1} \end {equation} Let \[ w\equiv w\left ( x\left ( t\right ) ,t\right ) \] Hence \begin {equation} \frac {dw}{dt}=\frac {\partial w}{\partial t}+\frac {\partial w}{\partial x}\frac {dx}{dt}\tag {2} \end {equation} 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 \begin {equation} w\left ( x\left ( t\right ) ,t\right ) =f\left ( x\left ( 0\right ) \right ) \qquad t=0\tag {3} \end {equation} 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 \begin {equation} \frac {dw}{dx}=\frac {\partial w}{\partial x}+\frac {\partial w}{\partial t}\frac {dt}{dx}\tag {4} \end {equation} 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 \begin {equation} w\left ( x,t\left ( x\right ) \right ) =h\left ( t\left ( 0\right ) \right ) \qquad x=0\tag {5} \end {equation} 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

Added Nov 25, 2018.

Problem 12.2.5 (a) from Richard Haberman applied partial differential 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

ClearAll[x, t, w, f, h]; 
 pde = D[w[x, t], t] + c*D[w[x, t], x] == Exp[2*x]; 
 ic = w[x, 0] == f[x]; 
 sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, ic}, w[x, t], {x, t}, Assumptions -> c > 0 && x > 0 && t > 0]], 60*10]];
 

\[ \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

 
x:='x'; t:='t'; w:='w';c:='c'; 
pde:=diff(w(x,t),t)+c*diff(w(x,t),x)=exp(2*x); 
ic:=w(x,0)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],w(x,t)) assuming t>0,x>0,c>0),output='realtime'));
 

\[ 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 at \(s=0\)\[ t\left ( 0\right ) =t_{1},x\left ( 0\right ) =t_{2},u\left ( 0\right ) =t_{3}\] And \(u\left ( x,0\right ) =f\left ( x\right ) \) becomes \begin {equation} t_{3}=f\left ( t_{2}\right ) ,t_{1}=0\tag {4} \end {equation} Equation (1) gives\begin {align} t & =s+t_{1}\nonumber \\ & =s\tag {5} \end {align}

Equation (2) gives\begin {equation} x=cs+t_{2}\tag {6} \end {equation} 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 verified OK using Maple pdetest.

____________________________________________________________________________________

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

problem number 9

Added Nov 25, 2018.

Problem 12.2.5 (d) from Richard Haberman applied partial differential 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

ClearAll[x, t, w, f]; 
 pde = D[w[x, t], t] + 3*t*D[w[x, t], x] == w[x, t]; 
 ic = w[x, 0] == f[x]; 
 sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, ic}, w[x, t], {x, t}]], 60*10]];
 

\[ \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

 
x:='x'; t:='t'; w:='w';c:='c'; 
pde:=diff(w(x,t),t)+3*t*diff(w(x,t),x)=w(x,t); 
ic:=w(x,0)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],w(x,t))),output='realtime'));
 

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

Hand solution

Solve \begin {equation} \frac {\partial w}{\partial t}+3t\frac {\partial w}{\partial x}=w\left ( x,t\right ) \tag {1} \end {equation}

With initial conditions \(w\left ( x,0\right ) =f\left ( x\right ) \)

Solution

Let \(w\equiv w\left ( x\left ( t\right ) ,t\right ) \) then \begin {equation} \frac {dw}{dt}=\frac {\partial w}{\partial x}\frac {dx}{dt}+\frac {\partial w}{\partial t}\tag {2} \end {equation}

Comparing (1,2) shows that

\begin {align} \frac {dw}{dt} & =w\tag {3}\\ \frac {dx}{dt} & =3t\tag {4} \end {align}

Solving (3) gives

\begin {equation} w=Ce^{t}\nonumber \end {equation}

From initial conditions at \(t=0\), the above becomes \(f\left ( x\left ( 0\right ) \right ) =C\). Hence the above becomes

\begin {equation} w\left ( x,t\right ) =f\left ( x\left ( 0\right ) \right ) e^{t}\tag {5} \end {equation}

From (4)

\begin {align*} x & =\frac {3}{2}t^{2}+x\left ( 0\right ) \\ x\left ( 0\right ) & =x-\frac {3}{2}t^{2} \end {align*}

Substituting the above in (5) gives

\[ w\left ( x\left ( t\right ) ,t\right ) =f\left ( x-\frac {3}{2}t^{2}\right ) e^{t}\]

Alternative 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 at \(s=0\)\[ t\left ( 0\right ) =t_{1},x\left ( 0\right ) =t_{2},w\left ( 0\right ) =t_{3}\] And \(w\left ( x,0\right ) =f\left ( x\right ) \) becomes \begin {equation} t_{3}=f\left ( t_{2}\right ) ,t_{1}=0\tag {4} \end {equation} 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\begin {equation} t_{2}=x-\frac {3}{2}s^{2}\tag {7} \end {equation} 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 first-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

ClearAll[u, x, y]; 
 pde = 2*D[u[x, y], x] + 5*D[u[x, y], y] == u[x, y]^2 + 1; 
 sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[pde, u[x, y], {x, y}]], 60*10]];
 

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde := 2* diff(u(x, y), x) + 5*diff(u(x, y), y) = u(x, y)^2 + 1; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde, u(x, y))),output='realtime'));
 

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

Hand solution

Solve for \(u\left ( x,y\right ) \) in \(2u_{x}+5u_{y}=u^{2}+1.\) Using the Lagrange-charpit method, the characteristic equations are\[ \frac {dx}{2}=\frac {dy}{5}=\frac {du}{u^{2}+1}\] From the first pair of equation we obtain\begin {align*} 5dx & =2dy\\ 5x & =2y+C_{1}\\ C_{1} & =5x-2y \end {align*}

Now we can pick the pair \(\frac {dy}{5}=\frac {du}{u^{2}+1}\) or \(\frac {dx}{2}=\frac {du}{u^{2}+1}\) to solve for \(u\). It does not matter which. Using\[ \frac {dx}{2}=\frac {du}{u^{2}+1}\] Integrating gives\begin {align*} \frac {1}{2}x & =\arctan \left ( u\right ) +C_{2}\\ C_{2} & =\frac {1}{2}x-\arctan \left ( u\right ) \end {align*}

\(C_{1}\) and \(C_{2}\) are always related by \(C_{2}=F\left ( C_{1}\right ) \) where \(F\) is arbitrary function. Hence\begin {align*} \frac {1}{2}x-\arctan \left ( u\right ) & =F\left ( 5x-2y\right ) \\ \arctan \left ( u\right ) & =\frac {1}{2}x-F\left ( 5x-2y\right ) \\ u\left ( x,y\right ) & =\tan \left ( \frac {1}{2}x-F\left ( 5x-2y\right ) \right ) \end {align*}

____________________________________________________________________________________

4.11 quasilinear first-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

ClearAll[u, x, y]; 
 pde = D[u[x, y], {x}] + u[x, y]*D[u[x, y], {y}] == 0; 
 sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[pde, u[x, y], {x, y}]], 60*10]];
 

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde := diff(u(x, y), x) + u(x,y)*diff(u(x, y),y) =0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y))),output='realtime')); 
sol:=DEtools:-remove_RootOf(sol);
 

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

Hand solution

Solve for \(u\left ( x,y\right ) \) in \(u_{x}+u\ u_{y}=0.\) Using the Lagrange-Charpit method, the characteristic equations are\[ \frac {dx}{1}=\frac {dy}{u}=\frac {du}{0}\] From the first pair of equation we obtain\[ u=\frac {dy}{dx}\] But \(du=0\) or \(u=C_{2}\). Hence the above becomes

\begin {align*} \frac {dy}{dx} & =C_{2}\\ y & =xC_{2}+C_{1}\\ C_{1} & =y-xC_{2} \end {align*}

Since \(C_{2}=F\left ( C_{1}\right ) \) where \(F\) is arbitrary function, then \[ u\left ( x,y\right ) =F\left ( y-ux\right ) \]

____________________________________________________________________________________

4.12 quasilinear first-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

ClearAll[u, x, y]; 
 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

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
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}{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 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*}

____________________________________________________________________________________

4.13 nonlinear first-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

ClearAll[u, x, y]; 
 pde = u[x, y] == x*D[u[x, y], {x}] + y*D[u[x, y], {y}] + (1/2)*(D[u[x, y], {x}]^2 + D[u[x, y], {y}]^2); 
 sol = AbsoluteTiming[TimeConstrained[Simplify[DSolve[pde, u[x, y], {x, y}]], 60*10]];
 

\[ \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

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde := x*diff(u(x, y), x) + y*diff(u(x, y),y) + 1/2 * ( diff(u(x, y), x)^2 + diff(u(x, y), y)^2)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y),'build')),output='realtime'));
 

\[ 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\begin {equation} 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} \end {equation} 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\begin {equation} 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} \end {equation} From (3,4) the final 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 first-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

ClearAll[u, x, y]; 
 pde = u[x, y] == x*D[u[x, y], {x}] + y*D[u[x, y], {y}] + (1/2)*(D[u[x, y], {x}]^2 + D[u[x, y], {y}]^2); 
 ic = u[x, 0] == (1*(1 - x^2))/2; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, y], {x, y}], 60*10]];
 

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

Maple

 
interface(showassumed=0); 
u:='u';x:='x';y:='y'; 
pde := x*diff(u(x, y), x) + y*diff(u(x, y),y) + 1/2 * ( diff(u(x, y), x)^2 + diff(u(x, y), y)^2)=0; 
ic:=u(x,0)=1/2*(1-x^2); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,y))),output='realtime'));
 

\[ 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

ClearAll[u, x, y]; 
 pde = u[x, y] == x*D[u[x, y], x] + y*D[u[x, y], y] + Sin[D[u[x, y], x] + D[u[x, y], y]]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[pde, u[x, y], {x, y}], 60*10]];
 

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

Maple

 
u:='u';x:='x';y:='y'; 
pde:= u(x,y)= x*diff(u(x,y),x)+y*diff(u(x,y),y)+sin(diff(u(x,y),x)+diff(u(x,y),y)); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y))),output='realtime'));
 

\[ 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

ClearAll[f, x, y]; 
 eq1 = D[f[x, y], x] == x*y*Cos[x*y] + Sin[x*y]; 
 eq2 = D[f[x, y], y] == -E^(-y) + x^2*Cos[x*y]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{eq1, eq2}, f[x, y], {x, y}], 60*10]];
 

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

Maple

 
u:='u';x:='x';y:='y'; 
eq1:=diff(f(x,y),x)=x*y*cos(x*y)+sin(x*y); 
eq2:=diff(f(x,y),y)=-exp(-y)+x^2*cos(x*y); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve({eq1,eq2},f(x,y))),output='realtime'));
 

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

____________________________________________________________________________________

4.17 General solution of a first 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

ClearAll[f, x, y, h, g]; 
 pde = x*D[f[x, y], y] - D[f[x, y], x] == (f[x, y]^2*g[x])/h[y]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[pde, f[x, y], {x, y}], 60*10]];
 

\[ \text {Failed} \]

Maple

 
x:='x';y:='y';f:='f';g:='g';h:='h'; 
pde := x*diff(f(x,y),y)-diff(f(x,y),x)=f(x,y)^2*g(x)/h(y); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,f(x,y))),output='realtime'));
 

\[ 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 first 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

ClearAll[f, x, y, z]; 
 pde = D[f[x, y, z], x] + D[f[x, y, z], y]^2 == f[x, y, z] + z; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[pde, f[x, y, z], {x, y, z}], 60*10]];
 

\[ \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

 
x:='x';y:='y';f:='f';z:='z'; 
pde := diff(f(x,y,z),x) + (diff(f(x,y,z),y))^2 = f(x,y,z)+z; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,f(x,y,z),'build')),output='realtime'));
 

\[ 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 first 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

ClearAll[u, x, y, z]; 
 pde = (y - z)*D[u[x, y, z], x] + (z - x)*D[u[x, y, z], y] + (x - y)*D[u[x, y, z], z] == 0; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[pde, u[x, y, z], {x, y, z}], 60*10]];
 

\[ \text {\$Aborted} \] Timed out

Maple

 
x:='x';y:='y';u:='u';z:='z'; 
pde:=(y-z)*diff(u(x,y,z),x)+(z-x)*diff(u(x,y,z),y)+(x-y)*diff(u(x,y,z),z)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y,z),'build')),output='realtime'));
 

\[ 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}} \]