Solve the Cauchy problem $u_{tt}-c^2u_{xx}=0$ with conditions $$1. \ u(x,0)=g(x)\\2.\ u_t(x,0)=h(x)$$ Where $h(x)=0,\ g(x)=\begin{cases} 0,\ x<0 \\ 1,\ x\ge0 \end{cases}$.
My solution.
The general solution has the form $u(x,t)=F(x-ct)+G(x+ct)$...(*)
Applying 1. condition we have $G(x)=-F(x),\ x<0$ and $G(x)=1-F(x),\ x\ge0.$
Hence (*) is now $u(x,t)=\begin{cases}F(x-ct)-F(x+ct),\ x+ct<0\\F(x-ct)-F(x+ct)+1,\ x+ct\ge0 \end{cases}$
Applying 2. condition we have $0=-2cF'(x),\ x<0$ and $0=-2cF'(x),\ x\ge0.$
This implies $F'(x)=0$, hence $F=c$ is a constant.
Therefore $u(x,t)=\begin{cases}0,\ x<0\\1,\ x\ge0 \end{cases}$
Is this solution correct?