# Why am I not getting Indeterminate for f[1] when f[x_] = (x - 1)/(x - 1)? [closed]

In Mathematica 9 If I write:

f[x_] = (x - 1)/(x - 1)


I get

1


And if then I write:

f[1]


I get

1


But if I write:

(1 - 1)/(1 - 1)


I get:

Indeterminate


Why am I not getting Indeterminate for f[1] when f[x_] = (x - 1)/(x - 1) ?

What am I doing wrong?

-
if you had written f[x_]:= instead of f[x_]= then you would get this message as well. Lookup the difference between := and = – Nasser Jan 3 at 7:31

## closed as too localized by Yves Klett, Simon Woods, Artes, rm -rf♦Jan 3 at 14:18

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Thanks to @Nasser comment, I found my mistake, I was using = instead of :=. The basic difference between these forms is when the expression is evaluated. = is an immediate assignment, which is evaluated at the time when the assignment is made. := on the other hand, is a delayed assignment, which is not evaluated when the assignment is made, but is instead evaluated each time its value is requested, more info here: http://reference.wolfram.com/mathematica/tutorial/ImmediateAndDelayedDefinitions.html