22 Wave PDE 1D infinite domain

22.1 General solution for a second-order hyperbolic PDE on real line
22.2 With initial conditions specified, no source
22.3 Wave PDE on infinite domain with initial conditions specified, with source term
22.4 non-linear wave PDE (Solitons)
22.5 Hyperbolic PDE with non-rational coefficients
22.6 Inhomogeneous hyperbolic PDE with constant coefficients
22.7 system of 2 inhomogeneous linear hyperbolic system with constant coefficients

____________________________________________________________________________________

22.1 General solution for a second-order hyperbolic PDE on real line

problem number 153

From Mathematica DSolve help pages (slightly modified)

Solve for \(u(x,t)\) with \(t>0\) on real line

\[ \frac {\partial ^2 u}{\partial t^2} + \frac {\partial ^2 u}{\partial t \partial x } = c^2 \frac {\partial ^2 u}{\partial x^2} \]

Mathematica

ClearAll[u, t, x, c]; 
 ode = D[u[x, t], {t, 2}] + D[u[x, t], x, t] == c^2*D[u[x, t], {x, 2}]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[ode, u[x, t], {x, t}], 60*10]];
 

\[ \left \{\left \{u(x,t)\to c_1\left (t-\frac {\left (\sqrt {4 c^2+1}-1\right ) x}{2 c^2}\right )+c_2\left (t-\frac {\left (-\sqrt {4 c^2+1}-1\right ) x}{2 c^2}\right )\right \}\right \} \]

Maple

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

\[ u \left ( x,t \right ) ={\it \_F1} \left ( 1/2\,{\frac {2\,{c}^{2}t+x\sqrt {4\,{c}^{2}+1}+x}{{c}^{2}}} \right ) +{\it \_F2} \left ( 1/2\,{\frac {2\,{c}^{2}t-x\sqrt {4\,{c}^{2}+1}+x}{{c}^{2}}} \right ) \]

____________________________________________________________________________________

22.2 With initial conditions specified, no source

problem number 154

Taken from Mathematica DSolve help pages.

Solve initial value wave PDE on infinite domain

\[ \frac {\partial ^2 u}{\partial t^2} = \frac {\partial ^2 u}{\partial x^2} \]

With initial conditions

\begin {align*} u(x,0) &=e^{-x^2} \\ \frac {\partial u}{\partial t}(x,0) &= 1 \end {align*}

Mathematica

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

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

Maple

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

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

____________________________________________________________________________________

22.3 Wave PDE on infinite domain with initial conditions specified, with source term

problem number 155

Taken from Mathematica DSolve help pages.

Solve initial value wave PDE on infinite domain

\[ \frac {\partial ^2 u}{\partial t^2} = \frac {\partial ^2 u}{\partial x^2} + m \]

With initial conditions

\begin {align*} u(x,0) &=\sin x- \frac {\cos 3 x}{e^{ \frac {abs(x)}{6} }} \\ \frac {\partial u}{\partial t}(x,0) &= 0 \end {align*}

Mathematica

ClearAll[u, t, x]; 
 pde = {D[u[x, t], {t, 2}] == D[u[x, t], {x, 2}] + m}; 
 ic = {u[x, 0] == Sin[x] - Cos[3*x]/E^(Abs[x]/6), Derivative[0, 1][u][x, 0] == 0}; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, t], {x, t}], 60*10]];
 

\[ \left \{\left \{u(x,t)\to \frac {1}{2} \left (-e^{-\frac {\left | x-t\right | }{6}} \cos (3 (x-t))-e^{-\frac {\left | t+x\right | }{6}} \cos (3 (t+x))-\sin (t-x)+\sin (t+x)\right )+\frac {m t^2}{2}\right \}\right \} \]

Maple

 
x:='x'; t:='t'; u:='u'; 
pde:= diff(u(x, t), t$2) = diff(u(x, t), x$2) + m; 
ic := u(x, 0) = sin(x) - cos(3*x)/exp(abs(x)/6), (D[2](u))(x, 0) =0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic], u(x, t))),output='realtime'));
 

\[ u \left ( x,t \right ) =1/2\,{{\rm e}^{-1/6\, \left | -x+t \right | -1/6\, \left | x+t \right | }} \left ( \left ( m{t}^{2}-\sin \left ( -x+t \right ) +\sin \left ( x+t \right ) \right ) {{\rm e}^{1/6\, \left | -x+t \right | +1/6\, \left | x+t \right | }}-{{\rm e}^{1/6\, \left | -x+t \right | }}\cos \left ( 3\,x+3\,t \right ) -\cos \left ( 3\,t-3\,x \right ) {{\rm e}^{1/6\, \left | x+t \right | }} \right ) \]

____________________________________________________________________________________

22.4 non-linear wave PDE (Solitons)

problem number 156

This was first solved analytically by (Krvskal, Zabrsky 1965).

Solve

\[ \frac {\partial u}{\partial t} +6 u(x,t) \frac {\partial u}{\partial x} + \frac {\partial ^3 u}{\partial x^3} = 0 \]

Mathematica

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

\[ \left \{\left \{u(x,t)\to -\frac {12 c_1^3 \tanh ^2\left (c_2 t+c_1 x+c_3\right )-8 c_1^3+c_2}{6 c_1}\right \}\right \} \]

Maple

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

\[ u \left ( x,t \right ) =-2\,{{\it \_C2}}^{2} \left ( \tanh \left ( {\it \_C2}\,x+{\it \_C3}\,t+{\it \_C1} \right ) \right ) ^{2}+1/6\,{\frac {8\,{{\it \_C2}}^{3}-{\it \_C3}}{{\it \_C2}}} \] Returning a solution that is not the most general one

____________________________________________________________________________________

22.5 Hyperbolic PDE with non-rational coefficients

problem number 157

From Mathematica DSolve help pages

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

\[ \frac {\partial ^2 u}{\partial x^2} -2 \sin x \frac {\partial ^2 u}{\partial x \partial y } -\cos ^2 x \frac {\partial ^2 u}{\partial y^2} -\cos x \frac {\partial u}{\partial y}=0 \]

Mathematica

ClearAll[u, x, y]; 
 ode = D[u[x, y], {x, 2}] - 2*Sin[x]*D[u[x, y], x, y] - Cos[x]^2*D[u[x, y], {y, 2}] - Cos[x]*D[u[x, y], y] == 0; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[ode, u[x, y], {x, y}], 60*10]];
 

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

Maple

 
x:='x'; t:='t';c:='c';u:='u'; 
interface(showassumed=0); 
ode := diff(u(x, y), x$2) - 2*sin(x)*diff(u(x, y),x,y)-cos(x)^2*diff(u(x, y), y$2) - cos(x)*diff(u(x, y), y) = 0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(ode, u(x, y))),output='realtime'));
 

\[ \text { sol=() } \]

____________________________________________________________________________________

22.6 Inhomogeneous hyperbolic PDE with constant coefficients

problem number 158

From Mathematica DSolve help pages

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

\[ 3 \frac {\partial ^2 u}{\partial x^2} - \frac {\partial ^2 u}{\partial t^2} + \frac {\partial ^2 u}{\partial x \partial t}=1 \]

Mathematica

ClearAll[u, x, t]; 
 ode = 3*D[u[x, t], {x, 2}] - D[u[x, t], {t, 2}] + D[u[x, t], x, t] == 1; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[ode, u[x, t], {x, t}], 60*10]];
 

\[ \left \{\left \{u(x,t)\to c_1\left (t-\frac {1}{6} \left (1+\sqrt {13}\right ) x\right )+c_2\left (t-\frac {1}{6} \left (1-\sqrt {13}\right ) x\right )+\frac {x^2}{6}\right \}\right \} \]

Maple

 
x:='x'; t:='t';y:='y';u:='u'; 
ode := 3*diff(u(x, t), x$2) - diff(u(x, t),t$2)+diff(u(x, t), x,t) =1; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(ode, u(x, t))),output='realtime'));
 

\[ u \left ( x,t \right ) ={\it \_F2} \left ( 1/6\, \left ( -1+\sqrt {13} \right ) x+t \right ) +{\it \_F1} \left ( 1/2\, \left ( 1/13\,\sqrt {13}+1 \right ) x-3/13\,t\sqrt {13} \right ) +1/13\,\sqrt {13} \left ( 1/6\, \left ( -1+\sqrt {13} \right ) x+t \right ) \left ( 1/2\, \left ( 1/13\,\sqrt {13}+1 \right ) x-3/13\,t\sqrt {13} \right ) \]

____________________________________________________________________________________

22.7 system of 2 inhomogeneous linear hyperbolic system with constant coefficients

problem number 159

From Mathematica DSolve help pages

Solve for \(u(x,t),v(x,t)\)

\begin {align*} \frac {\partial u}{\partial t} &= \frac {\partial v}{\partial x}+1\\ \frac {\partial v}{\partial t} &= -\frac {\partial u}{\partial x}-1 \end {align*}

With initial conditions \begin {align*} u(x,0) &= \cos ^2 x\\ v(x,0) &= \sin x \end {align*}

Mathematica

ClearAll[u, v, x, t]; 
 eqns = {D[u[x, t], t] == D[v[x, t], x] + 1, D[v[x, t], t] == -D[u[x, t], x] - 1}; 
 ic = {u[x, 0] == Cos[x]^2, v[x, 0] == Sin[x]}; 
 sol = AbsoluteTiming[TimeConstrained[FullSimplify[DSolve[{eqns, ic}, {u[x, t], v[x, t]}, {x, t}]], 60*10]];
 

\[ \left \{\left \{u(x,t)\to \sinh (t) \cos (x)+\frac {1}{2} \cosh (2 t) \cos (2 x)+t+\frac {1}{2},v(x,t)\to \cosh (t) \sin (x) (2 \sinh (t) \cos (x)+1)-t\right \}\right \} \]

Maple

 
x:='x'; t:='t';v:='v';u:='u'; 
pde1 := diff(u(x, t), t) = diff(v(x, t), x) + 1; 
pde2 := diff(v(x, t), t) = -diff(u(x, t), x) - 1; 
ic := u(x, 0) = cos(x)^2, v(x, 0) = sin(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde1,pde2, ic], {u(x, t), v(x, t)})),output='realtime'));
 

\[ \text { sol=() } \]