# [SOLVED]Wave Equation Question

#### Cbarker1

##### Active member
Dear Everyone,

Hi. I do not how to begin for the following question:

Ex. 5. Using the solution in Ex. 3, solve the wave equation with initial data

$u(x,t)=\frac{1}{{x}^2+1}$ and $\pd{u}{t}(x,0)=0$ for $x\in(-\infty,\infty)$.
The solution, (I have derived this solution in Ex. 4), that is given in Ex. 3 is the following: $u(x,t)=F(x+ct)+G(x-ct)$

Thanks,
Cbarker1

Last edited:

#### GJA

##### Well-known member
MHB Math Scholar
Hi Cbarker1 ,

What you'll want to use/derive is d'Alembert's formula (see https://en.wikipedia.org/wiki/D'Alembert's_formula for full derivation), which allows us to solve for $F$ and $G$ in terms of the initial data. The starting point for the derivation is to note that $$u(x,0) = f(x) \qquad \Longrightarrow\qquad F(x) + G(x) = f(x)$$ and $$u_{t}(x,0) = g(x) \qquad\Longrightarrow\qquad cF'(x)-cG'(x) = g(x).$$ From here you want to use these two equations to solve for $F$ and $G$ in terms of $f(x)$ and $g(x)$. The end result is $$u(x,t) = \frac{f(x-ct)+f(x+ct)}{2}+\frac{1}{2c}\int_{x-ct}^{x+ct}g(s)ds.$$

#### Cbarker1

##### Active member
Hi Cbarker1 ,

What you'll want to use/derive is d'Alembert's formula (see https://en.wikipedia.org/wiki/D'Alembert's_formula for full derivation), which allows us to solve for $F$ and $G$ in terms of the initial data. The starting point for the derivation is to note that $$u(x,0) = f(x) \qquad \Longrightarrow\qquad F(x) + G(x) = f(x)$$ and $$u_{t}(x,0) = g(x) \qquad\Longrightarrow\qquad cF'(x)-cG'(x) = g(x).$$ From here you want to use these two equations to solve for $F$ and $G$ in terms of $f(x)$ and $g(x)$. The end result is $$u(x,t) = \frac{f(x-ct)+f(x+ct)}{2}+\frac{1}{2c}\int_{x-ct}^{x+ct}g(s)ds.$$
I have not talked about this formula in my lecture yet. So, is there any other method to solve it?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I have not talked about this formula in my lecture yet. So, is there any other method to solve it?
Filling in your general solution in the boundary conditions gives us:
$$u(x,0)=F(x+ct)+G(x-ct)\Big|_{t=0}=F(x)+G(x)=\frac 1{x^2+1}$$
and:
$$\pd{}tu(x,0)=\pd{}t\big(F(x+ct)+G(x-ct)\big)\Big|_{t=0}=cF'(x)-cG'(x)=0$$

Which $F(x)$ and $G(x)$ can we pick so that they solve these 2 equations?

#### Cbarker1

##### Active member
Filling in your general solution in the boundary conditions gives us:
$$u(x,0)=F(x+ct)+G(x-ct)\Big|_{t=0}=F(x)+G(x)=\frac 1{x^2+1}$$
and:
$$\pd{}tu(x,0)=\pd{}t\big(F(x+ct)+G(x-ct)\big)\Big|_{t=0}=cF'(x)-cG'(x)=0$$

Which $F(x)$ and $G(x)$ can we pick so that they solve these 2 equations?
If $G(x)=0$, then $F(x)=\frac{1}{{x}^2+1}$ and $G'(x)=0$. So $F'(x)=0$.

Is that right?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
If $G(x)=0$, then $F(x)=\frac{1}{{x}^2+1}$ and $G'(x)=0$. So $F'(x)=0$.

Is that right?
Not quite. $F'(x)$ is not 0, is it?
Suppose we divide $\frac 1{x^2+1}$ evenly over F and G, would that make it better?

#### Cbarker1

##### Active member
Not quite. $F'(x)$ is not 0, is it?
Suppose we divide $\frac 1{x^2+1}$ evenly over F and G, would that make it better?
No. So if we did divide $\frac{1}{x^2+1}$ evenly over F and G, then it yields

$\frac{F(x)+G(x)}{x^2+1}=\frac{1}{x^2+1} \implies F(x)+G(x)=1$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
No. So if we did divide $\frac{1}{x^2+1}$ evenly over F and G, then it yields

$\frac{F(x)+G(x)}{x^2+1}=\frac{1}{x^2+1} \implies F(x)+G(x)=1$
I meant that we would pick $F(x)=G(x)=\frac 12 \cdot\frac 1{x^2+1}$, so that $F(x)+G(x)=\frac 1{x^2+1}$.
Suppose we fill that in into the boundary conditions?

#### Cbarker1

##### Active member
I meant that we would pick $F(x)=G(x)=\frac 12 \cdot\frac 1{x^2+1}$, so that $F(x)+G(x)=\frac 1{x^2+1}$.
Suppose we fill that in into the the boundary conditions?
Then, the solution would be the following:
$u(x,t)=\frac{1}{2}\left(\frac{1}{{(x+ct)}^{2}+1}+\frac{1}{{(x-ct)}^{2}+1}\right)$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Then, the solution would be the following:
$u(x,t)=\frac{1}{2}\left(\frac{1}{{(x+ct)}^{2}+1}+\frac{1}{{(x-ct)}^{2}+1}\right)$
Indeed. Does it fit the boundary conditions?

#### Cbarker1

##### Active member
Indeed. Does it fit the boundary conditions?
Yes. It does fit the condition.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Yes. It does fit the condition.
Good!
Note that this is basically what the formula of d'Alembert that GJA mentioned says.