I want to define function in Mathematica on different way. Actually, if I already have functions a and b. How can I print the value in some point of function f but without defining functions a and b like f. I dont want to use this before a[x_]:=..., b[x_]:=... because a and b I obtained different and I can not change everything above in my code because of this.
a = x;
b = 2*x;
f[x_] := a + b;
f[2]
3 x
. Isn't this what you want? It is not at all clear what you are asking. – Verbeia Jan 16 '12 at 14:14