wave equation with moving end 
Solve the wave equation with moving end:
$$
\begin{aligned}
u_{t t} &=c^{2} u_{x x} \text { for } x>0, t>0 \\
u(x, 0) &=\varphi(x), u_{t}(x, 0)=\psi(x) \text { for } x \geq 0 \\
u(0, t) &=f(t) \text { for } t \geq 0
\end{aligned}
$$

Suppose $x_{0} \geq c t_{0}$. Now $\left[x_{0}-c t_{0}, x_{0}+c t_{0}\right]$ lies entirely on the nonnegative part of the $x$ - axis, and not enough time has passed for the initial displacement $f(t)$ at time zero to reach any point in this interval. In this case, $u\left(x_{0}, t_{0}\right)$ is not influenced by $f$ and the d'Alembert formula holds.
$$
u\left(x_{0}, t_{0}\right)=F\left(x_{0}-c t_{0}\right)+B\left(x_{0}+c t_{0}\right) \text { for } x_{0} \geq c t_{0}
$$
$F$ and $B$ are the forward and backward waves.
$\psi(x)$ are not defined for $x_{0}-c t_{0}<x<0$; hence $F\left(x-c t_{0}\right)$ is not defined. However, putting $x=0$ yields
$$
u\left(0, t_{0}\right)=f\left(t_{0}\right)=F\left(-c t_{0}\right)+B\left(c t_{0}\right) .
$$
This suggests that we can extend $F$ to this negative value by defining
$$
F\left(-c t_{0}\right)=f\left(t_{0}\right)-B\left(c t_{0}\right) .
$$
Both function values on the right are well defined. Further, since $t_{0}$ can be any positive number, we can think of $c t_{0}$ as any positive number and use this equation as a model to define
$$
F(-x)=f\left(\frac{x}{c}\right)-B(x)
$$
for any positive number $x$. This extends $F$ to negative values. For simplicity, we are using the same symbol $F$ for the extended function. Now put, for $x_{0}-c t_{0}<0$
$$
\begin{aligned}
F\left(x_{0}-c t_{0}\right) &=F\left(-\left(c t_{0}-x_{0}\right)\right) \\
&=f\left(\frac{c t_{0}-x_{0}}{c}\right)-B\left(c t_{0}-x_{0}\right)
\end{aligned}
$$
or
$$
F\left(x_{0}-c t_{0}\right)=f\left(t_{0}-\frac{x_{0}}{c}\right)-B\left(c t_{0}-x_{0}\right) .
$$
Substituting this into d'Alembert's solution, we have
$$
u\left(x_{0}, t_{0}\right)=f\left(t_{0}-\frac{x_{0}}{c}\right)-B\left(c t_{0}-x_{0}\right)+B\left(x_{0}+c t_{0}\right) \text { for } x_{0}-c t_{0}<0
$$
In view of the definition of the backward wave $B$, this equation can be written
$$
\begin{aligned}
u\left(x_{0}, t_{0}\right) &=f\left(t_{0}-\frac{x_{0}}{c}\right)+\frac{1}{2}\left(\varphi\left(x_{0}+c t_{0}\right)-\varphi\left(c t_{0}-x_{0}\right)\right) \\
&+\frac{1}{2 c} \int_{c t_{0}-x_{0}}^{x_{0}+c t_{0}} \psi(s) d s \text { for } x_{0}<c t_{0}
\end{aligned}
$$
We have used the zero subscript to discuss the solution at a particular point and maintain $x$ and $t$ as variables. However, we now drop the subscript and write the solution at any $(x, t)$ with $x \geq 0, t \geq 0$ :
$$ \bbox[5px, border:2px solid black]
{\begin{aligned}
u(x, t) &=\frac{1}{2}(\varphi(x-c t)+\varphi(x+c t)) \\
&+\frac{1}{2 c} \int_{x-c t}^{x+c t} \psi(s) d s \text { for } x \geq c t\\
u(x, t) &=f\left(t-\frac{x}{c}\right)+\frac{1}{2}(\varphi(x+c t)-\varphi(c t-x)) \\
&+\frac{1}{2 c} \int_{c t-x}^{x+c t} \psi(s) d s \text { for } x<c t
\end{aligned}}
$$

I didn't understand the bolded lines, like why we split the domain in $x< ct \& x\geq ct$? And what was mean by, and not enough time has passed for the initial displacement $f(t)$ at time zero to reach any point in this interval. In this case, $u\left(x_{0}, t_{0}\right)$ is not influenced by $f$ and the d'Alembert formula holds.
I copy the whole page of Beginning partial differential equations by Peter V. O'Neil, page: 134, section: 4.5
Any help will be appreciated, Thanks in advance.
 A: For ease of explanation let us consider a vibrating string obeying the PDE in your question. At time $t=0$ the string is in position $\varphi(x)$ and
is released with initial velocity $\psi(x).$ You can interpret the condtion $u(0,t) = f(t)$ as disturbing the left endpoint of the string over time. Since the wave travels with speed $c,$
this disturbance propagates with the same speed.
Now, suppose you start from the initial conditions and you let time pass by. Consider a point $x_0$ of the spatial domain at time $t_0$.
The condition $x_0>ct_0$ means that the disturbance that you caused at time $t=0$ has not reached this far. This point does not know yet that there was a disturbance.
Therefore it obeys the same PDE (located at this point, as if it has started at time $t=t_0$) but with $u(x_0,t_0) =0.$ Hence you can write the solution by d'Alemberts formula.
If the point $(x_0, t_0)$ is such that $x_0 < ct_0,$ then that point has seen your disturbance that has travelled along the string.
I hope it helps a bit.
