5.1.2 Semi-infinite domain

   5.1.2.1 [365] Left end fixed, (general case)
   5.1.2.2 [366] Left end fixed with specific initial position
   5.1.2.3 [367] Logan page 115, left end fixed with source
   5.1.2.4 [368] Left moving boundary condition
   5.1.2.5 [369] moving Left end
   5.1.2.6 [370] I.C. at \(t=1\)
   5.1.2.7 [371] B.C. at \(x=1\)
   5.1.2.8 [372] Left end free. zero initial velocity (general solution)
   5.1.2.9 [373] Left end free. zero initial velocity (Special solution)
   5.1.2.10 [374] Left end fixed. zero initial velocity (Special solution)
   5.1.2.11 [375] Left end free. zero initial position (general solution)
   5.1.2.12 [376] Left end free. Non zero initial position and velocity (general solution)
   5.1.2.13 [377] Left end free with source

5.1.2.1 [365] Left end fixed, (general case)

problem number 365

Added July 12, 2019 Solve for \(u(x,t)\) with \(t>0\) and \(x>0\) \[ u_{tt} = c^2 u_{xx} \] With boundary conditions \begin{align*} u(0,t) &= 0 \end{align*}

With initial conditions \begin{align*} u_t(x,0) &=0 \\ u(x,0) &= f(x) \end{align*}

pict
Figure 5.47:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} \frac{1}{2} (f(x-c t)+f(c t+x)) & x>c t \\ \frac{1}{2} (f(c t+x)-f(c t-x)) & x\leq c t \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}\]

Maple

sol=()

Hand solution

Solving on semi-infinite domain for \(u(x,t)\)\begin{equation} \frac{\partial ^{2}u}{\partial t^{2}}=c^{2}\frac{\partial ^{2}u}{\partial x^{2}}\qquad 0<x<\infty ,t>0\tag{1} \end{equation} With BC \begin{align*} u\left ( 0,t\right ) & =0\\ u\left ( \infty ,t\right ) & <\infty \end{align*}

And initial conditions\begin{align*} u\left ( x,0\right ) & =f\left ( x\right ) \\ u_{t}\left ( x,0\right ) & =0 \end{align*}

Seperation of variables method

Let \(u\left ( x,t\right ) =X\left ( x\right ) T\left ( t\right ) \). The PDE in (1) becomes\[ \frac{T^{\prime \prime }}{c^{2}T}=\frac{X^{\prime \prime }}{X}=-\lambda \] Hence \begin{align*} X^{\prime \prime }+\lambda X & =0\\ X\left ( 0\right ) & =0\\ X\left ( \infty \right ) & <\infty \end{align*}

It is clear that \(\lambda \) can not be negative because it gives a solution that blows up. For \(\lambda =0\), the solution is \(X\left ( x\right ) =Ax+B\) and because \(X\left ( 0\right ) =0\) this implies \(B=0\). Hence solution is \(X\left ( x\right ) =Ax\). And this blows up as \(x\) increases unless \(A=0\). Hence \(\lambda =0\) is not valid eigenvalue. Therefore \(\lambda >0\). Let \(\lambda =\alpha ^{2},\alpha >0\) and the solution becomes\[ X\left ( x\right ) =A_{\alpha }\cos \left ( \alpha x\right ) +B_{\alpha }\sin \left ( \alpha x\right ) \] At \(x=0\) the above gives\[ 0=A_{\alpha }\] Therefore the solution becomes\begin{equation} X_{\alpha }\left ( x\right ) =B_{\alpha }\sin \left ( \alpha x\right ) \qquad \alpha >0\tag{1} \end{equation} The time domain ODE becomes\begin{align*} T^{\prime \prime }+c^{2}\alpha ^{2}T & =0\\ T & =C_{\alpha }\cos \left ( \alpha ct\right ) +D_{\alpha }\sin \left ( \alpha ct\right ) \\ T^{\prime }\left ( t\right ) & =-c\alpha C_{\alpha }\sin \left ( \alpha ct\right ) +c\alpha D_{\alpha }\cos \left ( \alpha ct\right ) \end{align*}

And at \(t=0,T^{\prime }\left ( 0\right ) =0\), hence the above becomes\[ 0=c\alpha D_{\alpha }\] Which means \(D_{\alpha }=0\). Therefore\begin{equation} T=C_{\alpha }\cos \left ( \alpha ct\right ) \qquad \alpha >0\tag{2} \end{equation} From (1,2) the complete solution is therefore\begin{equation} u\left ( x,t\right ) =\int _{0}^{\infty }A_{\alpha }\cos \left ( \alpha ct\right ) \sin \left ( \alpha x\right ) d\alpha \tag{3} \end{equation} Where \(A_{\alpha },C_{\alpha }\) are merged into one constant. Now the last initial condition is applied, which is \(u\left ( x,0\right ) =f\left ( x\right ) \) to the above which gives\[ f\left ( x\right ) =\int _{0}^{\infty }A_{\alpha }\sin \left ( \alpha x\right ) d\alpha \] Hence\[ A_{\alpha }=\frac{2}{\pi }\int _{0}^{\infty }f\left ( x\right ) \sin \left ( \alpha x\right ) dx \] Using the above in (3) gives the final solution as\[ u\left ( x,t\right ) =\frac{2}{\pi }\int _{0}^{\infty }\left ( \int _{0}^{\infty }f\left ( s\right ) \sin \left ( \alpha s\right ) ds\right ) \cos \left ( \alpha ct\right ) \sin \left ( \alpha x\right ) d\alpha \] D’Alambert’s formula method

For the half line, the D’Alambert’s is given by, using \(v_{0}\left ( x\right ) =u_{t}\left ( x,0\right ) \) as the initial velocity\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{2}\left ( f\left ( x+ct\right ) +f\left ( x-ct\right ) \right ) +\frac{1}{2c}\int _{x-ct}^{x+ct}v_{0}\left ( s\right ) ds & & x>ct\geq 0\\ & & \\ \frac{1}{2}\left ( f\left ( x+ct\right ) -f\left ( ct-x\right ) \right ) +\frac{1}{2c}\int _{ct-x}^{x+ct}v_{0}\left ( s\right ) ds & & x\leq ct \end{array} \right . \] Hence, since \(u_{t}\left ( x,0\right ) =0\) in this problem\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{2}\left ( f\left ( x+ct\right ) +f\left ( x-ct\right ) \right ) & & x>ct\geq 0\\ & & \\ \frac{1}{2}\left ( f\left ( x+ct\right ) -f\left ( ct-x\right ) \right ) & & x\leq ct \end{array} \right . \]

________________________________________________________________________________________

5.1.2.2 [366] Left end fixed with specific initial position

problem number 366

Taken from Mathematica DSolve help pages.

Solve for \(u(x,t)\) initial value wave PDE on infinite domain with \(t>0\) and \(x>0\). \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= \sin ^2(x) \hspace{20pt} \pi <x< 2\pi \\ \frac{\partial u}{\partial t}(x,0) &= 0 \end{align*}

And boundary conditions \(u(0,t)=0\)

pict
Figure 5.48:PDE specification

Mathematica

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

Maple

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

Hand solution

Solving on semi-infinite domain \begin{align} u_{tt} & =c^{2}u_{xx}\qquad t>0,x>0\tag{1}\\ u\left ( 0,t\right ) & =0\nonumber \\ u\left ( x,0\right ) & =f\left ( x\right ) =\sin ^{2}\left ( x\right ) \qquad \pi <x<2\pi \nonumber \end{align}

With \(k>0\) and \(u\left ( x,t\right ) <\infty \) as \(x\rightarrow \infty \). This means \(u\left ( x,t\right ) \) is bounded. The general solution to the above PDE was given in problem 5.1.2.1 on page 1717 as (using the D’Alambert’s solution and not the Fourier integral solution)\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{2}\left ( f\left ( x+ct\right ) +f\left ( x-ct\right ) \right ) & & x>ct\geq 0\\ & & \\ \frac{1}{2}\left ( f\left ( x+ct\right ) -f\left ( ct-x\right ) \right ) & & x\leq ct \end{array} \right . \] But \(f\left ( x\right ) =\sin ^{2}\left ( x\right ) \) and the above becomes\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{2}\left ( \sin ^{2}\left ( x+ct\right ) +\sin ^{2}\left ( x-ct\right ) \right ) & & x>ct\geq 0\\ & & \\ \frac{1}{2}\left ( \sin ^{2}\left ( x+ct\right ) -\sin ^{2}\left ( ct-x\right ) \right ) & & x\leq ct \end{array} \right . \] But here \(f\left ( x\right ) \) is restricted to \(\pi <x<2\pi \). Hence the above solution is modified as follows\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\left \{ \begin{array} [c]{ccc}\frac{1}{2}\sin ^{2}\left ( x+ct\right ) & & \pi <x+ct<2\pi \\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}\frac{1}{2}\sin ^{2}\left ( x-ct\right ) & & \pi <x-ct<2\pi \\ 0 & & \text{otherwise}\end{array} \right . & & x>ct\geq 0\\ & & \\ \left \{ \begin{array} [c]{ccc}\frac{1}{2}\sin ^{2}\left ( x+ct\right ) & & \pi <x+ct<2\pi \\ 0 & & \text{otherwise}\end{array} \right . -\left \{ \begin{array} [c]{ccc}\frac{1}{2}\sin ^{2}\left ( ct-x\right ) & & \pi <ct-x<2\pi \\ 0 & & \text{otherwise}\end{array} \right . & & 0<x\leq ct \end{array} \right . \]

________________________________________________________________________________________

5.1.2.3 [367] Logan page 115, left end fixed with source

problem number 367

This is problem at page 115, David J Logan textbook, applied PDE textbook.

Falling cable lying on a table that is suddenly removed. \[ u_{tt} = c^2 u_{xx} - g \] With boundary condition \begin{align*} u(0,t) &= 0 \end{align*}

And initial conditions \begin{align*} u(x,0) &= 0 \\ \frac{\partial u}{\partial t}(x,0) &= 0 \end{align*}

pict
Figure 5.49:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \frac{1}{2} g \left (\left (t-\frac{x}{c}\right )^2 \theta \left (t-\frac{x}{c}\right )-t^2\right )-c_1 \delta \left (t-\frac{x}{c}\right )\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =1/2\,{\frac{g}{{c}^{2}} \left ({\it Heaviside} \left ( t-{\frac{x}{c}} \right ) \left ( ct-x \right ) ^{2}-{t}^{2}{c}^{2} \right ) }\]

________________________________________________________________________________________

5.1.2.4 [368] Left moving boundary condition

problem number 368

Solve for \(u(x,t)\) with \(t>0\) and \(x>0\) \[ \frac{\partial ^2 u}{\partial t^2} = c^2 \frac{\partial ^2 u}{\partial x^2} \] With boundary conditions \begin{align*} u(0,t) &= g(t) \end{align*}

With initial conditions \begin{align*} \frac{\partial u}{\partial t}(x,0) &=0 \\ u(x,0) &= 0 \end{align*}

pict
Figure 5.50:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} 0 & x>c t \\ g\left (t-\frac{x}{c}\right ) & x\leq c t \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}\]

Maple

\[u \left ( x,t \right ) ={\it Heaviside} \left ( t-{\frac{x}{c}} \right ) g \left ({\frac{ct-x}{c}} \right ) \]

________________________________________________________________________________________

5.1.2.5 [369] moving Left end

problem number 369

Taken from Mathematica DSolve help pages. Initial value problem with a Neumann condition on the half-line. \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= \sin ^3(x) \\ \frac{\partial u}{\partial t}(x,0) &= 1-e^{- \frac{x}{10}} \end{align*}

And boundary conditions \(\frac{\partial u}{\partial x}(0,t)=1\)

pict
Figure 5.51:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} 0 & x>c t \\ g\left (t-\frac{x}{c}\right ) & x\leq c t \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =1/2\,{\frac{\cases{ \left ( \sin \left ( ct+x \right ) \right ) ^{3}c- \left ( \sin \left ( ct-x \right ) \right ) ^{3}c+2\,ct+10\,{{\rm e}^{-1/10\,ct-x/10}}-10\,{{\rm e}^{1/10\,ct-x/10}}&$ct<x$\cr 10\,{{\rm e}^{-1/10\,ct-x/10}}+10\,{{\rm e}^{-1/10\,ct+x/10}}+ \left ( \sin \left ( ct-x \right ) \right ) ^{3}c+ \left ( \sin \left ( ct+x \right ) \right ) ^{3}c-20-2\,{c}^{2}t+ \left ( 2\,t+2\,x \right ) c&$x<ct$\cr }}{c}}\]

________________________________________________________________________________________

5.1.2.6 [370] I.C. at \(t=1\)

problem number 370

Added December 20, 2018.

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018 Solve \[ u_{tt} = u_{xx} \] With initial conditions \begin{align*} u(x,1) &= e^{-(x-6)^2}+e^{-(x+6)^2} \\ \frac{\partial u}{\partial t}(x,1) &= \frac{1}{2} \end{align*}

And boundary conditions \(\frac{\partial u}{\partial x}(0,t)=1\)

pict
Figure 5.52:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} 0 & x>c t \\ g\left (t-\frac{x}{c}\right ) & x\leq c t \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}\]

Maple

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

________________________________________________________________________________________

5.1.2.7 [371] B.C. at \(x=1\)

problem number 371

Added December 20, 2018.

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

Solve \[ \frac{\partial ^2 u}{\partial t^2} = \frac{1}{4} \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) &= 0 \end{align*}

And Boundary conditions \(\frac{\partial u}{\partial x}(1,t)= 0\)

pict
Figure 5.53:PDE specification

Mathematica

Failed

Maple

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

________________________________________________________________________________________

5.1.2.8 [372] Left end free. zero initial velocity (general solution)

problem number 372

Added July 13, 2019.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= f(x)\\ \frac{\partial u}{\partial t}(x,0) &= 0 \end{align*}

And boundary condition \(\frac{\partial u}{\partial x}(0,t) = 0\).

pict
Figure 5.54:PDE specification

Mathematica

Failed

Maple

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

________________________________________________________________________________________

5.1.2.9 [373] Left end free. zero initial velocity (Special solution)

problem number 373

Added July 14, 2019.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= f(x)\\ \frac{\partial u}{\partial t}(x,0) &= 0 \end{align*}

And boundary condition \(\frac{\partial u}{\partial x}(0,t) = 0\) using \begin{align*} c &= 3\\ f(x) &=\left \{ \begin{array} [c]{cc}1 & 4\leq x\leq 5\\ 0 & \text{otherwise}\end{array} \right . \end{align*}

pict
Figure 5.55:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) =1/2\,\cases{ \left ( \cases{1&$4<6\,t+x$\ and \ $6\,t+x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t+x \right ) + \left ( \cases{1&$4<x-6\,t$\ and \ $x-6\,t<5$\cr 0&otherwise\cr } \right ) \left ( -3\,t+x \right ) &$3\,t<x$\cr \left ( \cases{1&$4<6\,t+x$\ and \ $6\,t+x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t+x \right ) + \left ( \cases{1&$4<x$\ and \ $x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t-x \right ) &$x<3\,t$\cr }\]

Hand solution

Solve \(\frac{\partial ^{2}u}{\partial t^{2}}=c^{2}\frac{\partial ^{2}u}{\partial x^{2}}\) for \(x\geq 0,t\geq 0\) with initial conditions \(u\left ( x,0\right ) =f\left ( x\right ) =\left \{ \begin{array} [c]{cc}1 & 4\leq x\leq 5\\ 0 & \text{otherwise}\end{array} \right . \) and \(\frac{\partial u\left ( x,0\right ) }{\partial t}=0\) and boundary condition \(\frac{\partial u\left ( 0,t\right ) }{\partial x}=0\) (Free end)

The general solution by D’Almbert’s is given by\[ u\left ( x,t\right ) =\frac{1}{2}\left \{ \begin{array} [c]{ccc}f\left ( x+ct\right ) +f\left ( x-ct\right ) & & x>ct\geq 0\\ f\left ( x+ct\right ) +f\left ( ct-x\right ) & & x\leq ct \end{array} \right . \] But \(f\left ( x\right ) \) is defined for \(4\leq x\leq 5\) only, hence the solution becomes\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x+ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x-ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . & & x>ct\geq 0\\ & & \\ \left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x+ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( ct-x\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . & & 0<x\leq ct \end{array} \right . \] Animation is below

Source code used for the above

pict
Figure 5.56:Source code
pict
Figure 5.57:Code for animation

________________________________________________________________________________________

5.1.2.10 [374] Left end fixed. zero initial velocity (Special solution)

problem number 374

Added January 9, 2020.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= f(x)\\ \frac{\partial u}{\partial t}(x,0) &= 0 \end{align*}

And boundary condition \(u(0,t) = 0\) using \begin{align*} c &= 3\\ f(x) &=\left \{ \begin{array} [c]{cc}1 & 4\leq x\leq 5\\ 0 & \text{otherwise}\end{array} \right . \end{align*}

pict
Figure 5.58:PDE specification

Mathematica

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

Maple

\[u \left ( x,t \right ) =1/2\,\cases{ \left ( \cases{1&$4<6\,t+x$\ and \ $6\,t+x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t+x \right ) - \left ( \cases{1&$4<x$\ and \ $x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t-x \right ) &$x<3\,t$\cr \left ( \cases{1&$4<6\,t+x$\ and \ $6\,t+x<5$\cr 0&otherwise\cr } \right ) \left ( 3\,t+x \right ) + \left ( \cases{1&$4<x-6\,t$\ and \ $x-6\,t<5$\cr 0&otherwise\cr } \right ) \left ( x-3\,t \right ) &$3\,t<x$\cr }\]

Hand solution

Solve \(\frac{\partial ^{2}u}{\partial t^{2}}=c^{2}\frac{\partial ^{2}u}{\partial x^{2}}\) for \(x\geq 0,t\geq 0\) with initial conditions \(u\left ( x,0\right ) =f\left ( x\right ) =\left \{ \begin{array} [c]{cc}1 & 4\leq x\leq 5\\ 0 & \text{otherwise}\end{array} \right . \) and \(\frac{\partial u\left ( x,0\right ) }{\partial t}=0\) and boundary condition \(u\left ( 0,t\right ) =0\) (Fixed end)

The general solution by D’Almbert’s is given by\[ u\left ( x,t\right ) =\frac{1}{2}\left \{ \begin{array} [c]{ccc}f\left ( x+ct\right ) +f\left ( x-ct\right ) & & x>ct\geq 0\\ f\left ( x+ct\right ) -f\left ( ct-x\right ) & & x\leq ct \end{array} \right . \] But \(f\left ( x\right ) \) is defined for \(4\leq x\leq 5\) only, hence the solution becomes\[ u\left ( x,t\right ) =\left \{ \begin{array} [c]{ccc}\left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x+ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x-ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . & & x>ct\geq 0\\ & & \\ \left \{ \begin{array} [c]{ccc}\frac{1}{2}f\left ( x+ct\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . +\left \{ \begin{array} [c]{ccc}-\frac{1}{2}f\left ( ct-x\right ) & & 4\leq x\leq 5\\ 0 & & \text{otherwise}\end{array} \right . & & 0<x\leq ct \end{array} \right . \] Animation is below

Source code used for the above

pict
Figure 5.59:Source code

________________________________________________________________________________________

5.1.2.11 [375] Left end free. zero initial position (general solution)

problem number 375

Added July 14, 2019.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= 0\\ \frac{\partial u}{\partial t}(x,0) &= g(x) \end{align*}

And boundary condition \(\frac{\partial u}{\partial x}(0,t) = 0\).

pict
Figure 5.60:PDE specification

Mathematica

Failed

Maple

\[u \left ( x,t \right ) =1/2\,{\frac{\cases{\int _{-ct+x}^{ct+x}\!g \left ( \zeta \right ) \,{\rm d}\zeta& $ct<x$\cr \int _{0}^{ct+x}\!g \left ( \zeta \right ) \,{\rm d}\zeta +\int _{0}^{ct-x}\!g \left ( \zeta \right ) \,{\rm d}\zeta& $x<ct$\cr }}{c}}\]

________________________________________________________________________________________

5.1.2.12 [376] Left end free. Non zero initial position and velocity (general solution)

problem number 376

Added July 14, 2019.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ u_{tt} = c^2 u_{xx} \] With initial conditions \begin{align*} u(x,0) &= f(x)\\ \frac{\partial u}{\partial t}(x,0) &= g(x) \end{align*}

And boundary condition \(\frac{\partial u}{\partial x}(0,t) = 0\).

pict
Figure 5.61:PDE specification

Mathematica

Failed

Maple

\[u \left ( x,t \right ) =1/2\,\cases{f \left ( ct+x \right ) +f \left ( -ct+x \right ) +{\frac{\int _{-ct+x}^{ct+x}\!g \left ( \zeta \right ) \,{\rm d}\zeta }{c}}&$ct<x$\cr{\frac{f \left ( ct-x \right ) c+f \left ( ct+x \right ) c+\int _{0}^{ct+x}\!g \left ( \zeta \right ) \,{\rm d}\zeta +\int _{0}^{ct-x}\!g \left ( \zeta \right ) \,{\rm d}\zeta }{c}}&$x<ct$\cr }\]

________________________________________________________________________________________

5.1.2.13 [377] Left end free with source

problem number 377

Added December 20, 2018.

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

Left end free with initial position and velocity given.

Solve for \(u(x,t)\) with \(x>0,t>0\) \[ \frac{\partial ^2 u}{\partial t^2} = 9 \frac{\partial ^2 u}{\partial x^2} + f(x,t) \] With initial conditions \begin{align*} u(x,0) &= 0\\ \frac{\partial u}{\partial t}(x,0) &= x^3 \end{align*}

And boundary condition \(\frac{\partial u}{\partial x}(0,t) = 0\).

pict
Figure 5.62:PDE specification

Mathematica

\[\left \{\left \{u(x,t)\to 3 c_1 \delta (3 t-x)+\frac{1}{12} (x-3 t)^4 \theta \left (t-\frac{x}{3}\right )+9 t^3 x+t x^3\right \}\right \}\]

Maple

\[u \left ( x,t \right ) =\cases{9\,{t}^{3}x+t{x}^{3}&$3\,t<x$\cr{\frac{27\,{t}^{4}}{4}}+9/2\,{t}^{2}{x}^{2}+1/12\,{x}^{4}&$x<3\,t$\cr }\]

________________________________________________________________________________________