Suppose that I am doing some sort of derivation when I have reached an expression
$$f(y) = e^{y^2}$$
At this point I would like to define $g(y) = y^2 = x$, then
$$f(y) = e^{g(y)}$$
Can I say that: "$f(x) = e^x$ under the change of variable $x := g(y)$"?
I am asking because technically $f$ is not a function of $g(y)$ but a function of $y$, I would be more comfortable if I had $f(g(y)) = e^{g(y)}$, then letting $x = g(y)$ we have $f(x) = e^x$. What is the best way to redefine $f(y)$ in terms of $x$?
$f$ is a function of $g(y)$ in the $y$ and $f(y)$ coordinate system. But in the $x$ and $f(x)$ coordinate system then $f$ is a function of $x$. When you say $f(x)$ you mean that you are going to write $f$ in terms of $x$ in this case $f(x) = e^x$ but $x=x(y)$ so you can also write this more explicitly as $$f(x(y))=e^{x(y)}$$.
The use of $g$ is superfluous.