5.1.3 Infinite domain

   5.1.3.1 [378] General case. \(u_{tt} = u_{xx}\) with \(u(x,0)=f(x),u_t(x,0)=g(x)\)
   5.1.3.2 [379] General case. No IC given. \(u_{tt} + u_{xt} = c^2 u_{xx}\)
   5.1.3.3 [380] \(u_{tt}= c^2 u_{xx} + f(x,t)\), IC at \(t=1\),\(u(x,1) = g(x),u_t(x,1)=h(x)\)
   5.1.3.4 [381] No source. \(u_{tt} = u_{xx}\), with \(u(x,0) =e^{-x^2},u_t(x,0)=1\)
   5.1.3.5 [382] With source term. \(u_{tt} = u_{xx} + m\)
   5.1.3.6 [383] non-linear (Solitons) \(u_t +6 u(x,t) u_x + u_{xxx} = 0\)
   5.1.3.7 [384] Inhomogeneous PDE \(3 u_{xx}- u_{tt} + u_{xt}=1\)
   5.1.3.8 [385] Practice exam problem Math 5587
   5.1.3.9 [386] Practice exam problem Math 5587
   5.1.3.10 [387] Practice exam problem Math 5587
   5.1.3.11 [388] zero initial velocity
   5.1.3.12 [389] zero initial velocity
   5.1.3.13 [390] General case \(u_{tt} = u_{xx}\) with \(u(x,0)=\sin x, u_t(x,0)=-2 x e^{-x^2}\)
   5.1.3.14 [391] General case. \(u_{tt} =u_{xx}\) dAlembert solution, box function as initial position
   5.1.3.15 [392] \(u_{tt}=4 u_{xx}+ \cos (t)\) dAlembert solution with \(u(x,0)=\sin x,u_t(x,0)=\cos x\)
   5.1.3.16 [393] \(u_{tt}=c^2 u_{xx}\) dAlembert solution with \(u(x,0)=\delta (x-a),u_t(x,0)=0\)
   5.1.3.17 [394] system of 2 inhomogeneous linear hyperbolic system with constant coefficients

5.1.3.1 [378] General case. \(u_{tt} = u_{xx}\) with \(u(x,0)=f(x),u_t(x,0)=g(x)\)

problem number 378

Added May 26, 2019.

Solve for \(u(x,t)\) for all \(x\) and \(t>0\) with \(u(x,0)=f(x)\) and \(u_t(x,0)=g(x)\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.63:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \frac{1}{2} \left (\int _{x-t}^{t+x} g(K[1]) \, dK[1]+f(x-t)+f(t+x)\right )\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =1/2\,f \left ( x-t \right ) -1/2\,\int _{0}^{x-t}\!g \left ({\it x1} \right ) \,{\rm d}{\it x1}+1/2\,f \left ( x+t \right ) +1/2\,\int _{0}^{x+t}\!g \left ({\it x1} \right ) \,{\rm d}{\it x1}\]

________________________________________________________________________________________

5.1.3.2 [379] General case. No IC given. \(u_{tt} + u_{xt} = c^2 u_{xx}\)

problem number 379

From Mathematica DSolve help pages (slightly modified)

Solve for \(u(x,t)\) with \(t>0\) on real line \[ u_{tt} + u_{xt} = c^2 u_{xx} \]

pict
Figure 5.64:PDE specification

Mathematica

\[\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 (\frac{2 c^2 t+\sqrt{4 c^2+1} x+x}{2 c^2}\right )\right \}\right \}\]

Maple

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

________________________________________________________________________________________

5.1.3.3 [380] \(u_{tt}= c^2 u_{xx} + f(x,t)\), IC at \(t=1\),\(u(x,1) = g(x),u_t(x,1)=h(x)\)

problem number 380

Added December 20, 2018.

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve \[ u_{tt}= c^2 u_{xx} + f(x,t) \] With initial conditions not at zero \begin{align*} u(x,1) &= g(x)\\ \frac{\partial u}{\partial t}(x,1) &= h(x) \end{align*}

pict
Figure 5.65:PDE specification

Mathematica

Failed

Maple

\[u \left ( x,t \right ) =1/2\,{\frac{\int _{0}^{t-1}\!\int _{ \left ( -t+\tau +1 \right ) c+x}^{x+c \left ( t-1-\tau \right ) }\!{c}^{2} \left ({\frac{{\rm d}^{2}}{{\rm d}{\zeta }^{2}}}h \left ( \zeta \right ) \right ) \tau +{c}^{2}{\frac{{\rm d}^{2}}{{\rm d}{\zeta }^{2}}}g \left ( \zeta \right ) +f \left ( \zeta ,\tau +1 \right ) \,{\rm d}\zeta \,{\rm d}\tau + \left ( 2\,t-2 \right ) ch \left ( x \right ) +2\,g \left ( x \right ) c}{c}}\]

________________________________________________________________________________________

5.1.3.4 [381] No source. \(u_{tt} = u_{xx}\), with \(u(x,0) =e^{-x^2},u_t(x,0)=1\)

problem number 381

Taken from Mathematica DSolve help pages.

Solve initial value wave PDE on infinite domain \[ u_{tt} = u_{xx} \] With initial conditions \begin{align*} u(x,0) &=e^{-x^2} \\ \frac{\partial u}{\partial t}(x,0) &= 1 \end{align*}

pict
Figure 5.66:PDE specification

Mathematica

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

Maple

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

________________________________________________________________________________________

5.1.3.5 [382] With source term. \(u_{tt} = u_{xx} + m\)

problem number 382

Taken from Mathematica DSolve help pages.

Solve initial value wave PDE on infinite domain \[ u_{tt} = u_{xx} + 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*}

pict
Figure 5.67:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) =1/2\, \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\,x+3\,t \right ){{\rm e}^{1/6\, \left | x+t \right | }} \right ){{\rm e}^{-1/6\, \left | -x+t \right | -1/6\, \left | x+t \right | }}\]

________________________________________________________________________________________

5.1.3.6 [383] non-linear (Solitons) \(u_t +6 u(x,t) u_x + u_{xxx} = 0\)

problem number 383

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

Solve \[ u_t +6 u(x,t) u_x + u_{xxx} = 0 \]

pict
Figure 5.68:PDE specification

Mathematica

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

Maple

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

Hand solution

Solve \[ u_{t}+6u\ u_{x}+u_{xxx}=0 \] Assuming special solution \(u=f\left ( \xi \right ) \) where \(\xi =x-ct\), this PDE is transformed to non-linear first order ODE\[ -c\frac{f^{2}}{2}+f^{3}+\frac{1}{2}\left ( \frac{df}{d\xi }\right ) ^{2}=0 \] The above is solved analytically (Krvskal, Zabrsky 1965) and the solution is\[ f\left ( x,c,t\right ) =\left ( \frac{1}{2}c\right ) \operatorname{sech}^{2}\left ( \frac{\sqrt{c}}{2}\left ( x-ct\right ) \right ) \] Tall waves move fast but have smaller period, while short wave move slow. Tall wave pass through short wave and leave in same shape they entered. Here are two animations and the above solution. This first animation has one tall wave passing though short wave

Source code used for the above

pict
Figure 5.69:Source code

This animation shows three waves interacting

Source code used for the above

pict
Figure 5.70:Code for animation

________________________________________________________________________________________

5.1.3.7 [384] Inhomogeneous PDE \(3 u_{xx}- u_{tt} + u_{xt}=1\)

problem number 384

From Mathematica DSolve help pages. Inhomogeneous hyperbolic PDE with constant coefficients.

Solve for \(u(x,t)\) \[ 3 u_{xx}- u_{tt} + u_{xt}=1 \]

pict
Figure 5.71:PDE specification

Mathematica

\[\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 (\sqrt{13}-1\right ) x\right )+\frac{x^2}{6}\right \}\right \}\]

Maple

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

________________________________________________________________________________________

5.1.3.8 [385] Practice exam problem Math 5587

problem number 385

Added May 23, 2019.

From Math 5587 midterm I, Fall 2016, practice exam, problem 10.

Solve for \(u(x,t)\) with \(u(x,0)=\sin (x)\) and \(u_t(x,0)=\cos (x)\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.72:PDE specification

Mathematica

\[\{\{u(x,t)\to \sin (t+x)\}\}\]

Maple

\[u \left ( x,t \right ) =\sin \left ( x+t \right ) \]

________________________________________________________________________________________

5.1.3.9 [386] Practice exam problem Math 5587

problem number 386

Added May 23, 2019.

From Math 5587 midterm I, Fall 2016, practice exam, problem 11.

Solve for \(u(x,t)\) with \(u(x,0)=x^2\) and \(u_t(x,0)=x\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.73:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) ={t}^{2}+tx+{x}^{2}\]

________________________________________________________________________________________

5.1.3.10 [387] Practice exam problem Math 5587

problem number 387

Added May 23, 2019.

From Math 5587 midterm I, Fall 2016, practice exam, problem 12.

Solve for \(u(x,t)\) with \(u(x,0)=0\) and \(u_t(x,0)=\frac{4 x}{x^2+1}\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.74:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) =-\ln \left ({t}^{2}-2\,tx+{x}^{2}+1 \right ) +\ln \left ({t}^{2}+2\,tx+{x}^{2}+1 \right ) \]

________________________________________________________________________________________

5.1.3.11 [388] zero initial velocity

problem number 388

Added January 9, 2020

Solve for \(u(x,t)\) with \(u(x,0)=\frac{1}{x^2+1}\) and \(u_t(x,0)=0\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.75:PDE specification

Mathematica

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

Maple

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

Hand solution

Solve the wave equation \(u_{tt}=u_{xx}\) for infinite domain \(-\infty <x<\infty \) with initial position \(u\left ( x,0\right ) =\frac{1}{1+x^{2}}\) and zero initial velocity \(g\left ( x\right ) =0\).

The solution for wave PDE \(u_{tt}=a^{2}u_{xx}\) on infinite domain can be given as either series solution, or using D’Alembert solution. Using D’Alembert, the solution is\[ u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-at\right ) +f\left ( x+at\right ) \right ) +\frac{1}{2a}\int _{x-at}^{x+at}g\left ( s\right ) ds \] But here \(c=1\) and \(g\left ( x\right ) \) is zero. Therefore the above simplifies to\[ u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-t\right ) +f\left ( x+t\right ) \right ) \] Since \(f\left ( x\right ) =\frac{1}{1+x^{2}}\), the above becomes\[ u\left ( x,t\right ) =\frac{1}{2}\left ( \frac{1}{1+\left ( x-t\right ) ^{2}}+\frac{1}{1+\left ( x+t\right ) ^{2}}\right ) \]

Animation is below

Source code used for the above

pict
Figure 5.76:Source code

________________________________________________________________________________________

5.1.3.12 [389] zero initial velocity

problem number 389

Added January 10, 2020

Solve for \(u(x,t)\) with \(u(x,0)=\sin (x)\) from \(-\pi <x<\pi \) and zero everywhere else and \(u_t(x,0)=0\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.77:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \frac{1}{2} \left (\left (\begin{array}{cc} \{ & \begin{array}{cc} \sin (t+x) & -\pi <t+x<\pi \\ 0 & \text{True} \\\end{array} \\\end{array}\right )+\left (\begin{array}{cc} \{ & \begin{array}{cc} -\sin (t-x) & t<x+\pi \land x<t+\pi \\ 0 & \text{True} \\\end{array} \\\end{array}\right )\right )\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =-1/2\,\cases{0&$-t+x\leq -\pi $\cr \sin \left ( t-x \right ) &$-t+x<\pi $\cr 0&$\pi \leq -t+x$\cr }+1/2\,\cases{0&$t+x\leq -\pi $\cr \sin \left ( t+x \right ) &$t+x<\pi $\cr 0&$\pi \leq t+x$\cr }\]

Hand solution

The solution for wave PDE \(u_{tt}=u_{xx}\) on infinite domain using D’Alembert solution with zero initial velocity is\begin{align*} u\left ( x,t\right ) & =\frac{1}{2}\left ( f\left ( x-t\right ) +f\left ( x+t\right ) \right ) \\ & =\frac{1}{2}\left ( \sin \left ( x-t\right ) +\sin \left ( x+t\right ) \right ) \end{align*}

The following is an animation Here is animation for 10 seconds.

Animation is below

Source code used for the above

pict
Figure 5.78:Source code

________________________________________________________________________________________

5.1.3.13 [390] General case \(u_{tt} = u_{xx}\) with \(u(x,0)=\sin x, u_t(x,0)=-2 x e^{-x^2}\)

problem number 390

Added May 26, 2019.

Taken from Final exam, Math 5587 UMN, Fall 2016.

Solve for \(u(x,t)\) for all \(x\) and \(t>0\) with \(u(x,0)=\sin (x)\) and \(u_t(x,0)=-2 x e^{-x^2}\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.79:PDE specification

Mathematica

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

Maple

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

________________________________________________________________________________________

5.1.3.14 [391] General case. \(u_{tt} =u_{xx}\) dAlembert solution, box function as initial position

problem number 391

Added Sept, 15, 2019.

Taken from Peter Olver textbook, Introduction to Partial differential equations. Problem 2.4.2

Solve for \(u(x,t)\) for all \(x\) and \(t>0\) with \(u(x,0)=1\) for \(1<x<2\) and zero otherwise. \(u_t(x,0)=0\) \begin{align*} u_{tt} = u_{xx} \end{align*}

pict
Figure 5.80:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \frac{1}{2} \left (\left (\begin{array}{cc} \{ & \begin{array}{cc} 1 & 1<x-t<2 \\ 0 & \text{True} \\\end{array} \\\end{array}\right )+\left (\begin{array}{cc} \{ & \begin{array}{cc} 1 & 1<t+x<2 \\ 0 & \text{True} \\\end{array} \\\end{array}\right )\right )\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =\cases{0&$x-t\leq 1$\cr 1/2&$x-t<2$\cr 0&$2\leq x-t$\cr }+\cases{0&$x+t\leq 1$\cr 1/2&$x+t<2$\cr 0&$2\leq x+t$\cr }\]

Hand solution

Solve the wave equation \(u_{tt}=u_{xx}\) when the initial displacement is the box function \(u\left ( 0,x\right ) =\left \{ \begin{array} [c]{ccc}1 & & 1<x<2\\ 0 & & \text{otherwise}\end{array} \right . \), while the initial velocity is zero.

Solution

d’Alembert solution of the wave equation is

\[ u\left ( t,x\right ) =\frac{1}{2}\left ( f\left ( x-ct\right ) +f\left ( x+ct\right ) \right ) +\frac{1}{2c}\int _{x-ct}^{x+ct}g\left ( s\right ) ds \]

Where \(c\) is the wave speed which is \(c=1\) in this problem and \(f\left ( x\right ) =u\left ( 0,x\right ) \) and \(g\left ( x\right ) =u_{t}\left ( 0,x\right ) =0\) in this problem. Hence the above simpifies to

\begin{align*} u\left ( t,x\right ) & =\frac{1}{2}\left ( f\left ( x-t\right ) +f\left ( x+t\right ) \right ) \\ & =\frac{1}{2}\left ( \left \{ \begin{array} [c]{ccc}1 & & 1<x-t<2\\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}1 & & 1<x+t<2\\ 0 & & \text{otherwise}\end{array} \right . \right ) \end{align*}

The following is an animation of the solution

Source code used for the above

pict
Figure 5.81:Source code 2D

________________________________________________________________________________________

5.1.3.15 [392] \(u_{tt}=4 u_{xx}+ \cos (t)\) dAlembert solution with \(u(x,0)=\sin x,u_t(x,0)=\cos x\)

problem number 392

Added Oct 8, 2019

Exam 1 problem, math 5587, fall 2019, UMN.

Solve for \(u(x,t)\) \begin{align*} u_{tt} = 4 u_{xx} +\cos (t) \end{align*}

With initial conditions \(u(x,0)=\sin x,u_t(x,0)=\cos x\)

pict
Figure 5.82:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) =-1/4\,\sin \left ( 2\,t-x \right ) +1+3/4\,\sin \left ( 2\,t+x \right ) -\cos \left ( t \right ) \]

Hand solution

Solve the wave equation \(u_{tt}=4u_{xx}+\cos t\) when initial conditions \(u\left ( x,0\right ) =\sin x,u_{t}\left ( x,0\right ) =\cos x\)

Solution

d’Alembert solution of the wave equation is\[ u\left ( t,x\right ) =\frac{1}{2}\left ( f\left ( x-ct\right ) +f\left ( x+ct\right ) \right ) +\frac{1}{2c}\int _{x-ct}^{x+ct}g\left ( s\right ) ds+\frac{1}{2c}\int _{0}^{t}\int _{x-c\left ( t-s\right ) }^{x+c\left ( t-s\right ) }F\left ( s\right ) dyds \] Where \(c\) is the wave speed which is \(c=2\) in this problem and \(f\left ( x\right ) =u\left ( 0,x\right ) =\sin x\) and \(g\left ( x\right ) =u_{t}\left ( 0,x\right ) =\cos x\) and the force \(F\left ( t\right ) =\cos t\) in this problem. Hence the above simpifies to\[ u\left ( t,x\right ) =\frac{1}{2}\left ( \sin \left ( x-2t\right ) +\sin \left ( x+2t\right ) \right ) +\frac{1}{4}\int _{x-2t}^{x+2t}\cos \left ( s\right ) ds+\frac{1}{4}\int _{0}^{t}\int _{x-2\left ( t-s\right ) }^{x+2\left ( t-s\right ) }\cos \left ( s\right ) dyds \] But \(\frac{1}{4}\int _{x-2t}^{x+2t}\cos \left ( s\right ) ds=\frac{1}{4}\left [ \sin \left ( s\right ) \right ] _{x-2t}^{x+2t}=\frac{1}{4}\left ( \sin \left ( x+2t\right ) -\sin \left ( x-2t\right ) \right ) \). Hence the above becomes\begin{align} u\left ( t,x\right ) & =\frac{1}{2}\left ( \sin \left ( x-2t\right ) +\sin \left ( x+2t\right ) \right ) +\frac{1}{4}\left ( \sin \left ( x+2t\right ) -\sin \left ( x-2t\right ) \right ) +\frac{1}{4}\int _{0}^{t}\int _{x-2\left ( t-s\right ) }^{x+2\left ( t-s\right ) }\cos \left ( s\right ) dyds\nonumber \\ & =\frac{1}{4}\sin \left ( x-2t\right ) +\frac{3}{4}\sin \left ( x+2t\right ) +\frac{1}{4}\int _{0}^{t}\int _{x-c\left ( t-s\right ) }^{x+c\left ( t-s\right ) }\cos \left ( s\right ) dyds\tag{1A} \end{align}

But \begin{align} \frac{1}{4}\int _{0}^{t}\int _{x-2\left ( t-s\right ) }^{x+2\left ( t-s\right ) }\cos \left ( s\right ) dyds & =\frac{1}{4}\int _{0}^{t}\cos \left ( s\right ) \int _{x-2\left ( t-s\right ) }^{x+2\left ( t-s\right ) }dyds\nonumber \\ & =\frac{1}{4}\int _{0}^{t}\cos \left ( s\right ) \left ( x+2\left ( t-s\right ) -x+2\left ( t-s\right ) \right ) ds\nonumber \\ & =\frac{1}{4}\int _{0}^{t}\cos \left ( s\right ) \left ( 2\left ( t-s\right ) +2\left ( t-s\right ) \right ) ds\nonumber \\ & =\frac{1}{4}\int _{0}^{t}\cos \left ( s\right ) \left ( 2t-2s+2t-2s\right ) ds\nonumber \\ & =\int _{0}^{t}\cos \left ( s\right ) \left ( t-s\right ) ds\nonumber \\ & =\int _{0}^{t}t\cos \left ( s\right ) ds-\int _{0}^{t}s\cos \left ( s\right ) ds\nonumber \\ & =t\left [ \sin \left ( s\right ) \right ] _{0}^{t}-\int _{0}^{t}s\cos \left ( s\right ) ds\nonumber \\ & =t\sin t-\int _{0}^{t}s\cos \left ( s\right ) ds\tag{1} \end{align}

Integration by parts. \(udv=uv-\int vdu\). Let \(u=s,dv=\cos s\), then \(du=1,v=\sin \left ( s\right ) \), then \begin{align} \int _{0}^{t}s\cos \left ( s\right ) ds & =\left [ s\sin \left ( s\right ) \right ] _{0}^{t}-\int _{0}^{t}\sin sds\nonumber \\ & =t\sin t-\left [ -\cos s\right ] _{0}^{t}\nonumber \\ & =t\sin t+\left ( \cos t-1\right ) \tag{2} \end{align}

Using (2) in (1) gives\begin{align*} \frac{1}{4}\int _{0}^{t}\int _{x-2\left ( t-s\right ) }^{x+2\left ( t-s\right ) }\cos \left ( s\right ) dyds & =t\sin t-\left ( t\sin t+\left ( \cos t-1\right ) \right ) \\ & =1-\cos t \end{align*}

Substituting the above in (1A) gives\[ u\left ( x,t\right ) =\frac{1}{4}\sin \left ( x-2t\right ) +\frac{3}{4}\sin \left ( x+2t\right ) +1-\cos t \] The following is an animation of the solution

Source code used for the above

pict
Figure 5.83:Source code 2D

________________________________________________________________________________________

5.1.3.16 [393] \(u_{tt}=c^2 u_{xx}\) dAlembert solution with \(u(x,0)=\delta (x-a),u_t(x,0)=0\)

problem number 393

Added January 8, 2020

Problem 6.3.27 Introduction to Partial Differential Equations by Peter Olver, ISBN 9783319020983.

Consider the wave equation \(u_{tt}=c^{2}u_{xx}\) on the line \(-\infty <x<\infty \). Use the d’Alembert formula to solve the initial value problem \(u\left ( x,0\right ) =\delta \left ( x-a\right ) ,u_{t}\left ( x,0\right ) =0\). \begin{equation} u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-ct\right ) +f\left ( x+ct\right ) \right ) +\frac{1}{2c}\int _{x-ct}^{x+ct}g\left ( s\right ) ds \tag{2.82} \end{equation}

pict
Figure 5.84:PDE specification

Mathematica

Failed

Maple

\[u \left ( x,t \right ) =1/2\,{\it Dirac} \left ( ct+a-x \right ) +1/2\,{\it Dirac} \left ( -ct+a-x \right ) \]

Hand solution

\begin{equation} u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-ct\right ) +f\left ( x+ct\right ) \right ) +\frac{1}{2c}\int _{x-ct}^{x+ct}g\left ( s\right ) ds \tag{2.82} \end{equation}

In (2.82), the function \(f\) is the initial conditions and the function \(g\) is the initial velocity. Hence the above becomes\[ u\left ( x,t\right ) =\frac{1}{2}\left ( \delta \left ( \left ( x-a\right ) -ct\right ) +\delta \left ( \left ( x-a\right ) +ct\right ) \right ) \] But \(\delta \left ( \left ( x-a\right ) -ct\right ) =\delta \left ( x-a-ct\right ) =\delta \left ( x-\left ( a+ct\right ) \right ) \) and \(\delta \left ( \left ( x-a\right ) +ct\right ) =\delta \left ( x-a+ct\right ) =\delta \left ( x-\left ( a-ct\right ) \right ) \). Hence the above becomes\begin{equation} u\left ( x,t\right ) =\frac{1}{2}\delta \left ( x-\left ( a+ct\right ) \right ) +\frac{1}{2}\delta \left ( x-\left ( a-ct\right ) \right ) \tag{1} \end{equation} The above is two half strength delta pulses, one traveling to the left and one traveling to the right from the starting position.

________________________________________________________________________________________

5.1.3.17 [394] system of 2 inhomogeneous linear hyperbolic system with constant coefficients

problem number 394

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

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

sol=()