# Explanation to PDE $u_{tt}-c^2u_{xx}=0$ solution

Exercise: Solve the Cauchy problem $u_{tt}-c^2u_{xx}=0$ with conditions $u(x,0)=g(x)$ and $u_t(x,0)=h(x)$, where $g(x)=0,\ h(x)=\begin{cases} 0,\ x<0 \\ 1,\ x\ge0 \end{cases}$.

Please ignore this 'solution' and see Felix Marin's solution

Solution:

By D'Alembert formula I get

$$u(x,t)=\dfrac{1}{2c}\int_{x-ct}^{x+ct}0 \,\mathrm{d}s=0,\quad x<0.$$ and $$u(x,t)=\dfrac{1}{2c}\int_{x-ct}^{x+ct}1 \,\mathrm{d}s=t.\quad x\ge0.$$

Thus the answer is $0,\ if\ x<0\ and\ t,\ if\ x\ge 0$.

$\color{fuchsia}{Questions\ about\ the\ answer\ given\ by\ Marin.}$

1. Why the integral of $F'(x)=-\dfrac{1}{2}h(x)$ is $F(x)-F(a)|_{a<0}$ ? Why $a<0$?

2. Why $$\frac{-1}{2}\int_{a}^xh(ε) \,\mathrm{d}ε =\frac{-1}{2}H(x) \int_{0}^xh(ε) \,\mathrm{d}ε?$$

According to Wikipedia, $H(x)=\int_{-\infty}^x δ(ε) \,\mathrm{d}ε$.

If there is an alternative solution, maybe an easier one, please show it :)

• I upvoted your question for the efforts you have shown – Isham Mar 26 '18 at 1:37
• :) thanks @Isham I'm new in this topics so.. – Isa Mar 26 '18 at 1:43

$\def\d{\mathrm{d}}$By d'Alembert's formula,$$u(x, t) = \frac{1}{2c} \int_{x - ct}^{x + ct} h(s) \,\d s.$$

For $x \leqslant -ct$,$$u(x, t) = \frac{1}{2c} \int_{x - ct}^{x + ct} h(s) \,\d s = \frac{1}{2c} \int_{x - ct}^{x + ct} 0 \,\d s = 0.$$ For $-ct < x \leqslant ct$,$$u(x, t) = \frac{1}{2c} \int_{x - ct}^{x + ct} h(s) \,\d s = \frac{1}{2c} \int_0^{x + ct} 1 \,\d s = \frac{1}{2c} (x + ct).$$ For $x > ct$,$$u(x, t) = \frac{1}{2c} \int_{x - ct}^{x + ct} h(s) \,\d s = \frac{1}{2c} \int_{x - ct}^{x + ct} 1 \,\d s = t.$$ Thus$$u(x, t) = \begin{cases} 0; & x \leqslant -ct\\ \dfrac{1}{2c} (x + ct); & -ct < x \leqslant ct\\ t; & x > ct \end{cases}$$

• Thank you for your help Alex! – Isa Mar 29 '18 at 21:51
• Why for $-ct<x\le ct,\ \int_{x-ct}^{x+ct}=\int_0^{x+ct}$ ? – Isa Mar 29 '18 at 21:53
• Yes, I see it now. When you are going to use d'Alembert formula, Is it a rule of thumb to always analyse the cases for $x$ like this: $x\le ct,-ct<x\le ct$ and $x<ct$? – Isa Mar 30 '18 at 0:37
• @Isa It depends on the discontinuous points of boundary conditions. In this case, $h$ is discontinuous at $x=0$, so it's necessary to separate the cases in which $x+ct>0$ or not and $x-ct>0$ or not. – Saad Mar 30 '18 at 0:53
• hmm how do you get the inequalities then $(x\le -ct)$ if you are only considering strict inequalities $x+ct>0$ or not and $x-ct>0$ or not ? – Isa Mar 30 '18 at 1:06

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Lets start from the very beginning. Lets $\ds{\mrm{u}\pars{x,t} = \mrm{F}\pars{x - t} + \mrm{G}\pars{x + t}}$ with the scaling $\ds{ct \mapsto t}$.

$$0 = \mrm{u}\pars{x,0} = \mrm{F}\pars{x} + \mrm{G}\pars{x} \implies \mrm{G}\pars{x} = -\,\mrm{F}\pars{x}$$ The solution becomes $\ds{\mrm{u}\pars{x,t} = \mrm{F}\pars{x - t} - \mrm{F}\pars{x + t}}$ and

\begin{align} &\mrm{h}\pars{x} = \mrm{u}_{t}\pars{x,0} = -\mrm{F}'\pars{x} - \mrm{F}'\pars{x} \implies \mrm{F}'\pars{x} = -\,{1 \over 2}\mrm{h}\pars{x} \\[5mm] &\ \mrm{F}\pars{x} - \left.\vphantom{\Large A}\mrm{F}\pars{a}\right\vert_{\ a\ <\ 0}= -\,{1 \over 2}\int_{a}^{x}\mrm{h}\pars{\xi}\,\dd\xi = -\,{1 \over 2}\,\mrm{H}\pars{x}\int_{0}^{x}\mrm{h}\pars{\xi}\dd\xi = -\,{1 \over 2}\,\mrm{H}\pars{x}x \end{align}

where $\ds{\mrm{H}}$ is the Heaviside Step Function.

$$\bbx{\mrm{u}\pars{x,t} = {\mrm{H}\pars{x + t}\pars{x + t} - \mrm{H}\pars{x - t}\pars{x - t}\over 2}}$$

• @Isham I think Felix is using $h$ to denote the heaviside function $h(\cdot) = 1, x \ge 0$ and $0$ otherwise. Not to be confused with the initial condition $h$. Maybe the solution would be better written as $$u(x,t) = \frac{1}{2} \bigg[ H(x+t)(x+t) - H(x-t)(x-t) \bigg]$$ – Mattos Mar 26 '18 at 1:26
• Oh thanks @Mattos – Isham Mar 26 '18 at 1:27
• Why the therm $h(x)$ appears when you change the lower limit of integral ? – Isa Mar 26 '18 at 1:33
• @Mattos $0$ k. Fixed. Thanks. – Felix Marin Mar 26 '18 at 1:34
• @FelixMarin its better now less confusing Thanks +1 – Isham Mar 26 '18 at 1:35