Definition:
functionB2[x_] := model /. fit
is a Mathematica instruction to replace all future occurrences of an expression that looks like functionB2[x_] with the result of substituting the argument value for each occurrence of x in the model /. fit expression model /. fit model /. fit . But in model /. fit model /. fit no occurrences of x : the only characters in this expression are model and fit (and, technically, ReplaceAll ). Therefore, the definition returns a fixed result of model /. fit model /. fit , regardless of the argument. Indeed, the definition may simply be:
functionB2a[] := model /. fit
If you build functionB2a[] , you will get the same result as you built functionB2[anything] . What for? Because Plot will evaluate this expression when changing the symbol x over the range of the graph. It so happened that model /. fit model /. fit evaluates the expression that includes this character, so you get an exposed graph.
Now consider functionB1 :
functionB1[x_] = model /. fit
He also says to replace all occurrences of x on the right side, but this time the right side is evaluated before defining the definition. The result of evaluating model /. fit model /. fit is an expression that contains the character x , so now the definition is sensitive to the argument passed. The end result is as if the function was defined in this way:
functionB1a[x_] := 4/Sqrt[3]-0.335/(0.435+x)^2+0.347/(0.712+x)^4-0.27/(4.29+x)
So, if you build functionB1[Sqrt[x]] , the Plot command will see the expression:
4/Sqrt[3]-0.335/(0.435 +Sqrt[x])^2+0.347/(0.712 +Sqrt[x])^4-0.27/(4.29 +Sqrt[x])
Official symbols
When defining definitions using SetDelayed name of the formal argument ( x in this case) is independent of any occurrences of the same character outside the definition. Such definitions can use any other character and still generate the same result. On the other hand, the definitions set using Set (for example, functionB1 ) are based on the result of evaluating the right-hand side containing the same character as the formal argument. This can be a source of subtle errors, since care must be taken not to use characters that accidentally have preexisting lowering values. Using formal characters (described in Letters and letter-like forms ) for argument names can help deal with this problem.