f(x) = x^2 vs. f(t) = t^2
They are, because they produce the same set of ordered pairs (input, output).Some of the confusion is the fault of math profs, because we get lazy. We could say "the function f: R -> R defined by f(x) = x^2", but we wind up saying "the function f(x)" (wrong - f is the function, f(x) is the value when x is plugged in) or worse "the function x^2" (really wrong). But if you always say the absolutely correct thing "the function f: R -> R defined by f(x) = x^2" you sound really pedantic, and the extra words make it hard for students to comprehend. Oh well.
What was more confusing to people was if you had f(t) = t^2 and people thought "t" had some sort of independent existence outside the definition of f. Some guy was asking me about it and I was trying various explanations and he wasn't getting it. Then I remembered he was a CS major and I said "t is an argument to f and it's local to the function block" and he got it and nodded his head.
So I wonder if these kinds of distinctions are easier for programmers than for typical math students - in the sense that programmers would know there's no difference between these:
int f(int x)
{
return x * x;
}
int f(int t)
{
return t * t;
}