Equation: u$_x$ + $\frac{x}{y}$u$_y$ = 0. Initial condition: u(0, y) = exp(-y$^2$)
My professor found the solution u(x, y) = f(y$^2$ - x$^2$) using characteristic curves
He then evaluated u(0, y) = f(y$^2$)
His final answer was u(x, y) = exp(-(y$^2$-x$^2$)).
I understand everything up until the last two lines - how did he get from the $2$nd to last line to the final line of working?