Re: newbie question about the symbol E

*To*: mathgroup at smc.vnet.net*Subject*: [mg28318] Re: newbie question about the symbol E*From*: "Paul Lutus" <nospam at nosite.com>*Date*: Wed, 11 Apr 2001 02:00:57 -0400 (EDT)*References*: <9arn5o$qna@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

"Martin P. Pos" <posmpxxxx at xxxxhome.nl> wrote in message news:9arn5o$qna at smc.vnet.net... > I want to declare a function of energy E, say f[E], but mathematica doesn't > allow me to use E as a symbol, because it is reserved for the exponential > constant. In the frontend I use <esc>ee<esc> to enter that exponential > constant, but i want E to be the variable of this function. > > Similar, I can declare a constant, e.g.: > > Subscript[E, F] := 10 > > But when I do: > > Clear[Subscript[E, F]] > > mathematica responds: > > "Clear::ssym : eF is not a symbol or string" > > where eF is the exponential constant, subscript F. > > I want to enter the following formula: > > f[x_] := 1/(1 + E^((Subscript[x, F] - x)/(k*T))) > > where E should be the exponential constant and x should be E (capital e) > > Is there a way to do what I want, or is it not possible to use E? In your last example, you are asking to use "E" for two different purposes in the same equation. You cannot do this. Use a different letter. Then, when the computation is finished, put the result in a string and replace whatever letter you choose with E. Example: f[x_] = 1/(1+E^(f - x)/(k T)) a = StringReplace[ToString[f[x]],"E"->"e"] b = StringReplace[a,"x"->"E"] Something like that. -- Paul Lutus www.arachnoid.com