Let $\phi \in C^2(0,+\infty)$ and suppose $u(x,t)=\phi(\frac{x}{t})$ solves the one dimensional wave equation $u_{tt}-u_{xx}=0$ for $x>0,t>0$. Show that there exist constant $A,B$ such that $$u(x,t)=A\ln(\frac{t+x}{t-x})+B$$ for $0<x<t$.
My attempt:
The solution for one dimensional wave equation is $$u(x,t)=\frac{1}{2}[g(x-ct)+g(x+ct)]+\frac{1}{2c}\int_{x-ct}^{x+ct}h(s)ds$$ when $u(x,0)=g(x),u_t(x,0)=h(x)$. However, here no information about $u(x,0)$ and $u_t(x,0)$ is given. I have no clue about how to proceed.
Could someone kindly help? Thanks!
Let's denote $r=\frac{x}{t}$, so that $u(x,t)=\phi(r)$. Derivate by the chain rule $$ u_x=\phi'(r)r_x=\phi'(r)\frac1t,\quad u_t=\phi'(r)r_t=\phi'(r)\left(-\frac{x}{t^2}\right),\\ u_{xx}=\phi''(r)\frac{1}{t^2},\quad u_{tt}=\phi''(r)\frac{x^2}{t^4}+\phi'(r)\frac{2x}{t^3} $$ and substitute into $u_{tt}-u_{xx}=0$ $$ \phi''(r)\frac{x^2}{t^4}+\phi'(r)\frac{2x}{t^3}-\phi''(r)\frac{1}{t^2}= \frac{1}{t^2}\left(\phi''(r)r^2+\phi'(r)2r-\phi''(r)\right)=0. $$ Thus we get en equivalent ODE with respect to the function $\phi$ $$ (r^2-1)\phi''+2r\phi'=0\quad\Leftrightarrow\quad \bigl((r^2-1)\phi'\bigr)'=0\quad\Leftrightarrow\quad \phi'=\frac{C}{1-r^2}\quad\Leftrightarrow\quad \\ \quad\Leftrightarrow\quad [\text{set } A=C/2]\quad \phi'=\frac{A}{1+r}+\frac{A}{1-r}\quad\Leftrightarrow\quad \phi=A\ln\frac{1+r}{1-r}+B. $$ Coming back to the original variables $$ u(x,t)=\phi(x/t)=A\ln\frac{t+x}{t-x}+B. $$