Hi,
sorry, I do not get the question. Why do you say that fz[3] does not evaluate? Doesn't Mathematica do exactly what you would expect it to do?
By definition fz does not depend on
$z$. So I would expect it to evaluate to
$y$. But input 18 defines
$y$ as
$\frac{z^2}{2}$. So after fz evaluates to
$y$ this is substituted by
$\frac{z^2}{2}$. So Mathematica's result is as expected. I understand that this is not the result you expect. Would you have expected something like this?
ClearAll["Global`*"]
y[z_] := Evaluate[Integrate[z, z]]
fz[z_] := y[z]
fz[3]
This evaluates to
$\frac{9}{2}$. By using the delayed evaluations I have changed to order of evaluations.
Cheers,
Marco