# Wave equation, d'Alembert's formula

$$u_{tt}=u_{xx}, -\infty <x<\infty$$

$$u(x,0)=\left\{\begin{matrix} 0, &|x|>2 \\ 2x-1, & 1<|x|\leq 2\\ 3-x &, |x|\leq 1 \end{matrix}\right.$$

$$u_{t}(x,0)=\left\{\begin{matrix} 0, &|x|>2 \\ 1, & |x|\leq 2 \end{matrix}\right.$$

Find $u(0,t)$?

What I have done.. I want to use the d'Alembert's formula: $$u(x,t)=\frac{f(x+ct)+f(x-ct)}{2}+ \frac{1}{2c}\int_{x-ct}^{x+ct}g(s)ds$$

In our case:$x=0, t=t, c=1$. But there I'm stuck and I don't know how to continue...

Thank you!

-
I am taking this course too I can try to assist.. – Frudrururu Feb 25 '13 at 10:52
Ok so first step: Let us say that $g(x)=u_t(x,0)$ and say that $G(x)$ is an antiderivative of $g(x)$. Then we have that for $x \leq -2$ that $G(x)=0$ and for $-2<x<2$ we have that $G(x)=\int_{-2}^x 1 \mathrm{d}w$ and for $x \geq 2$ that $G(x)=\int_{-2}^2 1 \mathrm{d}w$. Now we have an expression for the antiderivative of $g$ so we look at now $\int_{x-ct}^{x+ct}g(x)\mathrm{d}s$. Then we know $f(x)=u(x,0)$. – Frudrururu Feb 25 '13 at 11:02
So I guess you can just add the functions where they are defined in the same interval kind of thing loosely speaking lol – Frudrururu Feb 25 '13 at 11:06
@Wishingwell Is that an online course of some sort? – user53153 Feb 25 '13 at 14:16
Why are you deleting the equations in your questions? Please don't do that. (Someone will just roll back the change.) – Rahul Mar 7 '13 at 21:22

Having taken note of the initial conditions, you should plug them into the d'Alembert formula: $$u(0,t)=\frac{f(t)+f(-t)}{2}+\frac12 \int_{-t}^{t}g(s)\,ds \tag1$$ It helps that $g$ is an even functions: $g(-t)=g(t)$. This simplifies the integral, because both halves of the interval $[-t,t]$ contribute the same: $\int_{-t}^{t}g(s)\,ds = 2\int_{0}^{t}g(s)\,ds$. After the simplification, $$u(0,t)=\frac{f(t) +f(-t)}{2}+ \int_{0}^{t}g(s)\,ds \tag2$$ does not look too bad. You just have to write it case-by-case depending on what $t$ is,
because your $f$ and $g$ are case-defined.