I need to define some "general" variables in Mathematica 8, and I wonder if this can be done the following way. Say ta[n] and tb[m] are my variables, in turn depending on n and m. I want to define a function, for example E[ta[n]_ , tb[m]_ ] := Cos[ ta[n] ] + Sin [tb[m] ] (just a simple example). Then I want to be able to use the above expression in yet another function S := E[ta,tb] + E[ta,tb] + etc... First of all, does this work in Mathematica ? Second, is S also a function, for example, if the line would stop before etc, should i write it as S[ta_ , tb_, ta_, tb_ ]? Remember, ta , ta etc are different variables. I am asking all this because it would save me a serious amount of time in writing everything down explicitly.