2.1.16 (Haberman 12.2.4) \(\omega _t +c \omega _x = 0\) and \(\omega (x,0)=f(x)\) and \(\omega (0,t)=h(t)\)

problem number 16

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["Global`*"]; 
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]];
 

Failed

Maple

restart; 
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 {c h \left (t -\frac {x}{c}\right ) \theta \left (t -\frac {x}{c}\right )+\mathcal {L}^{-1}\left (\left (\int {\mathrm e}^{\frac {s x}{c}} f \left (x \right )d x \right ) {\mathrm e}^{-\frac {s x}{c}}, s , t\right )-\mathcal {L}^{-1}\left (\left (\int _{}^{0}{\mathrm e}^{\frac {\textit {\_a} s}{c}} f \left (\textit {\_a} \right )d \textit {\_a} \right ) {\mathrm e}^{-\frac {s x}{c}}, s , t\right )}{c}\] 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 . \]

____________________________________________________________________________________