# determine solution of the form $\ u(x,t)=g(\frac{x}{t}) \$ to $\ u_t+uu_x=0 \$

The below transition has been made as starting point to this problem

$$0=u_t+uu_x=\frac{1}{t} g' (g-\frac{x}{t})$$

How $\frac{1}{t} g' (g-\frac{x}{t})$ was derived ? I don't understand it.

This is the example 1.13 from the textbook (p.19 http://people.uncw.edu/hermanr/pde1/PDEbook/PDE_Main.pdf)

Okay so you start with $u_t + u u_x$ and you force your function $u(x,t)$ to look like $g(\frac{x}{t})$ i.e. $u(x,t) = g(\frac{x}{t})$ like you said. Now in our differential equation we have a $u_t$ and a $u_x$ so lets compute those in terms of our new function $g$. $$u_t \equiv \frac{\partial}{\partial t}u(x,t) = \frac{\partial}{\partial t}g(\tfrac{x}{t}) = \frac{\partial (\tfrac{x}{t})}{\partial t}\frac{\partial g(\tfrac{x}{t})}{\partial (\tfrac{x}{t})} = -\frac{xg'}{t^2}$$ Now lets compute $u_x$ $$u_x \equiv \frac{\partial }{\partial x}u(x,t) = \frac{\partial}{\partial x}g(\tfrac{x}{t}) = \frac{\partial (\tfrac{x}{t})}{\partial x}\frac{\partial g(\tfrac{x}{t})}{\partial (\tfrac{x}{t})} = \frac{g'}{t}.$$ So now lets plug these back into our differential equation to obtain $$u_t + uu_x = -\frac{xg'}{t^2} + g\frac{g'}{t} = \frac{g'}{t}\left(g - \frac{x}{t}\right).$$