Solving wave equation in 1D Is there a nice way to solve this type of question? The Problem:
Let $c > 0$ and $Q = \{(t,x) \in \mathbb{R}^+ \times \mathbb{R}^+ : 0 < x < ct\}$. Determine $\alpha \in \mathbb{R}$ such that
$$
\begin{align*}
 & u_{tt}-c^2u_{xx}=0 & \text{in } Q \\
 & u(t,0)=0 & t \ge 0 \\
 & u_t(t,ct)=\cos t - \alpha & t \ge 0
\end{align*}
$$
has a solution in $C^2(Q) \cap C^1(\overline{Q})$ and give the solution explicitly. As a hint it states that the general solution is of the form
$$
u(t,x) = u_1(x-ct) + u_2(x+ct), \, \text{where } \, u_1,u_2 \in C^2.
$$
 A: Start with the hint given:
\begin{equation}
u(t,x) \;=\; u_1(x-ct) \,+\, u_2(x+ct)
\end{equation}
Enforce the first condition on the solution:
$$
u(t,0) \;=\; u_1(-ct) \,+\, u_2(ct) \;=\; 0 \quad\longrightarrow\quad u_2(z) \;=\; -u_1(-z)
$$
The solution becomes:
$$
u(t,x) \;=\; u_1(x-ct) \,-\, u_1(-x-ct)\, ,\hspace{1.5in}\text(1)
$$
and so
$$
u_t(t,x) \;=\; -c\, {u_1}^{\prime}(x-ct) \,+\, c\, {u_1}^{\prime}(-x-ct)\, .
$$
Take $x = ct$ and enforce the second condition:
$$
u_t(t,ct) \;=\; c\Bigl[{u_1}^{\prime}(-2ct) \,-\, {u_1}^{\prime}(0)\Bigr] \;=\; \cos(t)\,-\,\alpha\hspace{0.75in}\text{(2)}
$$
Setting $t = 0$ on both sides of (2) yields $0 = 1 - \alpha$, and so $\alpha = 1$. With this value of $\alpha$, the solution to (2) is
$$
u_1(z) \;=\; 2 \sin\left(\frac{z}{2c}\right) \,+\,\left({u_1}^{\prime}(0) - \frac{1}{c}\right)z\,+\, \text{constant}\, .\hspace{0.5in}\text{(3)}
$$
Substituting (3) into (1) and simplifying a bit with some trig identities yields the solution
$$
u(t,x) \;=\; 4 \cos\left(\frac{t}{2}\right)\, \sin\left(\frac{x}{2c}\right)\;+\; 2\left({u_1}^{\prime}(0) - \frac{1}{c}\right) x
$$
As far as I can tell, the restrictions in the statement of the problem do not allow the determination of ${u_1}^{\prime}(0)$.
