My understanding is that you would like to have some alternative for symbolic math in 'Mathematica' for function call.
From the code you have provided I notice that you try to store the reference of the function into a variable what in MATLAB is called 'function handle'. You can do this by creating 'anonymous function' and store their handle to the variable.
The following code illustrates this approach:
function [wk,ek,S] = myfun(U,n,J,a)
k=2;
ek = @(k)2*J*(1-cos(k*a));
ek(k);
wk = @(k)sqrt(ek(k)*(ek(k)+ 2*U*n));
wk(k)
S =@(k)ek(k)+wk(k);
S(k)
end
Now, you do not need to provide the value of 'k' to execute the function. For more details about 'anonymous function' and 'function handle' refer to the following links: